summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2022-01-27 10:29:07 +0100
committerDaniel Weipert <code@drogueronin.de>2022-01-27 10:29:07 +0100
commit27a1680fe386db99fd983eba64533091b9451d27 (patch)
treecb0eb55fb281c9af492b587399f895400ea1c2da /templates
parent10c86197f1f63e222dfc9e937911e35ab500a208 (diff)
Add layout to home route
Diffstat (limited to 'templates')
-rw-r--r--templates/home.twig28
-rw-r--r--templates/root.twig8
2 files changed, 24 insertions, 12 deletions
diff --git a/templates/home.twig b/templates/home.twig
index d4e86ed..47aebde 100644
--- a/templates/home.twig
+++ b/templates/home.twig
@@ -1,14 +1,24 @@
+{% extends 'base.twig' %}
+
+{% block main %}
<h3>Home</h3>
-<form action="/card/add" method="post" enctype="multipart/form-data">
- {% for key, field in fields %}
+<pre>
+{{ dump(debug) }}
+</pre>
+
+<section class="content">
+ <form action="/card/add" method="post" enctype="multipart/form-data">
+ {% for key, field in fields %}
+ <label>
+ {{ key }} <input type="text" name="{{ field }}">
+ </label>
+ {% endfor %}
<label>
- {{ key }} <input type="text" name="{{ field }}">
+ Image <input type="file" name="images[]" multiple>
</label>
- {% endfor %}
- <label>
- Image <input type="file" name="images[]" multiple>
- </label>
- <input type="submit" value="Hinzufügen">
-</form>
+ <input type="submit" value="Hinzufügen">
+ </form>
+</section>
+{% endblock %}
diff --git a/templates/root.twig b/templates/root.twig
index 8be64dd..b901ffb 100644
--- a/templates/root.twig
+++ b/templates/root.twig
@@ -1,11 +1,13 @@
-<html> <link rel="/favicon.ico" href="#">
-
+<!doctype html>
+<html>
<head>
<title>Elements</title>
+ <link rel="icon" href="/favicon.ico">
{% block css %}{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
{% block js %}{% endblock %}
</body>
-</html> \ No newline at end of file
+</html>
+