Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Damien Broqua
e321691daf #99 - Affichage des statistiques : rien ne va plus ! 2025-03-29 11:17:21 +01:00
Damien Broqua
b0dc6d820d #94 - Page affichée après la connexion 2025-03-28 11:02:56 +01:00
3 changed files with 56 additions and 38 deletions

View file

@ -1,5 +1,9 @@
@import '../node_modules/knacss/sass/knacss.scss';
table {
table-layout: unset;
}
// SPÉCIFIQUE AU SITE
@import './fonts';
@import './colors';

View file

@ -57,7 +57,7 @@ router
}
return res.redirect(url);
}
return res.redirect("/");
return res.redirect("/ma-collection");
}
);
@ -79,7 +79,7 @@ if (registrationOpen) {
try {
await Auth.register(req);
res.redirect("/");
res.redirect("/ajouter-un-album");
} catch (err) {
res.redirect("/inscription");
}

View file

@ -1,17 +1,18 @@
<main class="layout-maxed ma-collection-details" id="ma-collection-statistiques">
<!-- <main class="layout-maxed ma-collection-details" id="ma-collection-statistiques"> -->
<main class="layout-maxed collection" id="mon-compte">
<h1>
Mes statistiques
</h1>
<div class="grid grid-cols-1 md:grid-cols-2 gap-10 mb-10">
<div class="md:col-span-2 box">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-10 mb-10">
<div class="md:col-span-2 lg:col-span-3 box">
<h2>Mon top 10</h2>
<table>
<thead>
<tr>
<th style="width: 60px;"></th>
<th></th>
<th>Artiste</th>
<th style="width: 100px;">Albums</th>
<th>Albums</th>
</tr>
</thead>
<tbody>
@ -41,28 +42,41 @@
<canvas id="byFormats"></canvas>
</div>
<div><!-- histoire de faire un break --></div>
<div class="box">
<div class="box col-span-full">
<h2><%= page.currentYear.year %> (<%= page.currentYear.total %> ajout<%= page.currentYear.total > 1 ? 's' : '' %>)</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-10">
<div>
<h3>Genres</h3>
<canvas id="currentYearGenres"></canvas>
</div>
<div>
<h3>Styles</h3>
<canvas id="currentYearStyles"></canvas>
</div>
<div>
<h3>Formats</h3>
<canvas id="currentYearFormats"></canvas>
</div>
<div class="box">
</div>
</div>
<div class="box col-span-full">
<h2><%= page.lastYear.year %> (<%= page.lastYear.total %> ajout<%= page.lastYear.total > 1 ? 's' : '' %>)</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-10">
<div>
<h3>Genres</h3>
<canvas id="lastYearGenres"></canvas>
</div>
<div>
<h3>Styles</h3>
<canvas id="lastYearStyles"></canvas>
</div>
<div>
<h3>Formats</h3>
<canvas id="lastYearFormats"></canvas>
</div>
</div>
</div>
</div>
</main>
<script>