NDOJ/resources/widgets.scss

734 lines
15 KiB
SCSS
Raw Permalink 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] {
2022-08-20 16:18:28 +00:00
align-items: center;
background-clip: padding-box;
background-color: #fa6400;
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
&.disabled {
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: green;
&:hover {
background: #2c974b;
}
}
&.btn-darkred {
background: darkred;
&:hover {
background: brown;
}
}
&.btn-midnightblue {
background: midnightblue;
&:hover {
background: darkblue;
}
}
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 {
background-color: #fb8332;
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 {
background-color: #fb8332;
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 {
2022-08-20 16:18:28 +00:00
background-color: #c85000;
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 {
&[type=text], &[type=password], &[type=email], &[type=number] {
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 {
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;
}
textarea: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);
}
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 {
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;
}
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 {
top: 0;
right: 0;
display: block;
font-size: 12px;
color: #767676;
cursor: pointer;
background-color: #FFF;
border: 1px solid #E1E1E8;
border-radius: 0 $widget_border_radius;
position: absolute;
padding: 5px 8px;
}
.copy-clipboard {
position: relative;
margin-top: 1.5em;
}
// Bootstrap-y tabs
.ul_tab_a_active {
color: black;
cursor: default;
background-color: #fff;
border: 1px solid $border_gray;
border-bottom-color: transparent;
border-image: none;
}
.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;
> li {
margin-bottom: -1px;
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 {
margin-right: 2px;
line-height: 1.42857;
border: 1px solid transparent;
border-radius: $widget_border_radius $widget_border_radius 0 0;
position: relative;
display: block;
padding: 10px 15px;
color: #555;
text-decoration: none;
white-space: nowrap;
}
}
}
}
// Bootstrap-y pagination
ul.pagination a:hover {
color: #FFF;
background: rgba(0, 0, 0, 0.55);
}
ul.pagination {
display: inline-block;
padding-left: 0;
margin: 0;
border-radius: $widget_border_radius;
> {
li {
display: inline;
&:first-child > {
a, span {
margin-left: 0;
border-top-left-radius: $widget_border_radius;
border-bottom-left-radius: $widget_border_radius;
}
}
&:last-child > {
a, span {
margin-left: 0;
border-top-right-radius: $widget_border_radius;
border-bottom-right-radius: $widget_border_radius;
}
}
> {
a, span {
position: relative;
float: left;
padding: 4px 12px;
line-height: 1.42857;
text-decoration: none;
color: #FFF;
background-color: $widget_black;
border: 1px solid #505050;
margin-left: -1px;
}
}
}
.disabled-page > {
a {
color: #888;
background-color: $widget_black;
border-color: #282828;
}
span {
color: #888;
background-color: $widget_black;
border-color: #505050;
}
}
.active-page > {
a {
z-index: 2;
2020-03-21 04:48:04 +00:00
color: black;
background-color: #7dc7ff;
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 {
margin: 0 -5px;
2020-06-11 18:25:23 +00:00
background: #045343;
2020-01-21 06:35:58 +00:00
border-radius: $widget_border_radius $widget_border_radius 0 0;
2020-03-19 22:51:56 +00:00
color: white;
2020-01-21 06:35:58 +00:00
padding-top: 5px;
padding-bottom: 5px;
padding-left: 7px;
font-size: 1.3em;
}
.sidebox h3 .fa {
2020-03-19 22:51:56 +00:00
color: white;
2020-01-21 06:35:58 +00:00
float: right;
margin: 0.2em 0.4em 0 0;
}
.sidebox-content {
border: 1px solid $border_gray;
border-top: none;
margin: 0 -5px;
padding: 1px 0.5em 3px;
2023-02-08 05:14:48 +00:00
background: white;
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;
padding: 0 5px !important;
2023-03-01 00:42:40 +00:00
margin-bottom: 1.5em !important;
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 {
background: lightgray;
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
}
.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;
}
ul.errorlist {
margin: 0px;
text-align: right;
list-style: none;
}
.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;
}
2022-08-25 15:34:21 +00:00
}