Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
style: make the code look cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
bitterteriyaki committed Dec 10, 2023
1 parent be4312a commit bdb28ac
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions templates/submissions/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,36 @@

{% block head %}
<style>
.center-table {
display: flex;
justify-content: center;
}
table {
border-collapse: collapse;
width: 100%;
margin: 20px 0;
}

th, td {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
text-align: center;
}

th {
background-color: #f2f2f2;
}

.center-table {
display: flex;
justify-content: center;
}

.success {
background-color: #47fc00b7;
}

.waiting {
background-color: #ff88008c;
}

.wrong {
background-color: #ff00006b;
}
Expand All @@ -50,11 +56,17 @@ <h2>Submissions</h2>
</thead>
<tbody>
{% for submission in page_obj %}
<tr class="{% if submission.status == 'AC' %}success
{% elif submission.status == 'WA' or submission.status == 'MLE' or submission.status == 'TLE' or submission.status == 'RE' or submission.status == 'CE' %}wrong
{% elif submission.status == 'WJ' %}waiting
{% endif %}">
<td>{{ submission.id }}</td>
<tr
class="
{% if submission.status == 'AC' %}
success
{% elif submission.status == 'WJ' %}
waiting
{% else %}
wrong
{% endif %}
">
<td>{{ submission.id }}</td>
<td>
<a href="{% url 'users:profile' submission.author.username %}">
{{ submission.author.username }}
Expand Down

0 comments on commit bdb28ac

Please sign in to comment.