2024-01-10 13:10:13 +00:00
|
|
|
{% load django_htmx %}
|
2023-11-17 20:06:57 +00:00
|
|
|
<!DOCTYPE html>
|
2022-12-31 13:18:27 +00:00
|
|
|
<html lang="en">
|
2023-01-05 21:05:26 +00:00
|
|
|
{% load static %}
|
|
|
|
<head>
|
2023-11-17 20:06:57 +00:00
|
|
|
<meta charset="utf-8" />
|
|
|
|
<meta name="description" content="Self-hosted time-tracker." />
|
|
|
|
<meta name="keywords" content="time, tracking, video games, self-hosted" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<title>Timetracker -
|
|
|
|
{% block title %}
|
|
|
|
Untitled
|
|
|
|
{% endblock title %}
|
|
|
|
</title>
|
2023-09-20 16:54:54 +00:00
|
|
|
<script src="{% static 'js/htmx.min.js' %}"></script>
|
2024-01-10 13:10:13 +00:00
|
|
|
{% django_htmx_script %}
|
2023-01-05 21:05:26 +00:00
|
|
|
<link rel="stylesheet" href="{% static 'base.css' %}" />
|
2024-07-09 21:03:03 +00:00
|
|
|
<script src="https://cdn.jsdelivr.net/npm/flowbite@2.4.1/dist/flowbite.min.js"></script>
|
2023-01-05 21:05:26 +00:00
|
|
|
</head>
|
2023-11-28 13:29:56 +00:00
|
|
|
<body class="dark" hx-indicator="#indicator">
|
2023-11-17 20:06:57 +00:00
|
|
|
<img id="indicator"
|
2024-04-04 09:27:33 +00:00
|
|
|
src="{% static 'icons/loading.png' %}"
|
|
|
|
class="absolute right-3 top-3 animate-spin htmx-indicator"
|
|
|
|
height="24"
|
|
|
|
width="24"
|
|
|
|
alt="loading indicator" />
|
2024-02-10 08:50:53 +00:00
|
|
|
<div class="flex flex-col min-h-screen">
|
|
|
|
<nav class="dark:bg-gray-900 border-gray-200 h-24 flex items-center">
|
2023-01-05 21:05:26 +00:00
|
|
|
<div class="container flex flex-wrap items-center justify-between mx-auto">
|
2023-01-30 21:16:28 +00:00
|
|
|
<a href="{% url 'list_sessions_recent' %}" class="flex items-center">
|
2023-11-17 20:06:57 +00:00
|
|
|
<span class="text-4xl">
|
2023-11-28 13:29:11 +00:00
|
|
|
<img src="{% static 'icons/schedule.png' %}"
|
2024-04-04 09:27:33 +00:00
|
|
|
height="48"
|
|
|
|
width="48"
|
|
|
|
alt="Timetracker Logo"
|
|
|
|
class="mr-4" />
|
2023-11-17 20:06:57 +00:00
|
|
|
</span>
|
2023-01-05 21:05:26 +00:00
|
|
|
<span class="self-center text-xl font-semibold whitespace-nowrap text-white">Timetracker</span>
|
|
|
|
</a>
|
|
|
|
<div class="w-full md:block md:w-auto">
|
2023-11-17 20:06:57 +00:00
|
|
|
<ul class="flex flex-col md:flex-row p-4 mt-4 dark:text-white">
|
2023-11-02 08:52:42 +00:00
|
|
|
<li class="relative group">
|
2024-02-10 08:48:09 +00:00
|
|
|
{% if user.is_authenticated %}
|
2024-02-10 08:50:53 +00:00
|
|
|
<a class="block py-2 pl-3 pr-4 hover:underline"
|
2024-04-04 09:27:33 +00:00
|
|
|
href="{% url 'add_game' %}">New</a>
|
2024-02-10 08:50:53 +00:00
|
|
|
<ul class="absolute hidden text-gray-700 pt-1 group-hover:block w-auto whitespace-nowrap">
|
|
|
|
{% if purchase_available %}
|
|
|
|
<li>
|
|
|
|
<a class="bg-gray-200 hover:bg-gray-400 py-2 px-4 block whitespace-no-wrap"
|
2024-04-04 09:27:33 +00:00
|
|
|
href="{% url 'add_device' %}">Device</a>
|
2024-02-10 08:50:53 +00:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
2023-11-17 20:06:57 +00:00
|
|
|
<li>
|
|
|
|
<a class="bg-gray-200 hover:bg-gray-400 py-2 px-4 block whitespace-no-wrap"
|
2024-04-04 09:27:33 +00:00
|
|
|
href="{% url 'add_game' %}">Game</a>
|
2023-11-17 20:06:57 +00:00
|
|
|
</li>
|
2024-02-10 08:50:53 +00:00
|
|
|
{% if game_available and platform_available %}
|
|
|
|
<li>
|
|
|
|
<a class="bg-gray-200 hover:bg-gray-400 py-2 px-4 block whitespace-no-wrap"
|
2024-04-04 09:27:33 +00:00
|
|
|
href="{% url 'add_edition' %}">Edition</a>
|
2024-02-10 08:50:53 +00:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
2023-11-17 20:06:57 +00:00
|
|
|
<li>
|
|
|
|
<a class="bg-gray-200 hover:bg-gray-400 py-2 px-4 block whitespace-no-wrap"
|
2024-04-04 09:27:33 +00:00
|
|
|
href="{% url 'add_platform' %}">Platform</a>
|
2023-11-17 20:06:57 +00:00
|
|
|
</li>
|
2024-02-10 08:50:53 +00:00
|
|
|
{% if edition_available %}
|
|
|
|
<li>
|
|
|
|
<a class="bg-gray-200 hover:bg-gray-400 py-2 px-4 block whitespace-no-wrap"
|
2024-04-04 09:27:33 +00:00
|
|
|
href="{% url 'add_purchase' %}">Purchase</a>
|
2024-02-10 08:50:53 +00:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if purchase_available %}
|
|
|
|
<li>
|
|
|
|
<a class="bg-gray-200 hover:bg-gray-400 py-2 px-4 block whitespace-no-wrap"
|
2024-04-04 09:27:33 +00:00
|
|
|
href="{% url 'add_session' %}">Session</a>
|
2024-02-10 08:50:53 +00:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
</ul>
|
2024-08-08 12:47:51 +00:00
|
|
|
</li>
|
|
|
|
{% if session_count > 0 %}
|
|
|
|
<li class="relative group">
|
|
|
|
<a class="block py-2 pl-3 pr-4 hover:underline"
|
|
|
|
href="{% url 'stats_by_year' 0 %}">Stats</a>
|
|
|
|
<ul class="absolute hidden text-gray-700 pt-1 group-hover:block">
|
|
|
|
<li>
|
|
|
|
<a class="bg-gray-200 hover:bg-gray-400 py-2 px-4 block whitespace-no-wrap"
|
|
|
|
href="{% url 'stats_by_year' 0 %}">Overall</a>
|
|
|
|
</li>
|
|
|
|
{% for year in stats_dropdown_year_range %}
|
2024-08-04 20:40:37 +00:00
|
|
|
<li>
|
|
|
|
<a class="bg-gray-200 hover:bg-gray-400 py-2 px-4 block whitespace-no-wrap"
|
2024-08-08 12:47:51 +00:00
|
|
|
href="{% url 'stats_by_year' year %}">{{ year }}</a>
|
2024-08-04 20:40:37 +00:00
|
|
|
</li>
|
2024-08-08 12:47:51 +00:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a class="block py-2 pl-3 pr-4 hover:underline"
|
|
|
|
href="{% url 'list_sessions' %}">All Sessions</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a class="block py-2 pl-3 pr-4 hover:underline"
|
|
|
|
href="{% url 'logout' %}">Log Out</a>
|
|
|
|
</li>
|
2024-02-10 08:48:09 +00:00
|
|
|
{% endif %}
|
2024-08-08 12:47:51 +00:00
|
|
|
{% endif %}
|
|
|
|
</ul>
|
2023-01-05 21:05:26 +00:00
|
|
|
</div>
|
2023-01-03 18:03:30 +00:00
|
|
|
</div>
|
2024-08-08 12:47:51 +00:00
|
|
|
</nav>
|
2024-08-09 09:47:10 +00:00
|
|
|
<div class="flex flex-1 flex-col dark:bg-gray-800 pt-8">
|
2024-08-08 12:47:51 +00:00
|
|
|
{% block content %}
|
|
|
|
No content here.
|
|
|
|
{% endblock content %}
|
2024-02-10 08:50:53 +00:00
|
|
|
</div>
|
2024-08-08 12:47:51 +00:00
|
|
|
{% load version %}
|
|
|
|
<span class="fixed left-2 bottom-2 text-xs text-slate-300 dark:text-slate-600">{% version %} ({% version_date %})</span>
|
|
|
|
</div>
|
|
|
|
{% block scripts %}
|
|
|
|
{% endblock scripts %}
|
|
|
|
</body>
|
|
|
|
</html>
|