From 698a2db6a78daea02449fff8ed401e36f5034faa Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 12 Sep 2020 17:20:56 +0200 Subject: [PATCH] Update articles list look with blog title and description --- articles/static/style.css | 9 +++++---- articles/templates/articles/article_list.html | 5 +++-- articles/templates/articles/base.html | 2 +- articles/templates/articles/metadata_snippet.html | 2 +- articles/views/html.py | 8 +++++++- blog/settings.py | 2 +- 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/articles/static/style.css b/articles/static/style.css index 99f1819..39b911d 100644 --- a/articles/static/style.css +++ b/articles/static/style.css @@ -12,6 +12,7 @@ --error-text: #721c24; --warning-background: #fff3cd; --warning-text: #856404; + --description-margin: .2rem; } html { @@ -71,16 +72,16 @@ a { margin-top: 4em; } -.article-list h2, .article-detail h1 { - margin-bottom: .2em; +.article-list h2, h1 { + margin-bottom: var(--description-margin); } .article-detail h1 { font-size: 2em; } -.date { - margin-top: .2em; +.metadata { + margin-top: var(--description-margin); color: var(--main2); } diff --git a/articles/templates/articles/article_list.html b/articles/templates/articles/article_list.html index c4f34cb..818bfd4 100644 --- a/articles/templates/articles/article_list.html +++ b/articles/templates/articles/article_list.html @@ -1,10 +1,11 @@ {% extends 'articles/base.html' %} {% block title %} - {{ title }} + {{ title_header }} {% endblock %} {% block content %} -

{{ title }} list

+

{{ blog_title }}{% if title %} · {{ title }}{% endif %}

+

{{ blog_description }}

{% for article in articles %}

{{ article.title }}

diff --git a/articles/templates/articles/base.html b/articles/templates/articles/base.html index 9cd6376..da67a0e 100644 --- a/articles/templates/articles/base.html +++ b/articles/templates/articles/base.html @@ -14,7 +14,7 @@