Changes after linting
This commit is contained in:
parent
5ad0e52787
commit
f2b08cd1cd
|
@ -6,7 +6,7 @@ RUN npm install && \
|
|||
|
||||
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
|
||||
|
||||
RUN useradd --create-home --uid 1000 timetracker
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" enctype="multipart/form-data" class="mx-auto">
|
||||
{% csrf_token %}
|
||||
<form method="post" enctype="multipart/form-data" class="mx-auto">
|
||||
{% csrf_token %}
|
||||
|
||||
{{ form.as_p }}
|
||||
{{ form.as_p }}
|
||||
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
<input type="submit" value="Submit"/>
|
||||
</form>
|
||||
{% endblock content %}
|
|
@ -1,46 +1,48 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
{% load static %}
|
||||
{% load static %}
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Timetracker - {% block title %}Untitled{% endblock title %}</title>
|
||||
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
||||
<link rel="stylesheet" href="{% static 'base.css' %}" />
|
||||
</head>
|
||||
<head>
|
||||
<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>
|
||||
<link rel="stylesheet" href="https://rsms.me/inter/inter.css"/>
|
||||
<link rel="stylesheet" href="{% static 'base.css' %}" />
|
||||
</head>
|
||||
|
||||
<body class="dark">
|
||||
<div class="dark:bg-gray-800 min-h-screen">
|
||||
<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">
|
||||
<a href="{% url 'index' %}" class="flex items-center">
|
||||
<span class="text-4xl">⌚</span>
|
||||
<span class="self-center text-xl font-semibold whitespace-nowrap text-white">Timetracker</span>
|
||||
</a>
|
||||
<div class="w-full md:block md:w-auto">
|
||||
<ul
|
||||
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_platform' %}">New Platform</a></li>
|
||||
{% 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>
|
||||
{% endif %}
|
||||
{% if purchase_available %}
|
||||
<li><a class="block py-2 pl-3 pr-4 hover:underline" href="{% url 'add_session' %}">New Session</a></li>
|
||||
{% endif %}
|
||||
{% if session_count > 0 %}
|
||||
<li><a class="block py-2 pl-3 pr-4 hover:underline" href="{% url 'list_sessions' %}">All Sessions</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<body class="dark">
|
||||
<div class="dark:bg-gray-800 min-h-screen">
|
||||
<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">
|
||||
<a href="{% url 'index' %}" class="flex items-center">
|
||||
<span class="text-4xl">⌚</span>
|
||||
<span class="self-center text-xl font-semibold whitespace-nowrap text-white">Timetracker</span>
|
||||
</a>
|
||||
<div class="w-full md:block md:w-auto">
|
||||
<ul
|
||||
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_platform' %}">New Platform</a></li>
|
||||
{% 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>
|
||||
{% endif %}
|
||||
{% if purchase_available %}
|
||||
<li><a class="block py-2 pl-3 pr-4 hover:underline" href="{% url 'add_session' %}">New Session</a></li>
|
||||
{% endif %}
|
||||
{% if session_count > 0 %}
|
||||
<li><a class="block py-2 pl-3 pr-4 hover:underline" href="{% url 'list_sessions' %}">All Sessions</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% block content %}No content here.{% endblock %}
|
||||
</div>
|
||||
{% load version %}
|
||||
<span class="fixed left-2 bottom-2 text-xs text-slate-300 dark:text-slate-600">{% version %} ({% version_date %})</span>
|
||||
</body>
|
||||
</nav>
|
||||
{% block content %}No content here.{% endblock content %}
|
||||
</div>
|
||||
{% load version %}
|
||||
<span class="fixed left-2 bottom-2 text-xs text-slate-300 dark:text-slate-600">{% version %} ({% version_date %})</span>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,17 +1,17 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="text-slate-300 mx-auto max-w-screen-lg text-center">
|
||||
{% if session_count > 0 %}
|
||||
You have played a total of {{ session_count }} sessions for a total of {{ total_duration }}.
|
||||
{% elif not game_available or not platform_available %}
|
||||
There are no games in the database. Start by clicking "New Game" and "New Platform".
|
||||
{% elif not purchase_available %}
|
||||
There are no owned games. Click "New Purchase" at the top.
|
||||
{% else %}
|
||||
You haven't played any games yet. Click "New Session" to add one now.
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="text-slate-300 mx-auto max-w-screen-lg text-center">
|
||||
{% if session_count > 0 %}
|
||||
You have played a total of {{ session_count }} sessions for a total of {{ total_duration }}.
|
||||
{% elif not game_available or not platform_available %}
|
||||
There are no games in the database. Start by clicking "New Game" and "New Platform".
|
||||
{% elif not purchase_available %}
|
||||
There are no owned games. Click "New Purchase" at the top.
|
||||
{% else %}
|
||||
You haven't played any games yet. Click "New Session" to add one now.
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock content %}
|
Loading…
Reference in New Issue