From d622ddfbf3bdc0edad6947ec9904890873aa0a09 Mon Sep 17 00:00:00 2001 From: Lukas Kucharczyk Date: Sun, 4 Aug 2024 22:40:37 +0200 Subject: [PATCH] Add all-time stats --- CHANGELOG.md | 1 + games/static/base.css | 44 +------ games/templates/base.html | 6 +- games/templates/stats.html | 247 ++++++++++++++++++++----------------- games/urls.py | 2 +- games/views.py | 216 +++++++++++++++++++++++++++++++- 6 files changed, 360 insertions(+), 156 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff436bb..d52a5ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Require login by default * Add stats for dropped purchases, monthly playtimes * Allow deleting purchases +* Add all-time stats ## Improved * mark refunded purchases red on game overview diff --git a/games/static/base.css b/games/static/base.css index e09485f..7adf3d9 100644 --- a/games/static/base.css +++ b/games/static/base.css @@ -1,5 +1,5 @@ /* -! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com +! tailwindcss v3.4.7 | MIT License | https://tailwindcss.com */ /* @@ -1246,18 +1246,6 @@ input:checked + .toggle-bg { } } -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; -} - .visible { visibility: visible; } @@ -1386,10 +1374,6 @@ input:checked + .toggle-bg { margin-bottom: 2rem; } -.me-2 { - margin-inline-end: 0.5rem; -} - .ml-1 { margin-left: 0.25rem; } @@ -1451,6 +1435,10 @@ input:checked + .toggle-bg { height: 6rem; } +.h-3 { + height: 0.75rem; +} + .h-4 { height: 1rem; } @@ -1507,14 +1495,6 @@ input:checked + .toggle-bg { width: 100%; } -.min-w-14 { - min-width: 3.5rem; -} - -.max-w-24 { - max-width: 6rem; -} - .max-w-80 { max-width: 20rem; } @@ -1814,10 +1794,6 @@ input:checked + .toggle-bg { padding: 0.25rem; } -.p-2 { - padding: 0.5rem; -} - .p-2\.5 { padding: 0.625rem; } @@ -2555,11 +2531,6 @@ th label { padding-right: 1.5rem; } -.group:hover .group-hover\:py-3 { - padding-top: 0.75rem; - padding-bottom: 0.75rem; -} - .group:hover .group-hover\:py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; @@ -2733,11 +2704,6 @@ th label { --tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity)); } -.dark\:focus\:ring-blue-800:focus:is(.dark *) { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity)); -} - @media (min-width: 640px) { .sm\:inline { display: inline; diff --git a/games/templates/base.html b/games/templates/base.html index 0e24d55..bfc83de 100644 --- a/games/templates/base.html +++ b/games/templates/base.html @@ -81,8 +81,12 @@ {% if session_count > 0 %}
  • Stats + href="{% url 'stats_by_year' 0 %}">Stats