diff --git a/resources/base.scss b/resources/base.scss index 244c922..daedb8c 100644 --- a/resources/base.scss +++ b/resources/base.scss @@ -452,6 +452,7 @@ noscript #noscript { .toggle { font-weight: bold; + cursor: pointer; .fa { transition: transform 0.4s; diff --git a/resources/contest.scss b/resources/contest.scss index a48bfb8..a4cdef2 100644 --- a/resources/contest.scss +++ b/resources/contest.scss @@ -185,18 +185,12 @@ form.contest-join-pseudotab { display: inline; - padding: 6px 8px !important; line-height: 1.7em; - margin-left: 0.5em; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; + margin-left: auto; input { - display: inline; - border: none; - padding: 0; - background: none; - font-weight: 600; + padding-left: 5px !important; + padding-right: 5px !important; } } diff --git a/resources/problem.scss b/resources/problem.scss index b85d63e..2631453 100644 --- a/resources/problem.scss +++ b/resources/problem.scss @@ -60,7 +60,6 @@ a { margin-right: 5px; display: inline-block; - padding: 3px 10px; vertical-align: middle; } @@ -308,6 +307,7 @@ ul.problem-list { border-radius: 5px; margin-bottom: 1em; display: flex; + justify-content: space-between; } .problem-feed-option-item { diff --git a/resources/widgets.scss b/resources/widgets.scss index 1bd5d46..41ef66d 100644 --- a/resources/widgets.scss +++ b/resources/widgets.scss @@ -28,47 +28,93 @@ // Bootstrap-y buttons .button, button, input[type=submit] { - color: white !important; - text-decoration: none !important; + 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; cursor: pointer; - vertical-align: middle; - white-space: nowrap; - font-weight: 400; - line-height: 1.4; - background: rgb(51, 122, 183) none repeat scroll 0 (0% / auto) padding-box border-box; - background: -webkit-linear-gradient(top, #337ab7 0, #265a88 100%) repeat-x; - background: linear-gradient(to bottom, #337ab7 0, #265a88 100%) repeat-x; - border-radius: $widget_border_radius; - padding: 6px 12px; display: block; - border: 1px solid #245580; + 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; text-align: center; - - // 4k hack - font-size: $base_font_size; - - &:hover { - background: #265a88; - } + width: auto; &.disabled { background: linear-gradient(to bottom, darkgray 0, gray 100%) repeat-x !important; border-color: grey !important; cursor: not-allowed; } + + &.small { + min-height: auto; + padding: calc(.5rem - 1px) calc(1rem - 1px); + } + + &.btn-gray { + background: gray; + } + + &.btn-green { + background: green; + + &:hover { + background: #2c974b; + } + } + + &.btn-darkred { + background: darkred; + + &:hover { + background: brown; + } + } + + &.btn-midnightblue { + background: midnightblue; + + &:hover { + background: darkblue; + } + } } .button.full, input[type=submit].full, button.full { - padding: 6px 0; + } -button:hover, button:hover, input[type=submit]:hover { - background: #265a88; +.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); +} + +.button:focus, button:focus, input[type=submit]:focus { + background-color: #fb8332; + box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px; } .button:active, button:active, input[type=submit]:hover { - border-color: #245580; - background: #265a88; + background-color: #c85000; + box-shadow: rgba(0, 0, 0, .06) 0 2px 4px; + transform: translateY(0); } .inline-button { @@ -538,4 +584,4 @@ ul.select2-selection__rendered { .control-button:hover { background: gray; -} \ No newline at end of file +} diff --git a/templates/contest/contest-tabs.html b/templates/contest/contest-tabs.html index d063a24..b09a859 100644 --- a/templates/contest/contest-tabs.html +++ b/templates/contest/contest-tabs.html @@ -33,14 +33,14 @@ {# Allow users to leave the virtual contest #} {% if in_contest %}
{% else %} {# Allow users to virtual join #} @@ -49,9 +49,9 @@ {# Allow users to leave the contest #} {% if in_contest %} {% elif is_editor or is_tester or live_participation.ended %} - {% else %} - {% endif %} diff --git a/templates/contest/list.html b/templates/contest/list.html index 36f81bb..45e9152 100644 --- a/templates/contest/list.html +++ b/templates/contest/list.html @@ -91,21 +91,6 @@ '{{ _('Joining a contest for the first time starts your timer, after which it becomes unstoppable.') }}'); }); - function makeToggleBtn(btn, divElement) { - btn.click(function() { - divElement.toggle(300); - - if (btn.html().trim() === '{{ _('Hide')}}') { - btn.html('{{ _('Show')}}'); - } - else { - btn.html('{{ _('Hide')}}'); - } - }); - } - - makeToggleBtn($("#ongoing-btn"), $("#ongoing-table")); - $('#search-org').select2({multiple: 1, placeholder: '{{ _('Groups') }}...'}) .css({'visibility': 'visible'}); @@ -205,13 +190,13 @@ {% if request.profile in contest.authors.all() or request.profile in contest.curators.all() or request.profile in contest.testers.all() %} {% else %} {% endif %} @@ -233,64 +218,63 @@ {% endfor %} {% endif %} - + {% if active_participations %} -{{ _('Contest') }} | -{{ _('Users') }} | - {% if not request.in_contest %} -- {% endif %} - | ||||
---|---|---|---|---|---|---|
-
- {{ contest_head(contest) }}
- {% if contest.start_time %}
- - {% if contest.time_limit %} - - {% trans countdown=participation.end_time|as_countdown %}Window ends in {{countdown}}{% endtrans %} - - {% elif contest.time_before_end %} - {% trans countdown=contest.end_time|as_countdown %}Ends in {{countdown}}{% endtrans %} + + + {{ _('Active Contests') }} ++
+
+
|
+ + {{ user_count(contest, request.user) }} + | + {{ contest_join(contest, request) }} +
{{ _('Contest') }} | -
---|
-
- {{ contest_head(contest) }}
- {% if contest.start_time %}
-
- - {% if contest.time_before_start %} - {{ _('Starting in %(countdown)s.', countdown=contest.start_time|as_countdown) }} - {% endif %} - {{ time_left(contest) }} - {% endif %} - |
+ {{ _('Contest') }} |
---|