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

Médailles SVG #78

Merged
merged 1 commit into from
Apr 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lib/assets/icons/medaille-argent.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/lib/assets/icons/medaille-bronze.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/lib/assets/icons/medaille-or.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 8 additions & 9 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<script lang="ts">
import medailleOr from '$lib/assets/icons/medaille-or.svg';
import medailleArgent from '$lib/assets/icons/medaille-argent.svg';
import medailleBronze from '$lib/assets/icons/medaille-bronze.svg';

import Thanks from '$lib/thanks.svelte';

import { LEADERBOARD, METADATA, getDayNumber, getDepartmentName } from '$lib/utils';
Expand Down Expand Up @@ -62,13 +66,13 @@
{getDepartmentName(code)}
</a>
</th>
<td class="p-1 text-center sm:p-2" class:text-125={rank < 4}>
<td class="p-1 text-center sm:p-2">
{#if rank === 1}
<span role="img" aria-label="1">🥇</span>
<img role="img" src={medailleOr} alt="1 (médaille d’or)" class="m-auto" />
{:else if rank === 2}
<span role="img" aria-label="2">🥈</span>
<img role="img" src={medailleArgent} alt="2 (médaille d’argent)" class="m-auto" />
{:else if rank === 3}
<span role="img" aria-label="3">🥉</span>
<img role="img" src={medailleBronze} alt="3 (médaille de bronze)" class="m-auto" />
{:else}
{rank}
{/if}
Expand Down Expand Up @@ -141,11 +145,6 @@
@apply font-normal;
}

/* Agrandi les médailles */
.text-125 {
font-size: 125%;
}

/* Étend la zone cliquable du lien à toute la ligne */
.ranking-link::before {
position: absolute;
Expand Down