diff --git a/articles/static/style.css b/articles/static/style.css index 54e6a81..2584eb3 100644 --- a/articles/static/style.css +++ b/articles/static/style.css @@ -35,6 +35,14 @@ a:hover, a:focus { text-decoration: none; } +article.article-list { + margin-top: 2em; +} + +article.article-list h2 a { + text-decoration: none; +} + @media (prefers-color-scheme: dark) { :root { --accent: #226997; diff --git a/articles/templates/articles/admin_link_snippet.html b/articles/templates/articles/admin_link_snippet.html new file mode 100644 index 0000000..f734d5a --- /dev/null +++ b/articles/templates/articles/admin_link_snippet.html @@ -0,0 +1,3 @@ +{% if user.is_authenticated %} + | Admin +{% endif %} diff --git a/articles/templates/articles/article_list.html b/articles/templates/articles/article_list.html index 6745274..e6c6ae1 100644 --- a/articles/templates/articles/article_list.html +++ b/articles/templates/articles/article_list.html @@ -3,11 +3,11 @@ {% block content %}

{{ title }} list

{% for article in articles %} -
+

{{ article.title }}

{% include "articles/metadata_snippet.html" %}

{{ article.get_abstract|safe }}

-

Read more

+

Read more...

{% empty %}

No article here. Come back later 🙂

diff --git a/articles/templates/articles/metadata_snippet.html b/articles/templates/articles/metadata_snippet.html index 5329d6a..4b3c768 100644 --- a/articles/templates/articles/metadata_snippet.html +++ b/articles/templates/articles/metadata_snippet.html @@ -1,12 +1,9 @@ -{% if user.is_authenticated %} -

- Admin -

-{% endif %}

{% if article.published_at %} {{ article.published_at|date }} + {% include "articles/admin_link_snippet.html" %} {% else %} {{ article.updated_at|date }} + {% include "articles/admin_link_snippet.html" %} {% endif %}