feat: add message when no posts
All checks were successful
ci/woodpecker/push/publish Pipeline was successful

This commit is contained in:
Mylloon 2023-12-22 02:27:17 +01:00
parent 008ecb7636
commit 4a216d7a81
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
4 changed files with 10 additions and 7 deletions

View file

@ -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;
}

View file

@ -1,7 +1,7 @@
<header>
<h1>txtdiary{{ " of " + config.user.name if config.user.name else "" }}</h1>
{% if not (login_page or config.is_logged()) -%}
{% if not (login_page or config.is_logged()) %}
<a href="/login">
<svg width="30px" fill="none" viewBox="0 0 24 24">
<path

View file

@ -12,11 +12,15 @@
<p>{{ "".join(get_flashed_messages()) | safe }}</p>
<h3>posts</h3>
{% if not posts %}
<p>no posts.</p>
{% else %}
<ul>
{% for p in posts: %}
<li><a href="read/{{ p }}">{{ p }}.txt</a></li>
{% endfor %}
</ul>
{% endif %}
</main>
</body>
</html>

View file

@ -1,4 +1,4 @@
{% if config.is_logged() -%}
{% if config.is_logged() %}
<aside>
<form action="/" method="post">
<textarea name="p"></textarea>