From 4a216d7a81003ba02e16e6f59b49f5e2016cd002 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 22 Dec 2023 02:27:17 +0100 Subject: [PATCH] feat: add message when no posts --- src/static/css/style.css | 9 ++++----- src/templates/header.html | 2 +- src/templates/index.html | 4 ++++ src/templates/post.html | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/static/css/style.css b/src/static/css/style.css index 2fd7fe7..3419b86 100644 --- a/src/static/css/style.css +++ b/src/static/css/style.css @@ -2,6 +2,10 @@ html { font-family: "Courier New", Courier, monospace; } +a { + color: inherit; +} + /* align title with button */ header { display: flex; @@ -33,7 +37,6 @@ span#login-form button { /* link stylised as text */ span#login-form a { - color: inherit; text-decoration: none; } @@ -78,7 +81,3 @@ ul { li { padding-bottom: 1em; } - -li a { - color: inherit; -} diff --git a/src/templates/header.html b/src/templates/header.html index c3d14a5..f263c4f 100644 --- a/src/templates/header.html +++ b/src/templates/header.html @@ -1,7 +1,7 @@

txtdiary{{ " of " + config.user.name if config.user.name else "" }}

- {% if not (login_page or config.is_logged()) -%} + {% if not (login_page or config.is_logged()) %} {{ "".join(get_flashed_messages()) | safe }}

posts

+ {% if not posts %} +

no posts.

+ {% else %}
+ {% endif %} diff --git a/src/templates/post.html b/src/templates/post.html index 162e718..22cc68b 100644 --- a/src/templates/post.html +++ b/src/templates/post.html @@ -1,4 +1,4 @@ -{% if config.is_logged() -%} +{% if config.is_logged() %}