From da478471e9ab3daa972638afe218bb9ad7e352df Mon Sep 17 00:00:00 2001 From: eclipse Date: Tue, 11 Mar 2025 22:12:37 +0100 Subject: [PATCH] tag template now looks good; minor improvements --- theme/static/css/custom.css | 18 +++++++++++++++--- theme/templates/base.html | 7 +++++++ theme/templates/cards.html | 4 +--- theme/templates/index.html | 3 +++ theme/templates/tag.html | 10 +++++----- 5 files changed, 31 insertions(+), 11 deletions(-) diff --git a/theme/static/css/custom.css b/theme/static/css/custom.css index 41aa241..8d99725 100644 --- a/theme/static/css/custom.css +++ b/theme/static/css/custom.css @@ -410,6 +410,11 @@ article form { object-fit: contain; } +.card-image img { + display: block; + margin-left: auto; + margin-right: auto; +} /* settings for articles */ #content-body, #content-body { @@ -496,17 +501,17 @@ article form { /* settings for slide shows on wide cards */ /* see https://www.smashingmagazine.com/2012/04/pure-css3-cycling-slideshow/ */ -.wcard { +.wcard, .tag-entry { display: flex; flex-flow: wrap; column-gap: calc(var(--pico-nav-element-spacing-horizontal) * 2); - .wcard-gallery, .tag-image { + .wcard-gallery, .tag-content { flex: 1 0 calc((100% - (2 * var(--pico-nav-element-spacing-horizontal))) * 0.618); min-width: 300px; } - .wcard-title, .tag-content { + .wcard-title, .tag-image { flex: 1 0 calc((100% - (2 * var(--pico-nav-element-spacing-horizontal))) * 0.382); min-width: 185px; display: flex; @@ -515,6 +520,13 @@ article form { } } +.tag-content { + flex-direction: column; + display: flex; + justify-content: center; + align-items: center; +} + .wcard-gallery { height: var(--tr-card-height); position: relative; diff --git a/theme/templates/base.html b/theme/templates/base.html index ef76f40..06acbfa 100644 --- a/theme/templates/base.html +++ b/theme/templates/base.html @@ -24,12 +24,19 @@
{% block content_all %} + {% block content_header %} +
+

{{ page.title }}

+
{% endblock content_header %} + {% block content_body %} {% endblock content_body %} + {% block content_footer %} {% endblock content_footer %} + {% endblock content_all %}
diff --git a/theme/templates/cards.html b/theme/templates/cards.html index 18f4b5d..ab069cf 100644 --- a/theme/templates/cards.html +++ b/theme/templates/cards.html @@ -3,9 +3,7 @@ {% block content_all %} {% block content_header %} -
-

{{ page.title }}

-
+{{ super() }} {% endblock content_header %} {% block content_body %} diff --git a/theme/templates/index.html b/theme/templates/index.html index 7c2fd02..1562646 100644 --- a/theme/templates/index.html +++ b/theme/templates/index.html @@ -1,5 +1,8 @@ {% extends "base.html" %} +{% block content_header %} +{% endblock content_header %} + {% block content_body %} {% for p in pages if p.title == "Index" %} diff --git a/theme/templates/tag.html b/theme/templates/tag.html index ed279f2..553c740 100644 --- a/theme/templates/tag.html +++ b/theme/templates/tag.html @@ -1,15 +1,15 @@ -{% extends "index.html" %} +{% extends "base.html" %} {% block content_header %} -
-

{{ tag }} (Schlagwort)

-
+
+

{{ tag }} (Schlagwort)

+
{% endblock content_header %} {% block content_body %} {% from 'includes/macros.html' import ci %} {% for article in articles %} -
+