mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: contest-problem: update style
This commit is contained in:
1 parent
fc1f703e21
commit
72c3e48f1b
3 files changed
+20
-26
No files matched your search
@@ -54,8 +54,7 @@ for key, value in $contest-color
|
|||||||
row-gap: 0.75rem;
|
row-gap: 0.75rem;
|
||||||
column-gap: 0.5rem;
|
column-gap: 0.5rem;
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.5rem;
|
||||||
margin-top: 1rem;
|
width: rem(180px);
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
|
|
||||||
> a
|
> a
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -103,12 +102,3 @@ for key, value in $contest-color
|
|||||||
|
|
||||||
&:hover .icon
|
&:hover .icon
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
// .placeholder
|
|
||||||
// cursor: pointer;
|
|
||||||
// position: absolute;
|
|
||||||
// top: -0.375rem;
|
|
||||||
// right: -0.375rem;
|
|
||||||
// bottom: -0.375rem;
|
|
||||||
// left: -0.375rem;
|
|
||||||
|
|
||||||
@@ -6,19 +6,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div>
|
<div>
|
||||||
<div class="contest-problems">
|
|
||||||
{% for pid in tdoc.pids -%}
|
|
||||||
{% set status = tsdoc.detail[pid].status %}
|
|
||||||
{% set pass = status == STATUS.STATUS_ACCEPTED %}
|
|
||||||
{% set fail = status and not pass %}
|
|
||||||
<a href="{{ url('problem_detail', pid=pid, query={tid:tdoc.docId}) }}"
|
|
||||||
class="{% if pass %}pass{% elif fail %}fail{% endif %}
|
|
||||||
{% if pid==pdoc.docId %} active{% endif %}">
|
|
||||||
<span class="id">{{ String.fromCharCode(65+loop.index0) }}</span>
|
|
||||||
{% if status %}<span class="icon icon-{% if pass %}check{% else %}close{% endif %}"></span>{% endif %}
|
|
||||||
</a>
|
|
||||||
{%- endfor %}
|
|
||||||
</div>
|
|
||||||
<ol class="menu">
|
<ol class="menu">
|
||||||
{% if model.contest.isOngoing(tdoc, tsdoc) %}
|
{% if model.contest.isOngoing(tdoc, tsdoc) %}
|
||||||
{% if page_name == 'contest_detail_problem' %}
|
{% if page_name == 'contest_detail_problem' %}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="medium-9 columns">
|
<div class="medium-9 columns">
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<div class="section__header" style="align: center">
|
<div class="section__header">
|
||||||
<h1 class="section__title">
|
<h1 class="section__title">
|
||||||
{% if rdoc %}
|
{% if rdoc %}
|
||||||
<a href="{{ url('record_detail', {rid:rdoc._id}) }}">
|
<a href="{{ url('record_detail', {rid:rdoc._id}) }}">
|
||||||
@@ -46,10 +46,27 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
#{{ pdoc.pid|default(pdoc.docId) }}. {{ pdoc.title }}
|
#{{ pdoc.pid|default(pdoc.docId) }}. {{ pdoc.title }}
|
||||||
</h1>
|
</h1>
|
||||||
|
{% if tdoc %}
|
||||||
|
<div class="section__tools contest-problems">
|
||||||
|
{% for pid in tdoc.pids -%}
|
||||||
|
{% set status = tsdoc.detail[pid].status %}
|
||||||
|
{% set pass = status == STATUS.STATUS_ACCEPTED %}
|
||||||
|
{% set fail = status and not pass %}
|
||||||
|
<a href="{{ url('problem_detail', pid=pid, query={tid:tdoc.docId}) }}"
|
||||||
|
class="{% if pass %}pass{% elif fail %}fail{% endif %}
|
||||||
|
{% if pid==pdoc.docId %} active{% endif %}">
|
||||||
|
<span class="id">{{ String.fromCharCode(65+loop.index0) }}</span>
|
||||||
|
{% if status %}<span class="icon icon-{% if pass %}check{% else %}close{% endif %}"></span>{% endif %}
|
||||||
|
</a>
|
||||||
|
{%- endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="section__body">
|
<div class="section__body">
|
||||||
<ul class="problem__tags">
|
<ul class="problem__tags">
|
||||||
|
{% if not tdoc %}
|
||||||
<span class="bp4-tag bp4-large bp4-minimal problem__tag-item">{{ _('ID') }}: {{ pdoc.docId }}</span>
|
<span class="bp4-tag bp4-large bp4-minimal problem__tag-item">{{ _('ID') }}: {{ pdoc.docId }}</span>
|
||||||
|
{% endif %}
|
||||||
<span class="bp4-tag bp4-large bp4-minimal problem__tag-item icon icon-book">{{ _('problem_type.' + pdoc.config.type).format(pdoc.config.subType) }}</span>
|
<span class="bp4-tag bp4-large bp4-minimal problem__tag-item icon icon-book">{{ _('problem_type.' + pdoc.config.type).format(pdoc.config.subType) }}</span>
|
||||||
{% if pdoc.config.type != 'objective' and pdoc.config.type != 'submit_answer' %}
|
{% if pdoc.config.type != 'objective' and pdoc.config.type != 'submit_answer' %}
|
||||||
<span class="bp4-tag bp4-large bp4-minimal problem__tag-item icon icon-stopwatch">{{ pdoc.config.timeMax if pdoc.config.timeMax == pdoc.config.timeMin else pdoc.config.timeMin+'~'+pdoc.config.timeMax }}ms</span>
|
<span class="bp4-tag bp4-large bp4-minimal problem__tag-item icon icon-stopwatch">{{ pdoc.config.timeMax if pdoc.config.timeMax == pdoc.config.timeMin else pdoc.config.timeMin+'~'+pdoc.config.timeMax }}ms</span>
|
||||||
@@ -59,8 +76,8 @@
|
|||||||
<a class="bp4-tag bp4-large bp4-minimal bp4-interactive problem__tag-item" href="{{ url('record_main', query={pid:pdoc.docId}) }}">{{ _('Tried') }}: {{ pdoc.nSubmit }}</a>
|
<a class="bp4-tag bp4-large bp4-minimal bp4-interactive problem__tag-item" href="{{ url('record_main', query={pid:pdoc.docId}) }}">{{ _('Tried') }}: {{ pdoc.nSubmit }}</a>
|
||||||
<a class="bp4-tag bp4-large bp4-minimal bp4-interactive problem__tag-item" href="{{ url('record_main', query={pid:pdoc.docId, status:1}) }}">{{ _('Accepted') }}: {{ pdoc.nAccept if ((not tdoc) or showAccept) else '?' }}</a>
|
<a class="bp4-tag bp4-large bp4-minimal bp4-interactive problem__tag-item" href="{{ url('record_main', query={pid:pdoc.docId, status:1}) }}">{{ _('Accepted') }}: {{ pdoc.nAccept if ((not tdoc) or showAccept) else '?' }}</a>
|
||||||
<span class="bp4-tag bp4-large bp4-minimal problem__tag-item">{{ _('Difficulty') }}: {{ pdoc['difficulty'] or lib.difficulty(pdoc.nSubmit, pdoc.nAccept) or _('(None)') }}</span>
|
<span class="bp4-tag bp4-large bp4-minimal problem__tag-item">{{ _('Difficulty') }}: {{ pdoc['difficulty'] or lib.difficulty(pdoc.nSubmit, pdoc.nAccept) or _('(None)') }}</span>
|
||||||
{% endif %}
|
|
||||||
<span class="bp4-tag bp4-large bp4-minimal bp4-interactive problem__tag-item">{{ _('Uploaded By') }}: {{ user.render_inline(udoc, badge=false) }}</span>
|
<span class="bp4-tag bp4-large bp4-minimal bp4-interactive problem__tag-item">{{ _('Uploaded By') }}: {{ user.render_inline(udoc, badge=false) }}</span>
|
||||||
|
{% endif %}
|
||||||
{% if pdoc.tag.length %}
|
{% if pdoc.tag.length %}
|
||||||
<span name="show_tags" class="bp4-tag bp4-large bp4-minimal bp4-interactive problem__tag-item nojs--hide icon icon-tag">{{ _('Tags') + '>' }}</span>
|
<span name="show_tags" class="bp4-tag bp4-large bp4-minimal bp4-interactive problem__tag-item nojs--hide icon icon-tag">{{ _('Tags') + '>' }}</span>
|
||||||
{%- for tag in pdoc.tag -%}
|
{%- for tag in pdoc.tag -%}
|
||||||
|
|||||||
Reference in new issue
Block a user