Skip to content

Commit ad1aeaf

Browse files
committed
remove big_squares
1 parent dafbff2 commit ad1aeaf

File tree

2 files changed

+48
-55
lines changed

2 files changed

+48
-55
lines changed
Lines changed: 48 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,57 @@
11
{% extends "web/root_base.html" %}
22
{% load results %}
3+
34
{% block title %}
4-
Results announcement
5+
Results announcement
56
{% endblock title %}
67

78
{% block root_content %}
8-
<div class="w-screen h-screen flex items-center justify-center p-16"
9-
id="js-screen"
10-
hx-select="#js-screen"
11-
hx-target="#js-screen"
12-
hx-swap="outerHTML">
13-
{% if not hidden %}
14-
<div class="text-center">
15-
<div class="text-9xl font-bold mb-6 text-gray-600">{{ position }}.</div>
16-
{% if team %}
17-
{% if team.school %}
18-
<div class="text-7xl font-bold mb-4">
19-
{{ team.school.name }}
20-
{% if team.in_school_symbol %}
21-
<span class="text-primary">{{ team.in_school_symbol }}</span>
22-
{% endif %}
23-
</div>
24-
<div class="text-5xl font-bold mb-6">{{ team.school.address }}</div>
25-
{% else %}
26-
<div class="text-5xl font-bold mb-6">{{ team.name }}</div>
27-
{% endif %}
28-
<div class="text-3xl">{{ team.contestants_names }}</div>
29-
<div class="flex justify-center">{% big_squares result_row %}</div>
30-
<div class="text-4xl mt-4">{{ result_row.solved_count }}</div>
31-
{% endif %}
32-
</div>
9+
<div class="w-screen h-screen flex items-center justify-center p-16"
10+
id="js-screen"
11+
hx-select="#js-screen"
12+
hx-target="#js-screen"
13+
hx-swap="outerHTML">
14+
{% if not hidden %}
15+
<div class="text-center">
16+
<div class="text-9xl font-bold mb-6 text-gray-600">{{ position }}.</div>
17+
{% if team %}
18+
{% if team.school %}
19+
{# TODO: #998 Unify team display #}
20+
<div class="text-7xl font-bold mb-4">
21+
{{ team.school.name }}
22+
{% if team.in_school_symbol %}
23+
<span class="text-primary">{{ team.in_school_symbol }}</span>
24+
{% endif %}
25+
</div>
26+
<div class="text-5xl font-bold mb-6">{{ team.school.address }}</div>
27+
{% else %}
28+
<div class="text-5xl font-bold mb-6">{{ team.name }}</div>
3329
{% endif %}
34-
<div class="p-2 fixed bottom-0 right-0 space-x-1">
35-
<span>{{ position }}.</span>
36-
<button class="btn-admin-sm bg-primary hover:bg-primary-dark"
37-
hx-get="{{ links.prev }}"
38-
hx-trigger="click, keyup[key=='ArrowDown'||key=='Backspace'] from:body">
39-
<i class="fas fa-arrow-down"></i>
40-
</button>
41-
<button class="btn-admin-sm bg-primary hover:bg-primary-dark"
42-
hx-get="{{ links.hide }}"
43-
hx-trigger="click, keyup[key=='h'] from:body">
44-
<i class="fas fa-eye-slash"></i>
45-
</button>
46-
<button class="btn-admin-sm bg-primary hover:bg-primary-dark"
47-
hx-get="{{ links.next }}"
48-
hx-trigger="click, keyup[key=='ArrowUp'||key==' '] from:body">
49-
<i class="fas fa-arrow-up"></i>
50-
</button>
51-
</div>
30+
31+
<div class="text-3xl">{{ team.contestants_names }}</div>
32+
<div class="flex justify-center">{% squares result_row big=True %}</div>
33+
<div class="text-4xl mt-4">{{ result_row.solved_count }}</div>
34+
{% endif %}
35+
</div>
36+
{% endif %}
37+
38+
<div class="p-2 fixed bottom-0 right-0 space-x-1">
39+
<span>{{ position }}.</span>
40+
<button class="btn-admin-sm bg-primary hover:bg-primary-dark"
41+
hx-get="{{ links.prev }}"
42+
hx-trigger="click, keyup[key=='ArrowDown'||key=='Backspace'] from:body">
43+
<i class="fas fa-arrow-down"></i>
44+
</button>
45+
<button class="btn-admin-sm bg-primary hover:bg-primary-dark"
46+
hx-get="{{ links.hide }}"
47+
hx-trigger="click, keyup[key=='h'] from:body">
48+
<i class="fas fa-eye-slash"></i>
49+
</button>
50+
<button class="btn-admin-sm bg-primary hover:bg-primary-dark"
51+
hx-get="{{ links.next }}"
52+
hx-trigger="click, keyup[key=='ArrowUp'||key==' '] from:body">
53+
<i class="fas fa-arrow-up"></i>
54+
</button>
5255
</div>
56+
</div>
5357
{% endblock root_content %}

bullet/problems/templatetags/results.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,6 @@ def squares(
4141
}
4242

4343

44-
@register.inclusion_tag("problems/results/squares.html")
45-
def big_squares(
46-
obj: ResultRow,
47-
problem_count: Optional[int] = None,
48-
team_problem_count: Optional[int] = None,
49-
first_problem: Optional[int] = None,
50-
):
51-
ctx = squares(obj, problem_count, team_problem_count, first_problem, True)
52-
return ctx
53-
54-
5544
@register.inclusion_tag("problems/results/timer.html")
5645
def venue_timer(venue: Venue | str, competition: Competition):
5746
if isinstance(venue, str):

0 commit comments

Comments
 (0)