Skip to content

Commit

Permalink
End of file fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
VemAak committed Nov 6, 2024
1 parent 9bb847c commit 7a45eb3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 12 deletions.
21 changes: 13 additions & 8 deletions static/css/front_page.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,25 @@
grid-template-areas:
"main-article main-article social"
"upcoming-events-1 upcoming-events-2 leaderboard"
"latest-podcast latest-nablad poll"
"more-news-1 more-news-2 more-news-3"
"more-news-4 more-news-5 more-news-6"
"latest-podcast latest-nablad office"
"poll more-news-1 more-news-2"
"more-news-3 more-news-4 more-news-5"
"more-news-btn more-news-btn more-news-btn"
"sponsors sponsors suggestions";
}

/* This is to not have more-news-6 show up when leaderboard is used.*/
.maingrid-container-authenticated > .more-news-6 {
display: none;
}

@media (max-width: 1000px) {
.maingrid-container {
grid-template-columns: minmax(0, 1fr);
grid-template-areas:
"welcome"
"main-article"
"leaderboard"
"social"
"upcoming-events-1"
"upcoming-events-2"
"office"
Expand Down Expand Up @@ -108,6 +113,10 @@
grid-area: leaderboard;
}

.social {
grid-area: social;
}

.more-news-1 {
grid-area: more-news-1;
}
Expand Down Expand Up @@ -162,10 +171,6 @@
grid-area: poll;
}

.leaderboard {
grid-area: leaderboard;
}

.latest-podcast {
grid-area: latest-podcast;
}
Expand Down
26 changes: 22 additions & 4 deletions templates/includes/bedpres_leaderboard.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
<style>
.leaderboard {
border-collapse: collapse;
width: 100%;
height: 100%;
}

th, td {
padding: 8px;
text-align: left;
border-bottom: 1px solid #ddd;
}
</style>

<div class="leaderboard d-flex flex-column">
{% if logged_in %} <!-- Makes it so that leaderboard does not show up when not logged in -->
<h5 class="nabla-frontpage-header">
Bedpres leaderboard
</h5> <!-- Ren kok fra code_golf.html -->
<table style="width:100%">
<tr><th>Bruker</th><th>Antall Bedpres</th></tr>
</h5>
<div class="card flex-grow-1 border border-nabla-blue">
<table class="leaderboard">
<tr><th>Bruker</th><th>Antall Bedpres</th></tr>
{% for t in bedpres_leaderboard %}
<tr>
<td>{{t.first_name}} {{t.last_name}}</td>
<td>{{t.num_bedpres}}</td> <!-- TODO: hva skal stå her istedenfor length???, Funker dette egentlig? -->
<td style="text-align:center">{{t.num_bedpres}}</td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
</div>

0 comments on commit 7a45eb3

Please sign in to comment.