aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/poem-panel.html10
-rw-r--r--templates/poem.html9
-rw-r--r--templates/poetry.html13
3 files changed, 32 insertions, 0 deletions
diff --git a/templates/poem-panel.html b/templates/poem-panel.html
new file mode 100644
index 0000000..3359578
--- /dev/null
+++ b/templates/poem-panel.html
@@ -0,0 +1,10 @@
+<div
+ style="top: {{ self::thread_rng().gen_range(-jiggle..=jiggle) }}vw; left: {{ self::thread_rng().gen_range(-4..=4) }}vw"
+ class="panel content poem">
+ {% if let Some(title) = poem.title %}<h1 class="title">{{ title }}</h1>{% endif %}
+ <h2 class="created-at">{{ poem.created_at.date_naive() }} <a href="/poetry/{{ poem.file_name }}">permalink</a>
+ </h2>
+ <div class="poem-content">
+ {{ poem.content|safe }}
+ </div>
+</div>
diff --git a/templates/poem.html b/templates/poem.html
new file mode 100644
index 0000000..589a6e4
--- /dev/null
+++ b/templates/poem.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+
+{% block content %}
+
+<div id="poem">
+ {% include "poem-panel.html" %}
+</div>
+
+{% endblock content %} \ No newline at end of file
diff --git a/templates/poetry.html b/templates/poetry.html
new file mode 100644
index 0000000..8c51cff
--- /dev/null
+++ b/templates/poetry.html
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+
+{% block nav_poetry %}active{% endblock %}
+
+{% block content %}
+
+<div id="poems">
+ {% for poem in poems %}
+ {% include "poem-panel.html" %}
+ {% endfor %}
+</div>
+
+{% endblock content %} \ No newline at end of file