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;
|
font-family: "Courier New", Courier, monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
/* align title with button */
|
/* align title with button */
|
||||||
header {
|
header {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -33,7 +37,6 @@ span#login-form button {
|
||||||
|
|
||||||
/* link stylised as text */
|
/* link stylised as text */
|
||||||
span#login-form a {
|
span#login-form a {
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +81,3 @@ ul {
|
||||||
li {
|
li {
|
||||||
padding-bottom: 1em;
|
padding-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
li a {
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<header>
|
<header>
|
||||||
<h1>txtdiary{{ " of " + config.user.name if config.user.name else "" }}</h1>
|
<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">
|
<a href="/login">
|
||||||
<svg width="30px" fill="none" viewBox="0 0 24 24">
|
<svg width="30px" fill="none" viewBox="0 0 24 24">
|
||||||
<path
|
<path
|
||||||
|
|
|
@ -12,11 +12,15 @@
|
||||||
<p>{{ "".join(get_flashed_messages()) | safe }}</p>
|
<p>{{ "".join(get_flashed_messages()) | safe }}</p>
|
||||||
|
|
||||||
<h3>posts</h3>
|
<h3>posts</h3>
|
||||||
|
{% if not posts %}
|
||||||
|
<p>no posts.</p>
|
||||||
|
{% else %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for p in posts: %}
|
{% for p in posts: %}
|
||||||
<li><a href="read/{{ p }}">{{ p }}.txt</a></li>
|
<li><a href="read/{{ p }}">{{ p }}.txt</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
{% endif %}
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% if config.is_logged() -%}
|
{% if config.is_logged() %}
|
||||||
<aside>
|
<aside>
|
||||||
<form action="/" method="post">
|
<form action="/" method="post">
|
||||||
<textarea name="p"></textarea>
|
<textarea name="p"></textarea>
|
||||||
|
|
Loading…
Reference in a new issue