NDOJ/resources/widgets.scss

874 lines
17 KiB
SCSS
Raw Normal View History

2020-01-21 06:35:58 +00:00
@import "vars";
.social i {
display: inline;
font-size: 1.9em;
}
.facebook-this, .tweet-this, .gplus-this {
display: inline;
}
.tweet-this i {
color: #55ACEE;
}
.facebook-this it {
color: #133783;
}
.gplus-this i {
color: #DD4B38;
}
.social {
font-size: 1.3em;
float: right;
}
// Bootstrap-y buttons
.button, button, input[type=submit] {
-webkit-transition: .3s all ease;
-o-transition: .3s all ease;
transition: .3s all ease;
2022-08-20 16:18:28 +00:00
align-items: center;
background-clip: padding-box;
2023-09-08 18:14:09 +00:00
background-color: $theme_color;
2022-08-20 16:18:28 +00:00
border: 1px solid transparent;
border-radius: .25rem;
box-shadow: rgba(0, 0, 0, 0.02) 0 1px 3px 0;
box-sizing: border-box;
color: #fff !important;
2020-01-21 06:35:58 +00:00
cursor: pointer;
display: block;
2022-08-20 16:18:28 +00:00
font-family: system-ui,-apple-system,system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 16px;
font-weight: 600;
justify-content: center;
line-height: 1.25;
margin: 0;
min-height: 3rem;
padding: calc(.875rem - 1px) calc(1.5rem - 1px);
position: relative;
text-decoration: none;
transition: all 250ms;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
vertical-align: middle;
2020-01-21 06:35:58 +00:00
text-align: center;
2022-08-20 16:18:28 +00:00
width: auto;
2020-01-21 06:35:58 +00:00
2024-03-23 05:26:53 +00:00
&.disabled, &[disabled] {
2020-01-21 06:35:58 +00:00
background: linear-gradient(to bottom, darkgray 0, gray 100%) repeat-x !important;
border-color: grey !important;
cursor: not-allowed;
}
2022-08-20 16:18:28 +00:00
&.small {
min-height: auto;
padding: calc(.5rem - 1px) calc(1rem - 1px);
}
&.btn-gray {
background: gray;
}
2022-08-23 04:49:20 +00:00
&.btn-hovergray {
&:hover {
background: lightgray;
}
}
2022-08-20 16:18:28 +00:00
&.btn-green {
background: #28a745;
2022-08-20 16:18:28 +00:00
&:hover {
background: green;
2022-08-20 16:18:28 +00:00
}
}
&.btn-darkred {
background: darkred;
&:hover {
background: brown;
}
}
&.btn-midnightblue {
background: midnightblue;
&:hover {
background: darkblue;
}
}
2022-08-25 15:34:21 +00:00
2023-09-06 00:30:05 +00:00
&.btn-darkGreen {
2023-09-08 18:14:09 +00:00
background: $theme_color;
2023-09-06 00:30:05 +00:00
}
2022-08-25 15:34:21 +00:00
// class = "unselectable button full small" only appear in online-judge/templates/contest/list.html
// this attribute center buttons in contest list (including "Join", "Virutal Join", "Spectable")
&.unselectable.button.full.small {
margin: 0 auto
}
2020-01-21 06:35:58 +00:00
}
.button.full, input[type=submit].full, button.full {
2022-08-20 16:18:28 +00:00
}
.button:hover, button:hover, input[type=submit]:hover {
2023-09-08 18:14:09 +00:00
background-color: $theme_color;
2022-08-20 16:18:28 +00:00
box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
transform: translateY(-1px);
2020-01-21 06:35:58 +00:00
}
2022-08-20 16:18:28 +00:00
.button:focus, button:focus, input[type=submit]:focus {
2023-09-08 18:14:09 +00:00
background-color: $theme_color;
2022-08-20 16:18:28 +00:00
box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
2020-01-21 06:35:58 +00:00
}
.button:active, button:active, input[type=submit]:hover {
2023-09-08 18:14:09 +00:00
background-color: $theme_color;
2022-08-20 16:18:28 +00:00
box-shadow: rgba(0, 0, 0, .06) 0 2px 4px;
transform: translateY(0);
2020-01-21 06:35:58 +00:00
}
.inline-button {
display: inline;
vertical-align: top;
padding: 3px 6px;
}
input {
2024-04-13 03:26:17 +00:00
&[type=text], &[type=password], &[type=email], &[type=number], &[type=datetime-local] {
2020-01-21 06:35:58 +00:00
padding: 4px 8px;
color: #555;
background: #FFF none;
border: 1px solid $border_gray;
border-radius: $widget_border_radius;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
box-sizing: border-box;
// Need this explicitly because UA stylesheet for Chrome on 4k makes
// everything look bad otherwise (forces it to 9.3px)
font-size: $base_font_size;
}
&[type=number] {
padding: 2px 0 2px 5px;
}
}
textarea {
2023-10-05 19:00:20 +00:00
padding: 8px;
2020-01-21 06:35:58 +00:00
background: #FFF none;
border: 1px solid $border_gray;
border-radius: $widget_border_radius;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
box-sizing: border-box;
}
textarea:hover {
2023-10-05 19:00:20 +00:00
border-color: black;
2020-01-21 06:35:58 +00:00
}
input {
&[type="text"]:hover, &[type="password"]:hover {
border-color: rgba(82, 168, 236, 0.8);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 4px rgba(82, 168, 236, 0.6);
}
}
textarea:focus {
2023-10-05 19:00:20 +00:00
border-color: black;
border-width: unset;
2020-01-21 06:35:58 +00:00
outline: 0;
}
input {
&[type="text"]:focus, &[type="password"]:focus {
border-color: rgba(82, 168, 236, 0.8);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
outline: 0;
}
}
// Bootstrap-y copy button
.btn-clipboard {
2024-01-19 01:46:41 +00:00
top: -5px;
right: -8px;
2020-01-21 06:35:58 +00:00
display: block;
font-size: 12px;
cursor: pointer;
position: absolute;
padding: 5px 8px;
2024-01-19 01:46:41 +00:00
font-family: system-ui, "Noto Sans";
&:hover {
border-radius: $widget_border_radius;
border: 1px solid #E1E1E8;
background-color: #FFF;
}
2020-01-21 06:35:58 +00:00
}
.copy-clipboard {
position: relative;
2023-03-10 04:31:55 +00:00
}
2020-01-21 06:35:58 +00:00
// Bootstrap-y tabs
.ul_tab_a_active {
2023-09-08 18:14:09 +00:00
color: $theme_color;
2020-01-21 06:35:58 +00:00
cursor: default;
2023-03-03 00:43:15 +00:00
font-weight: bold;
2023-09-08 18:14:09 +00:00
border-bottom: 3px solid $theme_color;
2023-03-03 00:43:15 +00:00
background: transparent;
2020-01-21 06:35:58 +00:00
}
.tabs {
border-bottom: 1px solid $border_gray;
margin: 0 0 8px;
width: 100%;
display: flex;
&.tabs-no-flex {
display: block;
}
.tab {
.tab-icon {
padding-right: 0.3em;
color: gray;
}
a, span {
border-top-width: 3px !important;
}
&.active {
a, span {
border-top-color: $highlight_blue !important;
}
.tab-icon {
color: black;
}
}
}
h2 {
color: #393630;
}
> ul {
margin: 0;
padding: 0;
list-style: outside none none;
display: flex;
overflow-x: auto;
overflow-y: hidden;
2023-09-01 23:52:25 +00:00
&::-webkit-scrollbar {
width: 0.1rem; // Adjust the width as needed
background-color: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: transparent;
}
2020-01-21 06:35:58 +00:00
> li {
position: relative;
display: block;
&.active > a, &.active > span {
@extend .ul_tab_a_active;
&:hover {
@extend .ul_tab_a_active;
}
&:focus {
@extend .ul_tab_a_active;
}
}
> a, > span {
2023-03-03 00:43:15 +00:00
margin-right: 10px;
2020-01-21 06:35:58 +00:00
line-height: 1.42857;
position: relative;
display: block;
2023-03-03 00:43:15 +00:00
padding: 5px 5px;
2020-01-21 06:35:58 +00:00
color: #555;
text-decoration: none;
white-space: nowrap;
2023-03-03 00:43:15 +00:00
font-weight: bold;
&:hover {
border-bottom: 3px solid green;
}
2020-01-21 06:35:58 +00:00
}
}
}
}
// Bootstrap-y pagination
ul.pagination a:hover {
color: #FFF;
background: #cc4e17;
2020-01-21 06:35:58 +00:00
}
ul.pagination {
2023-09-08 16:22:57 +00:00
align-items: center;
justify-content: center;
display: flex;
2020-01-21 06:35:58 +00:00
padding-left: 0;
margin: 0;
border-radius: $widget_border_radius;
> {
li {
display: inline;
> {
a, span {
position: relative;
float: left;
padding: 4px 12px;
2023-09-08 16:22:57 +00:00
margin-right: 5px;
font-weight: bold;
2020-01-21 06:35:58 +00:00
line-height: 1.42857;
text-decoration: none;
2023-09-08 18:14:09 +00:00
color: $theme_color;
2023-09-08 16:22:57 +00:00
background-color: white;
2023-09-08 18:14:09 +00:00
border: 2px solid $theme_color;
2023-09-08 16:22:57 +00:00
border-radius: 10px;
2020-01-21 06:35:58 +00:00
}
}
}
.disabled-page > {
a {
color: #f1efef;
background-color: #ab6247;
border-color: #6a240b;
2020-01-21 06:35:58 +00:00
}
span {
color: #f1efef;
background-color: #ab6247;
border-color: #6a240b;
2020-01-21 06:35:58 +00:00
}
}
.active-page > {
a {
z-index: 2;
2023-09-08 16:22:57 +00:00
color: white;
2023-09-08 18:14:09 +00:00
background-color: $theme_color;
2020-01-21 06:35:58 +00:00
border-color: transparent;
cursor: default;
}
span {
z-index: 2;
color: #FFF;
background-color: $highlight_blue;
border-color: transparent;
cursor: default;
}
}
}
}
.alert {
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: $widget_border_radius;
}
.alert-info {
color: #31708f;
background-color: #d9edf7;
border-color: #bce8f1;
}
.alert-warning {
color: #8a6d3b;
background-color: #fcf8e3;
border-color: #faebcc;
}
.alert-danger {
color: #a94442;
background-color: #f2dede;
border-color: #ebccd1;
}
.alert-dismissable, .alert-dismissible {
padding-right: 35px;
}
.alert-dismissable .close, .alert-dismissible .close {
position: relative;
top: -2px;
right: -21px;
color: inherit;
}
.close {
float: right;
font-size: 21px;
font-weight: 700;
line-height: 1;
color: #000;
text-shadow: 0 1px 0 #fff;
filter: alpha(opacity=20);
opacity: 0.2;
}
a.close {
text-decoration: none !important;
font-size: 18px !important;
line-height: 1;
&:hover {
color: black !important;
}
}
.close {
&:focus, &:hover {
color: #000;
text-decoration: none;
cursor: pointer;
filter: alpha(opacity=50);
opacity: 0.5;
}
}
.badge {
min-width: 10px;
padding: 0 7px;
font-size: 12px;
font-weight: 700;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: middle;
background-color: #e84848;
border-radius: 10px;
box-sizing: border-box;
}
.form-submit-group {
border-top: 1px solid #EEE;
margin-top: 0.8em;
padding-top: 0.5em;
text-align: right;
}
ul.select2-selection__rendered {
padding: 0 5px !important;
}
.sidebox h3 {
border-radius: $widget_border_radius $widget_border_radius 0 0;
2023-03-03 00:43:15 +00:00
padding-top: 10px;
padding-bottom: 10px;
2020-01-21 06:35:58 +00:00
padding-left: 7px;
font-size: 1.3em;
2023-03-03 00:43:15 +00:00
font-weight: bold;
background: white;
display: flex;
2020-01-21 06:35:58 +00:00
2023-03-03 00:43:15 +00:00
.fa {
2023-09-08 18:14:09 +00:00
background: $theme_color;
2023-03-03 00:43:15 +00:00
color: white;
padding: 4px;
margin-right: 8px;
border-radius: 5px;
font-size: smaller;
}
2020-01-21 06:35:58 +00:00
}
.sidebox-content {
border-top: none;
padding: 1px 0.5em 3px;
2023-02-08 05:14:48 +00:00
background: white;
2023-03-03 00:43:15 +00:00
border-radius: 0 0 $widget_border_radius $widget_border_radius;
2020-01-21 06:35:58 +00:00
&.sidebox-table {
border: none;
padding: 0;
.table {
margin: 0 !important;
}
}
}
.sidebox {
border-top-left-radius: $widget_border_radius;
border-top-right-radius: $widget_border_radius;
2023-03-03 00:43:15 +00:00
margin-bottom: 1.5em;
2023-03-01 00:42:40 +00:00
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
2020-01-21 06:35:58 +00:00
}
.ws-closed {
position: sticky;
top: 42px;
background: $announcement_red;
border-radius: 5px 5px 0 0;
display: none;
}
.ws-closed a {
display: block;
padding: 7px 0;
text-align: center;
color: white;
font-weight: 600;
}
.semibold {
font-weight: 600;
}
.messages {
list-style-type: none;
padding: 0;
li {
padding: 1em 1.5em;
margin-bottom: 1em;
border: 1px solid transparent;
border-radius: 5px;
&.debug {
color: #383d41;
background-color: #e2e3e5;
border-color: #d6d8db;
}
&.info {
color: #0c5460;
background-color: #d1ecf1;
border-color: #bee5eb;
}
&.success {
color: #155724;
background-color: #d4edda;
border-color: #c3e6cb;
}
&.warning {
color: #856404;
background-color: #fff3cd;
border-color: #ffeeba;
}
&.error {
color: #721c24;
background-color: #f8d7da;
border-color: #f5c6cb;
}
}
}
2021-10-10 04:20:20 +00:00
2021-12-16 20:16:49 +00:00
.spoiler-text {
border: 1px solid black;
padding: 0.5em;
margin-top: 0.5em;
border-radius: 5px;
background: #def;
}
.spoiler-summary {
padding-left: 0.5em;
text-decoration: underline;
2021-11-21 04:23:03 +00:00
}
.control-button {
color: black !important;
2023-02-08 05:14:48 +00:00
border: 0;
2021-11-21 04:23:03 +00:00
}
.control-button:hover {
background: gray;
2022-12-18 09:31:31 +00:00
}
ul.errorlist {
margin: 0px;
text-align: right;
list-style: none;
padding: 0px;
color: red;
margin-bottom: 3px;
}
2022-12-18 09:31:31 +00:00
.registration-form {
.sortedm2m-container, .sortedm2m-container p.selector-filter {
width: 300px;
}
.sortedm2m-container p.selector-filter input {
width: 262px;
}
ul.sortedm2m {
width: 284px;
min-height: 100px;
max-height: 200px;
}
.sortedm2m-container, .sortedm2m-container p.selector-filter {
width: 300px;
}
.sortedm2m-container p.selector-filter input {
width: 262px;
}
ul.sortedm2m {
width: 284px;
min-height: 70px;
max-height: 200px;
height: 70px
}
.inline-header {
float: left;
font-size: 1.1em;
padding: 4px 8px;
padding-left: 0;
}
.block-header {
color: #555;
font-size: 1.1em;
font-weight: 600;
padding-bottom: 0.2em;
padding-left: 2px;
margin-top: 0.75em
}
.fullwidth {
display: block;
overflow: hidden;
}
.fullwidth input {
width: 100%;
}
.fullwidth-error input {
width: 100%;
border-color: red;
}
.form-field-error {
color: red;
}
small {
font-size: 0.7em;
padding-left: 0.6em;
}
#edit-form {
border: unset;
background: unset;
max-width: 450px;
width: 450px;
}
.full-textfield {
padding-top: 0.5em;
}
.tos-section {
display: inline-block;
padding-right: 1em;
}
.pass-req {
padding: 0;
}
}
#center-float {
display: inline-block;
text-align: initial;
width: 450px;
}
#login-panel {
2023-02-08 05:14:48 +00:00
2022-12-18 09:31:31 +00:00
display: inline-block;
position: relative;
margin: 5em auto auto -10em;
top: 40%;
left: 50%;
h4 {
padding-top: 1em;
}
.social {
display: inline;
font-size: 2.3em;
float: none;
}
.google-icon i {
color: #DD4B38;
}
.facebook-icon i {
color: #133783;
}
.github-icon i {
color: black;
}
}
@media (prefers-reduced-motion: reduce) {
.btn {
-webkit-transition: none;
-o-transition: none;
transition: none;
}
}
.btn:hover {
color: #212529;
text-decoration: none;
}
.btn-block {
display: block;
width: 100%;
}
.btn-block + .btn-block {
margin-top: 0.5rem;
}
.d-flex {
display: -webkit-box !important;
display: -ms-flexbox !important;
display: flex !important;
}
.justify-content-center {
-webkit-box-pack: center !important;
-ms-flex-pack: center !important;
justify-content: center !important;
}
.align-items-center {
-webkit-box-align: center !important;
-ms-flex-align: center !important;
align-items: center !important;
}
.align-content-center {
-ms-flex-line-pack: center !important;
align-content: center !important;
}
.align-self-center {
-ms-flex-item-align: center !important;
-ms-grid-row-align: center !important;
align-self: center !important;
}
2023-11-24 03:46:45 +00:00
.a-problem {
font-size: 15px;
line-height: 1.8;
font-weight: normal;
}
a {
-webkit-transition: .3s all ease;
-o-transition: .3s all ease;
transition: .3s all ease;
}
button:hover, button:focus {
2023-11-24 03:46:45 +00:00
text-decoration: none;
outline: none;
-webkit-box-shadow: none;
box-shadow: none;
}
.btn {
padding: 8px 12px;
cursor: pointer;
border-width: 1px;
border-radius: 5px;
font-size: 14px;
font-weight: 500;
-webkit-box-shadow: 0px 10px 20px -6px rgba(0, 0, 0, 0.12);
-moz-box-shadow: 0px 10px 20px -6px rgba(0, 0, 0, 0.12);
box-shadow: 0px 10px 20px -6px rgba(0, 0, 0, 0.12);
overflow: hidden;
position: relative;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
-webkit-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
transition: all 0.3s ease;
span {
font-size: 15px;
margin-left: -20px;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
-webkit-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.icon {
position: absolute;
top: 0;
right: 0;
width: 45px;
bottom: 0;
background: #fff;
i {
font-size: 20px;
}
}
.icon.icon-round {
border-radius: 50%;
}
&.btn-round {
border-radius: 40px;
}
&:hover, &:active, &:focus {
outline: none;
span {
margin-left: -10px;
}
}
&.btn-primary {
color: #fff;
.icon i {
color: #28a745;
}
}
&.btn-disabled {
color: #fff;
background: gray;
border-color: gray;
}
2022-08-25 15:34:21 +00:00
}