From 41a8cb58365dcf382bbbd6f68483ce2fa507261c Mon Sep 17 00:00:00 2001
From: bronsen <kontakt+gitcommit@nrrd.de>
Date: Sat, 15 Mar 2025 13:27:19 +0100
Subject: [PATCH] [collector] templates now render html5

closes #6
---
 collector/templates/collector/base.html   | 14 ++++++++++++++
 collector/templates/collector/detail.html | 20 +++++++++++++++++++-
 collector/templates/collector/index.html  | 18 ++++++++++++++++--
 3 files changed, 49 insertions(+), 3 deletions(-)
 create mode 100644 collector/templates/collector/base.html

diff --git a/collector/templates/collector/base.html b/collector/templates/collector/base.html
new file mode 100644
index 0000000..da95fa5
--- /dev/null
+++ b/collector/templates/collector/base.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <title>Teilchensammler</title>
+    <!-- <link href="css/style.css" rel="stylesheet"> -->
+  </head>
+  <body>
+    {% block content %}
+
+    {% endblock content %}
+  </body>
+</html>
diff --git a/collector/templates/collector/detail.html b/collector/templates/collector/detail.html
index 898dd8f..d78c2f0 100644
--- a/collector/templates/collector/detail.html
+++ b/collector/templates/collector/detail.html
@@ -1,2 +1,20 @@
+{% extends "collector/base.html" %}
+
+{% block content %}
+
 <h1>[{{ teil.id }}] {{ teil.name }}</h1>
-Last Changed: {{ teil.modified }}
+Last Changed: {{ teil.modified | date:"Y-m-d H:i:s e" }}
+
+<p>
+See the <a href="{% url "collector:list" %}">{{ default_teile_number }} most recent Teile</a>.
+</p>
+
+<p>
+See <a href="{% url "collector:list-all" %}"> ALL the Teile in the database</a>.
+</p>
+
+<p>
+<a href="{% url "collector:list" %}">home</a>
+</p>
+
+{% endblock content %}
diff --git a/collector/templates/collector/index.html b/collector/templates/collector/index.html
index 4611dff..ec294a8 100644
--- a/collector/templates/collector/index.html
+++ b/collector/templates/collector/index.html
@@ -1,3 +1,7 @@
+{% extends "collector/base.html" %}
+
+{% block content %}
+
 {% if teile_list %}
 
   <ul>
@@ -5,14 +9,14 @@
     <li>
       <a href="{% url 'collector:detail' teil.id %}">
         <strong>[{{ teil.id }}]</strong> {{ teil.name }}
-      </a> ({{ teil.modified }})
+      </a> ({{ teil.modified | date:"Y-m-d H:i:s e" }})
     </li>
     {% endfor %}
   </ul>
 
 {% else %}
 
-  <p>Keine Teile da.</p>
+  <p>Noch keine Teile da.</p>
 
 {% endif %}
 
@@ -21,3 +25,13 @@
   <input type="text" name="new_name" value="">
   <input type="submit" name="submit" value="add new Teil">
 </form>
+
+<p>
+See <a href="{% url "collector:list-all" %}">ALL the Teile in the dabase</a>.
+</p>
+
+<p>
+<a href="{% url "collector:list" %}">home</a>
+</p>
+
+{% endblock content %}