feat: add message when no posts
All checks were successful
ci/woodpecker/push/publish Pipeline was successful
All checks were successful
ci/woodpecker/push/publish Pipeline was successful
This commit is contained in:
parent
008ecb7636
commit
4a216d7a81
4 changed files with 10 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% if config.is_logged() -%}
|
||||
{% if config.is_logged() %}
|
||||
<aside>
|
||||
<form action="/" method="post">
|
||||
<textarea name="p"></textarea>
|
||||
|
|
Loading…
Reference in a new issue