summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannick <[email protected]>2024-05-02 10:53:42 +0200
committerJannick <[email protected]>2024-05-02 10:53:42 +0200
commitce74a2c562a2d2f03a4fe1cf95316096676ebbb6 (patch)
tree25f67e6adf20be6262bf997c9e2970f7ed8406f0
parentde9b1edd68b94700d5a8ff65eeef3ecede7c907a (diff)
Added leaderboard page
Added a button on the navbar, that'll take you to the leaderboard page. Added leaderboards.html as well as leaderboards.css
-rw-r--r--static/styles/leaderboards.css20
-rw-r--r--views/base.html1
-rw-r--r--views/leaderboards.html26
3 files changed, 47 insertions, 0 deletions
diff --git a/static/styles/leaderboards.css b/static/styles/leaderboards.css
new file mode 100644
index 0000000..a7db6f8
--- /dev/null
+++ b/static/styles/leaderboards.css
@@ -0,0 +1,20 @@
+.leaderboard{
+ width: 100%;
+}
+
+.top_row {
+ background-color: #6e1818;
+ text-align: left;
+}
+
+.row {
+ height: 50px;
+}
+
+.data {
+ background-color: #1c1c1c;
+}
+
+.wrapper {
+ text-align: center;
+} \ No newline at end of file
diff --git a/views/base.html b/views/base.html
index 13ac5ab..556a777 100644
--- a/views/base.html
+++ b/views/base.html
@@ -14,6 +14,7 @@
<ul class="navbar__links" role="navigation" aria-label="Main">
<li><a class="navbar__location" href="/index.html">About us</a></li>
<li><a class="navbar__location" href="/history.html">History</a></li>
+ <li><a class="navbar__location" href="/leaderboards.html">Leaderboards</a></li>
{% if not logged_in %}
<li><a class="navbar__location" href="/login">Log in</a></li>
<li><a class="navbar__location" href="/join_intro.html">Join</a></li>
diff --git a/views/leaderboards.html b/views/leaderboards.html
new file mode 100644
index 0000000..2e64c55
--- /dev/null
+++ b/views/leaderboards.html
@@ -0,0 +1,26 @@
+{% extends "base.html" %}
+
+{% block head %}
+ <link rel="stylesheet" href="/styles/leaderboards.css">
+{% endblock %}
+
+{% block content %}
+ <div class="wrapper">
+ <h1>Leaderboard</h1>
+ <p>You can swap leadboard using the dropdown (not implemented)</p>
+ </div>
+ <table class="leaderboard" cellspacing="0">
+ <tr class="top_row row">
+ <th>Character name</th>
+ <th>Time in guild</th>
+ <th>Ranking</th>
+ </tr>
+ {% for character in all_members %}
+ <tr class="row">
+ <td class="data">{{ character[0] }}</td>
+ <td class="data">{{ character[1] }}</td>
+ <td class="data">{{ character[2] }}</td>
+ </tr>
+ {% endfor %}
+ </table>
+{% endblock %} \ No newline at end of file