diff --git a/games/static/base.css b/games/static/base.css
index 07970f4..74cff7a 100644
--- a/games/static/base.css
+++ b/games/static/base.css
@@ -808,6 +808,10 @@ select {
margin-bottom: 2.5rem;
}
+.mb-2 {
+ margin-bottom: 0.5rem;
+}
+
.mb-4 {
margin-bottom: 1rem;
}
@@ -1405,6 +1409,11 @@ th label {
background-color: rgb(17 24 39 / var(--tw-bg-opacity));
}
+:is(.dark .dark\:text-slate-400) {
+ --tw-text-opacity: 1;
+ color: rgb(148 163 184 / var(--tw-text-opacity));
+}
+
:is(.dark .dark\:text-slate-500) {
--tw-text-opacity: 1;
color: rgb(100 116 139 / var(--tw-text-opacity));
diff --git a/games/templates/view_game.html b/games/templates/view_game.html
index 44b0d7a..b28cba5 100644
--- a/games/templates/view_game.html
+++ b/games/templates/view_game.html
@@ -60,34 +60,18 @@
({{ sessions.count }})
{% url 'start_game_session' game.id as add_session_link %}
{% include 'components/button.html' with title="Start new session" text="New" link=add_session_link %}
+ and Notes ({{ sessions_with_notes_count }})
+
{% for session in sessions %}
- -
- {{ session.timestamp_start | date:"d/m/Y" }}
+
-
+ {{ session.timestamp_start | date:"d/m/Y H:m" }}
({{ session.device.get_type_display | default:"Unknown" }}, {{ session.duration_formatted }})
{% url 'edit_session' session.id as edit_url %}
{% include 'components/edit_button.html' with edit_url=edit_url %}
- {% endfor %}
-
-
- Notes ({{ sessions_with_notes.count }})
-
-
- {% for session in sessions_with_notes %}
- -
-
- -
-
- {{ session.timestamp_start | date:"d/m/Y H:m" }}
- {% url 'edit_session' session.id as edit_session_url %}
- {% include 'components/edit_button.html' with edit_url=edit_session_url %}
-
-
- - {{ session.note|linebreaks }}
-
-
+ - {{ session.note|linebreaks }}
{% endfor %}
diff --git a/games/views.py b/games/views.py
index 092e480..6593173 100644
--- a/games/views.py
+++ b/games/views.py
@@ -179,7 +179,7 @@ def view_game(request, game_id=None):
"purchase_count": Purchase.objects.filter(edition__game=game).count(),
"session_average": round(total_hours / int(session_count), 1),
"session_count": session_count,
- "sessions_with_notes": sessions.exclude(note=""),
+ "sessions_with_notes_count": sessions.exclude(note="").count(),
"sessions": sessions.order_by("-timestamp_start"),
"title": f"Game Overview - {game.name}",
"hours_sum": total_hours,