From f11d4b4f365634feebcb04bc414cc1615c60ceef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 22 Feb 2020 19:51:28 +0100 Subject: [PATCH] include direct links to latest posts on homepage --- chloro/phyll/static/css/style.scss | 15 +++++++++++++++ chloro/phyll/templates/phyll/home.html | 11 +++++++++++ chloro/phyll/views.py | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/chloro/phyll/static/css/style.scss b/chloro/phyll/static/css/style.scss index 63526ef..bce2e84 100644 --- a/chloro/phyll/static/css/style.scss +++ b/chloro/phyll/static/css/style.scss @@ -154,5 +154,20 @@ main { font-size: 60%; } } +} +.older.post-list { + margin: 5em 0 2em 0; + padding: 1em 0; + border-top: 0.1em dotted $link-color; + border-bottom: 0.1em dotted $link-color; + line-height: 200%; + li { + display: inline; + a { + padding-top: 0; + display: inline; + font-size: 120%; + } + } } diff --git a/chloro/phyll/templates/phyll/home.html b/chloro/phyll/templates/phyll/home.html index 42eb410..4688d5f 100644 --- a/chloro/phyll/templates/phyll/home.html +++ b/chloro/phyll/templates/phyll/home.html @@ -4,6 +4,7 @@ {% block body %} +{% with posts.0 as latest %}

{{ latest.title }}

{{ latest.creation_timestamp|date:"j E Y, H:i"|lower }}
@@ -11,6 +12,16 @@ {{ latest.text|safe }}
+{% endwith %} + +
+ +