diff --git a/theme/static/css/custom.css b/theme/static/css/custom.css index 486b60f..702a9c2 100644 --- a/theme/static/css/custom.css +++ b/theme/static/css/custom.css @@ -218,7 +218,7 @@ a { } /* Main content */ -#main-header hgroup, +#main-header h1, #site-footer p { background: var(--pico-card-sectioning-background-color); box-shadow: var(--pico-card-box-shadow); @@ -247,7 +247,7 @@ a { } /* flexitem settings for single card */ -.article-header { +.card-header { flex: 0 0 3.5lh; /* set card header to fixed height equivalent to two lines of text */ margin-left: calc(var(--pico-nav-element-spacing-horizontal) * -1); @@ -255,6 +255,7 @@ a { /* Use overflow on card heading if it's longer than two lines of text */ h3 { + color: var(--pico-primary); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; @@ -265,7 +266,7 @@ a { } } -.article-body { +.card-body { text-align: center; img { @@ -274,6 +275,47 @@ a { } +/* settings for articles */ +.article-body { + overflow: hidden; + + img { + height: var(--card-height); + max-width: 270px; + aspect-ratio: auto; + } + + img.article-cover { + float: left; + padding-right: var(--pico-spacing); + padding-bottom: var(--pico-spacing); + } + + img:not(.article-cover) { + float: right; + padding-left: var(--pico-spacing); + padding-bottom: var(--pico-spacing); + } + + .no-content { + display: flex; + justify-content: center; + } +} + +.article-content { + padding-left: 10px; + padding-right: 10px; +} + +.klappentext { + clear: both; +} + +.article-footer { + clear: both; +} + /* settings for slide shows on wide cards */ /* see https://www.smashingmagazine.com/2012/04/pure-css3-cycling-slideshow/ */ .wcard { diff --git a/theme/templates/article.html b/theme/templates/article.html index 6b3cc59..024ddd3 100644 --- a/theme/templates/article.html +++ b/theme/templates/article.html @@ -12,9 +12,25 @@ article.title }}{% endif {% endblock content_header %} {% block content_body %} -
{{ article.content }}
-{% endblock content_body %} - -{% block content_footer %} - -{% endblock content_footer %} \ No newline at end of file +
+ {% if article.content | length is eq(0) %} +
+ {% endif %} + {% if article.titelbild is defined %} + {{ article.title }} (Bild) + {% endif %} + {% if article.content | length is not eq(0) %}
+ {{ article.content }} +
{% endif %} + {% if article.klappentext is defined %} +
+ Klappentext + {{ article.klappentext }} +
+ {% endif %} + {% if article.content | length is eq(0) %} +
+ {% endif %} + +
+{% endblock content_body %} \ No newline at end of file diff --git a/theme/templates/cards.html b/theme/templates/cards.html index fc597d9..69bb1b4 100644 --- a/theme/templates/cards.html +++ b/theme/templates/cards.html @@ -7,10 +7,10 @@ {% for article in articles if article[page.card_selector_key] == selector_value %}{% do article_list.append(article) %}{% endfor %} {% for article in article_list | sort(attribute="order") %}
-
+

{{ article.title }}

-
+
{% if article.titelbild %} Titelbild zu "{{ article.title }}" {% endif %} diff --git a/theme/templates/page.html b/theme/templates/page.html index f1ecfce..1bc4547 100644 --- a/theme/templates/page.html +++ b/theme/templates/page.html @@ -5,10 +5,7 @@ {% block content_header %}
-
-

{{ page.title }}

-

{{ page.summary }}

-
+

{{ page.title }}

{% endblock content_header %}