diff --git a/templates/contest/list.html b/templates/contest/list.html index 51117a6..791cb54 100644 --- a/templates/contest/list.html +++ b/templates/contest/list.html @@ -14,6 +14,18 @@ .content-description ul { padding: 0 !important; } + + .btn-contest { + display: inline-block; + padding: 1px 6px; + } + + {% if page_obj and page_obj.number > 1%} + #ongoing-table { + display: none; + } + {% endif %} + {% endblock %} @@ -32,6 +44,21 @@ '{{ _('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")); + // var tooltip_classes = 'tooltipped tooltipped-e'; // // $('.contest-tag').each(function () { @@ -187,41 +214,52 @@ {% endif %} {% if current_contests %} -
{{ _('Contest') }} | -{{ _('Users') }} | - {% if not request.in_contest %} -+ |
---|
-
- {{ contest_head(contest) }}
- {% if contest.start_time %}
-
- - {% if contest.time_before_end %} - {{ _('Ends in %(countdown)s', countdown=contest.time_before_end|as_countdown) }} - {% endif %} - {{ time_left(contest) }} - {% endif %} - |
- - {{ user_count(contest, request.user) }} - | - {{ contest_join(contest, request) }} +{{ _('Contest') }} | +{{ _('Users') }} | + {% if not request.in_contest %} ++ {% endif %} |
---|