Skip to content

Commit

Permalink
beautify the ui
Browse files Browse the repository at this point in the history
  • Loading branch information
HungBacktracking committed Sep 8, 2023
1 parent e6fb05a commit 426bed8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
8 changes: 8 additions & 0 deletions resources/contest.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
box-sizing: border-box;
display: flex;

.info-contest:first-child {
margin-right: 25px;
}

.info-contest:nth-child(2) {
margin-right: 5px;
}

.info-contest {
flex: 1;
}
Expand Down
15 changes: 10 additions & 5 deletions templates/contest/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

{% block two_col_media %}
<style>
.non-padding-top {
padding-top: 0;
}

.content-description ul {
padding: 0 !important;
}
Expand Down Expand Up @@ -112,7 +116,8 @@
<a href="{{ url('contest_view', contest.key) }}" class="contest-list-title" style="margin-right: 5px;">
{{- contest.name -}}
</a>
<span class="contest-tags">
<br>
<div class="contest-tags" style="margin-top: 5px;">
{% if not contest.is_visible %}
<span class="contest-tag contest-tag-hidden">
<i class="fa fa-eye-slash"></i> {{ _('hidden') }}
Expand Down Expand Up @@ -155,12 +160,12 @@
</a>
</span>
{% endfor %}
</span>
</div>
{% endspaceless %}
{% endmacro %}

{% macro time_left(contest) %}
<div class="time time-left">
{% macro time_left(contest, padding_top = true) %}
<div class="time time-left {{ 'non-padding-top' if padding_top == false }}">
{% if contest.time_limit %}
{{ contest.start_time|date(_("M j, Y, G:i")) }} -
{{ contest.end_time|date(_("M j, Y, G:i")) }}
Expand Down Expand Up @@ -382,7 +387,7 @@ <h3 class="toggle open contest-group-header">
<div class="info-contest" style="flex: 1.5">
<div class="contest-title">Thời gian:</div>
<div class="contest-block">
{{ time_left(contest) }}
{{ time_left(contest, false) }}
</div>
</div>
<div class="info-contest">
Expand Down

0 comments on commit 426bed8

Please sign in to comment.