aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2024-01-31 22:12:02 +0000
committerLibravatar cel 🌸 <cel@blos.sm>2024-01-31 22:12:02 +0000
commitf38aaecc9a6abed226648417338baff032be8187 (patch)
tree45406cfec64fcbeba93dc0718bd2fb1348984f37 /templates
parentb6b6b083d0e41ca64ef09f52120ca8a07d925b56 (diff)
downloadblossom-f38aaecc9a6abed226648417338baff032be8187.tar.gz
blossom-f38aaecc9a6abed226648417338baff032be8187.tar.bz2
blossom-f38aaecc9a6abed226648417338baff032be8187.zip
add random-poem panel
Diffstat (limited to 'templates')
-rw-r--r--templates/home.html1
-rw-r--r--templates/random-poem.html11
2 files changed, 12 insertions, 0 deletions
diff --git a/templates/home.html b/templates/home.html
index 540abce..7bbed9e 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -46,6 +46,7 @@
<div class="panel" style="background-color: #b52f6a; z-index: -1; font-family: 'Terminal Grotesque'; font-size: 2em">
latest update: added poetry!</div>
{% include "latestposts.html" %}
+ {% include "random-poem.html" %}
</aside>
diff --git a/templates/random-poem.html b/templates/random-poem.html
new file mode 100644
index 0000000..bdfbaff
--- /dev/null
+++ b/templates/random-poem.html
@@ -0,0 +1,11 @@
+{% if let Some(poem) = poem %}
+<div class="panel" id="random-poem">
+ <h2>random poem</h2>
+ <a href="/poetry/{{ poem.file_name }}">
+ <h3>{% if let Some(title) = poem.title %}{{ title }}{% else %}permalink{% endif %}</h3>
+ </a>
+ <div class="poem-content">
+ {{ poem.content|safe }}
+ </div>
+</div>
+{% endif %} \ No newline at end of file