timetracker/games/templates/view_game.html

42 lines
1.8 KiB
HTML
Raw Normal View History

2023-10-01 19:28:02 +00:00
{% extends "base.html" %}
{% block title %}{{ title }}{% endblock title %}
{% load static %}
{% block content %}
<div class="dark:text-white max-w-sm sm:max-w-xl lg:max-w-3xl mx-auto">
<h1 class="text-4xl">{{ game.name }} (#{{ game.pk }})</h1>
<h2 class="text-lg my-2 ml-2">{{ total_playtime }} ({{ first_session.timestamp_start | date:"M Y"}} — {{ last_session.timestamp_start | date:"M Y"}}) </h2>
2023-10-01 19:28:02 +00:00
<hr class="border-slate-500">
<h1 class="text-3xl mt-4 mb-1">Editions</h1>
<ul>
{% for edition in editions %}
<li class="sm:pl-2">
{{ edition.name }} ({{ edition.platform }}, {{ edition.year_released }})
{% if edition.wikidata %}
<span class="hidden sm:inline">
<a href="https://www.wikidata.org/wiki/{{ edition.wikidata }}">
<img class="inline mx-2 w-6" src="{% static 'icons/wikidata.png' %}"/>
</a>
</span>
{% endif %}
</li>
{% endfor %}
</ul>
<h1 class="text-3xl mt-4 mb-1">Purchases</h1>
<ul>
{% for purchase in purchases %}
<li class="sm:pl-2">{{ purchase.platform }} ({{ purchase.get_ownership_type_display }}, {{ purchase.date_purchased | date:"Y" }}, {{ purchase.price }} {{ purchase.price_currency}})</li>
{% endfor %}
</ul>
<h1 class="text-3xl mt-4 mb-1">Sessions</h1>
<ul>
{% for session in sessions %}
2023-10-01 19:51:32 +00:00
<li class="sm:pl-2">{{ session.timestamp_start | date:"d/m/Y" }} ({{ session.device.get_type_display | default:"Unknown" }}, {{ session.duration_formatted }})</li>
2023-10-01 19:28:02 +00:00
{% endfor %}
</ul>
</div>
{% endblock content %}