Changes after linting

This commit is contained in:
Lukáš Kucharczyk 2023-01-05 22:05:26 +01:00
parent 5ad0e52787
commit f2b08cd1cd
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
4 changed files with 59 additions and 57 deletions

View File

@ -6,7 +6,7 @@ RUN npm install && \
FROM python:3.10-slim-bullseye FROM python:3.10-slim-bullseye
ENV VERSION_NUMBER 0.1.0-39-gf7ec079 ENV VERSION_NUMBER 0.1.0-40-g5ad0e52
ENV PROD 1 ENV PROD 1
RUN useradd --create-home --uid 1000 timetracker RUN useradd --create-home --uid 1000 timetracker

View File

@ -1,13 +1,13 @@
{% extends 'base.html' %} {% extends "base.html" %}
{% block title %}{{ title }}{% endblock title %} {% block title %}{{ title }}{% endblock title %}
{% block content %} {% block content %}
<form method="POST" enctype="multipart/form-data" class="mx-auto"> <form method="post" enctype="multipart/form-data" class="mx-auto">
{% csrf_token %} {% csrf_token %}
{{ form.as_p }} {{ form.as_p }}
<input type="submit" value="Submit"> <input type="submit" value="Submit"/>
</form> </form>
{% endblock content %} {% endblock content %}

View File

@ -1,46 +1,48 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
{% load static %} {% load static %}
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="Self-hosted time-tracker."/>
<title>Timetracker - {% block title %}Untitled{% endblock title %}</title> <meta name="keywords" content="time, tracking, video games, self-hosted"/>
<link rel="stylesheet" href="https://rsms.me/inter/inter.css"> <meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="{% static 'base.css' %}" /> <title>Timetracker - {% block title %}Untitled{% endblock title %}</title>
</head> <link rel="stylesheet" href="https://rsms.me/inter/inter.css"/>
<link rel="stylesheet" href="{% static 'base.css' %}" />
</head>
<body class="dark"> <body class="dark">
<div class="dark:bg-gray-800 min-h-screen"> <div class="dark:bg-gray-800 min-h-screen">
<nav class="mb-4 bg-white dark:bg-gray-900 border-gray-200 rounded"> <nav class="mb-4 bg-white dark:bg-gray-900 border-gray-200 rounded">
<div class="container flex flex-wrap items-center justify-between mx-auto"> <div class="container flex flex-wrap items-center justify-between mx-auto">
<a href="{% url 'index' %}" class="flex items-center"> <a href="{% url 'index' %}" class="flex items-center">
<span class="text-4xl"></span> <span class="text-4xl"></span>
<span class="self-center text-xl font-semibold whitespace-nowrap text-white">Timetracker</span> <span class="self-center text-xl font-semibold whitespace-nowrap text-white">Timetracker</span>
</a> </a>
<div class="w-full md:block md:w-auto"> <div class="w-full md:block md:w-auto">
<ul <ul
class="flex flex-col md:flex-row p-4 mt-4 dark:text-white"> class="flex flex-col md:flex-row p-4 mt-4 dark:text-white">
<li><a class="block py-2 pl-3 pr-4 hover:underline" href="{% url 'add_game' %}">New Game</a></li> <li><a class="block py-2 pl-3 pr-4 hover:underline" href="{% url 'add_game' %}">New Game</a></li>
<li><a class="block py-2 pl-3 pr-4 hover:underline" href="{% url 'add_platform' %}">New Platform</a></li> <li><a class="block py-2 pl-3 pr-4 hover:underline" href="{% url 'add_platform' %}">New Platform</a></li>
{% if game_available and platform_available %} {% if game_available and platform_available %}
<li><a class="block py-2 pl-3 pr-4 hover:underline" href="{% url 'add_purchase' %}">New Purchase</a></li> <li><a class="block py-2 pl-3 pr-4 hover:underline" href="{% url 'add_purchase' %}">New Purchase</a></li>
{% endif %} {% endif %}
{% if purchase_available %} {% if purchase_available %}
<li><a class="block py-2 pl-3 pr-4 hover:underline" href="{% url 'add_session' %}">New Session</a></li> <li><a class="block py-2 pl-3 pr-4 hover:underline" href="{% url 'add_session' %}">New Session</a></li>
{% endif %} {% endif %}
{% if session_count > 0 %} {% if session_count > 0 %}
<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 'list_sessions' %}">All Sessions</a></li>
{% endif %} {% endif %}
</ul> </ul>
</div>
</div> </div>
</div> </nav>
</nav> {% block content %}No content here.{% endblock content %}
{% block content %}No content here.{% endblock %} </div>
</div> {% load version %}
{% load version %} <span class="fixed left-2 bottom-2 text-xs text-slate-300 dark:text-slate-600">{% version %} ({% version_date %})</span>
<span class="fixed left-2 bottom-2 text-xs text-slate-300 dark:text-slate-600">{% version %} ({% version_date %})</span> </body>
</body>
</html> </html>

View File

@ -1,17 +1,17 @@
{% extends 'base.html' %} {% extends "base.html" %}
{% block title %}{{ title }}{% endblock title %} {% block title %}{{ title }}{% endblock title %}
{% block content %} {% block content %}
<div class="text-slate-300 mx-auto max-w-screen-lg text-center"> <div class="text-slate-300 mx-auto max-w-screen-lg text-center">
{% if session_count > 0 %} {% if session_count > 0 %}
You have played a total of {{ session_count }} sessions for a total of {{ total_duration }}. You have played a total of {{ session_count }} sessions for a total of {{ total_duration }}.
{% elif not game_available or not platform_available %} {% elif not game_available or not platform_available %}
There are no games in the database. Start by clicking "New Game" and "New Platform". There are no games in the database. Start by clicking "New Game" and "New Platform".
{% elif not purchase_available %} {% elif not purchase_available %}
There are no owned games. Click "New Purchase" at the top. There are no owned games. Click "New Purchase" at the top.
{% else %} {% else %}
You haven't played any games yet. Click "New Session" to add one now. You haven't played any games yet. Click "New Session" to add one now.
{% endif %} {% endif %}
</div> </div>
{% endblock content %} {% endblock content %}