diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/home.html | 1 | ||||
-rw-r--r-- | templates/random-poem.html | 11 |
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 |