Skip to content

Commit a1184f5

Browse files
Merge pull request #62 from FSU-ACM/dev
gui cleanup + seo + contest participation type
2 parents eb8dd47 + 97cd5a4 commit a1184f5

File tree

9 files changed

+98
-39
lines changed

9 files changed

+98
-39
lines changed

src/announcements/templates/announcements/announcement_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% load static %}
44

55
{% block head %}
6-
<meta name="robots" content="noindex">
6+
<meta name="robots" content="noindex, nofollow">
77
{% endblock %}
88

99
{% block section %}Announcements{% endblock %}

src/checkin/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ def checkin_result(request):
143143

144144
@login_required
145145
@user_passes_test(checkin_auth, login_url='/', redirect_field_name=None)
146+
@transaction.atomic
146147
def volunteer_checkin(request):
147148
context = {}
148149

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.2.12 on 2022-03-21 21:49
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('contestadmin', '0002_auto_20220320_2211'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='contest',
15+
name='participation',
16+
field=models.PositiveSmallIntegerField(blank=True, choices=[(1, 'In-Person'), (2, 'Virtual'), (3, 'Hybrid')], null=True),
17+
),
18+
]

src/contestadmin/models.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ class Contest(models.Model):
99
Contest Model
1010
- Results field for DOMJudge contest results uploading
1111
"""
12+
FORMAT = (
13+
(1, 'In-Person'),
14+
(2, 'Virtual'),
15+
(3, 'Hybrid')
16+
)
1217

1318
contest_date = models.DateField(auto_now=False)
1419
contest_doors = models.TimeField(auto_now=False, blank=True, null=True)
@@ -19,7 +24,8 @@ class Contest(models.Model):
1924
team_deadline = models.DateTimeField(auto_now=False, blank=True, null=True)
2025
results = models.FileField(upload_to='uploads/', blank=True)
2126
ec_processed = models.BooleanField(default=False)
22-
volunteer_pin = models.CharField(max_length=8, default=User.objects.make_random_password(length=8))
27+
volunteer_pin = models.CharField(max_length=8, default='thankyou')
28+
participation = models.PositiveSmallIntegerField(choices=FORMAT, blank=True, null=True)
2329

2430
def __str__(self):
2531
return ("Programming Contest "+str(self.contest_date))

src/core/templates/core/base.html

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
<meta charset="UTF-8">
77
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
88
<meta name="author" content="Marlan McInnes-Taylor">
9-
<meta name="description" content="ACM@FSU Programming Contest Registration & Management">
9+
{% block description %}
10+
<meta name="description" content="ACM at FSU Programming Contest Registration & Management">
11+
{% endblock %}
1012
<meta name="keywords"
1113
content="ACM ICPC, ACM Programming Contest, FSU ICPC, FSU ACM ICPC, FSU Programming Contest, FSU ACM Programming Contest, FSU CS Programming Contest, Florida State ICPC, Florida State Programming Contest, Florida State CS Programming Contest, Florida State ACM Programming Contest, Florida State University Programming Contest, Florida State University ACM Programming Contest, Florida State University ICPC, Florida State University CS Programming Contest">
1214
<link rel="stylesheet"
@@ -67,10 +69,10 @@
6769
Resources
6870
</a>
6971
<div class="dropdown-menu">
70-
<a class="dropdown-item" href="https://domjudge.cs.fsu.edu" target="_blank">Contest Server</a>
72+
<a class="dropdown-item" href="https://domjudge.cs.fsu.edu" target="_blank" rel="external">Contest Server</a>
7173
<a class="dropdown-item" href="https://drive.google.com/drive/folders/1pjZk22HGTOjvedz932kHox6-rTz5JqoE?usp=sharing"
72-
target="_blank">Example Questions</a>
73-
<a class="dropdown-item" href="https://bit.ly/JoinProgClub" target="_blank">Programming Club</a>
74+
target="_blank" rel="external">Example Questions</a>
75+
<a class="dropdown-item" href="https://bit.ly/JoinProgClub" target="_blank" rel="external">Programming Club</a>
7476
</div>
7577
</li>
7678
<li class="nav-item">
@@ -131,14 +133,14 @@
131133
<div class="col-md-4 text-center text-md-left ">
132134

133135
<div class="py-0">
134-
<h3 class="my-4 text-white"><a class="mx-2 font-italic text-primary" href="https://fsu.acm.org" target="_blank">ACM at FSU</a></h3>
136+
<h3 class="my-4 text-white"><a class="mx-2 font-italic text-primary" href="https://fsu.acm.org" target="_blank" rel="external">ACM at FSU</a></h3>
135137
<p class="footer-links">
136-
<i class="fa fa-envelope text-white mx-2"></i><a href="mailto:contest@fsu.acm.org" class="text-warning">contest@fsu.acm.org</a>
138+
<i class="fa fa-envelope text-white mx-2"></i><a href="mailto:contest@fsu.acm.org" class="text-warning" rel="external">contest@fsu.acm.org</a>
137139
</p>
138140
<div class="mx-auto pt-2">
139-
<a href="https://www.facebook.com/ACMatFSU/" target="_blank"><i class="fab fa-facebook fa-lg text-white mr-3"></i></a>
140-
<a href="https://discord.gg/4z3hNMA" target="_blank"><i class="fab fa-discord fa-lg text-white mx-3"></i></a>
141-
<a href="https://github.com/FSU-ACM" target="_blank"><i class="fab fa-github fa-lg text-white mx-3"></i></a>
141+
<a href="https://www.facebook.com/ACMatFSU/" target="_blank" rel="external"><i class="fab fa-facebook fa-lg text-white mr-3"></i></a>
142+
<a href="https://discord.gg/4z3hNMA" target="_blank" rel="external"><i class="fab fa-discord fa-lg text-white mx-3"></i></a>
143+
<a href="https://github.com/FSU-ACM" target="_blank" rel="external"><i class="fab fa-github fa-lg text-white mx-3"></i></a>
142144
<a href="{% url 'announcements_feed' %}"><i class="fa fa-rss fa-lg text-white mx-3"></i></a>
143145
</div>
144146
</div>
@@ -153,10 +155,10 @@ <h3 class="my-4 text-white"><a class="mx-2 font-italic text-primary" href="https
153155
Tallahassee, FL 32304</p>
154156
</div>
155157
<div class="mb-2">
156-
<a class="text-danger" href="https://cs.fsu.edu" target="_blank">FSU Dept of Computer Science</a>
158+
<a class="text-danger" href="https://cs.fsu.edu" target="_blank" rel="external">FSU Dept of Computer Science</a>
157159
</div>
158160
<div class="mt-2 pt-1">
159-
<a class="text-white" href="https://icpc.global/" target="_blank">International Programming Contest</a>
161+
<a class="text-white" href="https://icpc.global/" target="_blank" rel="external">International Programming Contest</a>
160162

161163
</div>
162164

@@ -167,7 +169,7 @@ <h3 class="my-4 text-white"><a class="mx-2 font-italic text-primary" href="https
167169
<div class="col-md-4 text-white my-4 text-center text-md-left ">
168170
<span class=" font-weight-bold">About the Contest</span>
169171
<p class="text-info my-2">The ACM Programming Contest is a coding competition that emphasizes problem solving executed in code.</p>
170-
<a class="text-light" href="https://www.mmcinnestaylor.com" target="_blank">Built with &hearts; by Marlan Mc-T</a>
172+
<a class="text-light" href="https://www.mmcinnestaylor.com" target="_blank" rel="external">Built with &hearts; by Marlan Mc-T</a>
171173
</div>
172174
</div>
173175
</div>

src/core/templates/core/contact.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ <h2>Email</h2>
1818
<p class="card-text">Feel free to email our contest staff with any Programming Contest related inquiries.</p>
1919
</div>
2020
<div class="card-footer">
21-
<a class="btn btn-primary" href="mailto:contest@fsu.acm.org" role="button">Message Us</a>
21+
<a class="btn btn-primary" href="mailto:contest@fsu.acm.org" role="button" rel="external">Message Us</a>
2222
</div>
2323
</div>
2424
<div class="card shadow">
@@ -30,7 +30,7 @@ <h2>Discord</h2>
3030
<p class="card-text">Join our Discord server to interact with chapter members and officers.</p>
3131
</div>
3232
<div class="card-footer">
33-
<a href="https://discord.gg/4z3hNMA" class="btn btn-primary" target="_blank" role="button">Join</a>
33+
<a href="https://discord.gg/4z3hNMA" class="btn btn-primary" target="_blank" role="button" rel="external">Join</a>
3434
</div>
3535
</div>
3636
<div class="card shadow">
@@ -42,7 +42,7 @@ <h2>Chapter Website</h2>
4242
<p class="card-text">Check out our chapter website for additional information regarding our organization and activities.</p>
4343
</div>
4444
<div class="card-footer">
45-
<a class="btn btn-primary" href="https://fsu.acm.org" target="_blank" role="button">Visit</a>
45+
<a class="btn btn-primary" href="https://fsu.acm.org" target="_blank" role="button" rel="external">Visit</a>
4646
</div>
4747
</div>
4848
</div>

src/core/templates/core/faq.html

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,22 @@ <h6>Virtual Contests</h6>
169169
</div>
170170
</div>
171171
</div>
172+
<!-- Eighth Question-->
173+
<div class="card">
174+
<div class="card-header" id="headingEightContest">
175+
<h2 class="mb-0">
176+
<button class="btn btn-link btn-block text-left text-dark collapsed" type="button" data-toggle="collapse"
177+
data-target="#collapseEightContest" aria-expanded="false" aria-controls="collapseEightContest">
178+
<h5 class="mb-0">May a team use multiple computers or I/O devices?</h5>
179+
</button>
180+
</h2>
181+
</div>
182+
<div id="collapseEightContest" class="collapse" aria-labelledby="headingEightContest" data-parent="#accordionContest">
183+
<div class="card-body">
184+
<p>No, team members must share a single computer, keyboard, mouse/touchpad, and display.</p>
185+
</div>
186+
</div>
187+
</div>
172188
</div>
173189

174190
<!-- DOMJUDGE-->
@@ -275,7 +291,7 @@ <h5 class="mb-0">How do I access DOMjudge?</h5>
275291
<div id="collapseFiveDJ" class="collapse" aria-labelledby="headingFiveDJ" data-parent="#accordionDJ">
276292
<div class="card-body">
277293
You can access the server by clicking on the 'Contest Server' link in the 'Resources' dropdown menu which is located in
278-
the top navigation bar above. Once the page loads, locate the 'Login' button in the top navication bar, and enter the
294+
the top navigation bar above. Once the page loads, locate the 'Login' button in the top navigation bar, and enter the
279295
credentials you received upon check in.
280296
</div>
281297
</div>
@@ -334,7 +350,8 @@ <h5 class="mb-0">Is there a registration deadline?</h5>
334350
</div>
335351
<div id="collapseThreeRegister" class="collapse" aria-labelledby="headingThreeRegister" data-parent="#accordionRegister">
336352
<div class="card-body">
337-
Yes, there is a team registration deadline which appears on the homepage once it is set by the contest organizers. Only teams created by this deadline can receive log-in credentials for DOMjudge.
353+
Yes, there is a team registration deadline which appears on the homepage once it is set by the contest organizers. Only
354+
teams created by this deadline can receive log-in credentials for DOMjudge.
338355
</div>
339356
</div>
340357
</div>
@@ -365,7 +382,10 @@ <h6>Join a walk-in team</h6>
365382
You can be assigned a walk-in team by selecting 'No' at the registered teams prompt during check in.
366383
</li>
367384
<li>
368-
If multiple people want to join the same walk-in team, one person must first check in and select 'No' at the registered teams prompt. After they are added to a walk-in team, they must then share the team's PIN, located in the Account Dashboard, with their group. The remaining individuals should follow the procedure outlined in 'How do I join an existing team?' before checking in.
385+
If multiple people want to join the same walk-in team, one person must first check in and select 'No' at the registered
386+
teams prompt. After they are added to a walk-in team, they must then share the team's PIN, located in the Account
387+
Dashboard, with their group. The remaining individuals should follow the procedure outlined in 'How do I join an
388+
existing team?' before checking in.
369389
</li>
370390
</ul>
371391

src/core/templates/core/index.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h4 class="card-title mb-0">{{ announcement.title }}</h4>
4949
</div>
5050
</div>
5151

52-
<p class="lead text-center mb-1">An <a href="https://icpc.global" target="_blank">ICPC</a> style contest hosted semesterly by the Association for Computing Machinery Florida State University Student Chapter.</p>
52+
<p class="lead text-center mb-1">An <a href="https://icpc.global" target="_blank" rel="external">ICPC</a> style contest hosted semesterly by the Association for Computing Machinery Florida State University Student Chapter.</p>
5353

5454
<hr>
5555
<div class="row justify-content-center">
@@ -71,7 +71,7 @@ <h4 class="card-title mb-0">{{ announcement.title }}</h4>
7171
<div class=" col-sm col-md-6">
7272
<div class="card bg-secondary">
7373
<h5 class="text-center text-warning">Team Registration Deadline</h5>
74-
<date class="text-center text-light">{{ contest.team_deadline | date }} @ {{ contest.team_deadline | time }}</date>
74+
<p class="text-center text-light">{{ contest.team_deadline | date }} @ {{ contest.team_deadline | time }}</p>
7575
</div>
7676
</div>
7777
</div>
@@ -81,6 +81,15 @@ <h5 class="text-center text-warning">Team Registration Deadline</h5>
8181
<div class="col-md-5 text-center mb-3">
8282
<h3>Contest Details</h3>
8383
{% if contest is not None %}
84+
{% if contest.participation is not None %}
85+
{% if contest.participation == 1 %}
86+
<p class="mb-1"><span class="font-weight-bold">Participation: </span>In-Person Only</p>
87+
{% elif contest.participation == 2 %}
88+
<p class="mb-1"><span class="font-weight-bold">Participation: </span>Virtual Only</p>
89+
{% else %}
90+
<p class="mb-1"><span class="font-weight-bold">Participation: </span>In-Person or Virtual</p>
91+
{% endif %}
92+
{% endif %}
8493
<p class="mb-1"><span class="font-weight-bold">Date: </span>{{ contest.contest_date }}</p>
8594
{% if contest.contest_doors is not None %}
8695
<p class="mb-1"><span class="font-weight-bold">Doors Open: </span>{{ contest.contest_doors }}</p>

src/manager/templates/manager/dashboard.html

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,26 @@ <h1 class="text-center">Account Dashboard</h1>
1313
<div class="row justify-content-center">
1414
<div class="col">
1515
{% for announcement in announcements %}
16-
<div class="card mt-4 shadow-sm">
17-
<div class="card-header font-weight-bold">
18-
Recent Announcement
19-
</div>
20-
<div class="card-body">
21-
<h4 class="card-title mb-0">{{ announcement.title }}</h4>
22-
<small class="card-text text-muted">{{ announcement.author.first_name }} | {{ announcement.created_on}} </small>
23-
{% if announcement.created_on < announcement.updated_on %}
24-
<br>
25-
<small class="card-text text-muted">Updated on: {{ announcement.updated_on}} </small>
26-
{% endif %}
27-
{% if announcement.content|length > 140 %}
28-
<p class="card-text lead mt-2">{{announcement.content|slice:":140" }}...</p>
29-
<a href="{% url 'announcement_detail' announcement.slug %}" class="btn btn-primary btn-sm">Read More</a>
30-
{% else %}
31-
<p class="card-text lead mt-2">{{announcement.content }}</p>
32-
{% endif %}
16+
<div class="alert alert-dismissible fade show mt-3 mb-2 p-0 shadow-sm">
17+
<div class="card m-0">
18+
<div class="card-header font-weight-bold">
19+
Recent Announcement
20+
<button type="button" class="close" data-dismiss="alert">&times;</button>
21+
</div>
22+
<div class="card-body">
23+
<h4 class="card-title mb-0">{{ announcement.title }}</h4>
24+
<small class="card-text text-muted">{{ announcement.author.first_name }} | {{ announcement.created_on}} </small>
25+
{% if announcement.created_on < announcement.updated_on %}
26+
<br>
27+
<small class="card-text text-muted">Updated on: {{ announcement.updated_on}} </small>
28+
{% endif %}
29+
{% if announcement.content|length > 140 %}
30+
<p class="card-text lead mt-2">{{announcement.content|slice:":140" }}...</p>
31+
<a href="{% url 'announcement_detail' announcement.slug %}" class="btn btn-primary btn-sm">Read More</a>
32+
{% else %}
33+
<p class="card-text lead mt-2">{{announcement.content }}</p>
34+
{% endif %}
35+
</div>
3336
</div>
3437
</div>
3538
{% empty %}

0 commit comments

Comments
 (0)