From 2be53e2328c8f2d4e192e8f66f6be6a69be6a3ed Mon Sep 17 00:00:00 2001 From: Stephan Date: Sat, 10 Apr 2021 22:13:17 +0200 Subject: [PATCH] Created new aggregator page for 'Aktuelles'. --- assets/css/style.css | 52 ++++++++++++++++++++++++++++++---- assets/images/podcast_logo.svg | 9 ++++++ assets/images/rss_logo.svg | 13 +++++++++ content/aktuelles/contents.lr | 2 +- models/aggregator_page.ini | 18 ++++++++++++ templates/aggregator_page.html | 50 ++++++++++++++++++++++++++++++++ 6 files changed, 137 insertions(+), 7 deletions(-) create mode 100644 assets/images/podcast_logo.svg create mode 100644 assets/images/rss_logo.svg create mode 100644 models/aggregator_page.ini create mode 100644 templates/aggregator_page.html diff --git a/assets/css/style.css b/assets/css/style.css index 6880715..ad44207 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -605,22 +605,38 @@ hr.-even { color: var(--wtf-mid-grey) !important; } -.content__box, .content__half_box, .content__third_box { +.content__box, +.content__half_box, +.content__third_box, +.content__aggregate_box { margin: 0 auto; padding: 0; } -.content__half_box, .content__third_box { +.content__half_box, +.content__third_box, +.content__aggregate_box { display: flex; flex-direction: row; } +.content__aggregate_box { + flex-wrap: wrap; + justify-content: space-around; +} + .content__inner_half_box { width: 50%; } .content__inner_third_box { - width: 33%; + flex-basis: 33%; +} + +.content__inner_aggregate_box { + margin: 1.5rem 0.5rem; + flex-basis: 40%; + min-width: 300px; } .flex_heading { @@ -676,12 +692,14 @@ hr.-even { margin-bottom: 1.5rem; } -.content__inner_third_heading_link { +.content__inner_third_heading_link, +.content__aggregate_heading_link { color: var(--wtf-light-blue); text-decoration: underline; } -.content__inner_third_heading_link:hover { +.content__inner_third_heading_link:hover, +.content__aggregate_heading_link:hover { color: var(--wtf-dark-grey); } @@ -746,6 +764,17 @@ hr.-even { margin: -0.5rem 1.5rem 0 1.5rem; } +.content__rss_logo { + display: inline; + height: 1rem; +} + +.content__rss_logo_heading, +.content__podcast_logo_heading { + height: 1.75rem; +} + + .content__pagination { text-align: center; } @@ -763,7 +792,8 @@ hr.-even { .content__box, .content__half_box, .footer__wrapper, -.content__third_box { +.content__third_box, +.content__aggregate_box { width: 100%; max-width: 1200px; orphans: 3; @@ -1328,6 +1358,11 @@ footer { .pod_ctrl_box { margin-top: 1.5rem; } + + .content__inner_aggregate_box { + margin: 1.5rem 1rem; + flex-grow: 1; + } } @media screen and (max-width: 595px) { @@ -1592,6 +1627,11 @@ footer { .pod_ctrl_box { margin-top: 1.5rem; } + + .content__inner_aggregate_box { + margin: 1.5; + flex-grow: 1; + } /* content - end */ /* footer - start */ diff --git a/assets/images/podcast_logo.svg b/assets/images/podcast_logo.svg new file mode 100644 index 0000000..4cc1549 --- /dev/null +++ b/assets/images/podcast_logo.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/assets/images/rss_logo.svg b/assets/images/rss_logo.svg new file mode 100644 index 0000000..e3692c5 --- /dev/null +++ b/assets/images/rss_logo.svg @@ -0,0 +1,13 @@ + + + + + + + diff --git a/content/aktuelles/contents.lr b/content/aktuelles/contents.lr index aaed03b..258347a 100644 --- a/content/aktuelles/contents.lr +++ b/content/aktuelles/contents.lr @@ -1,4 +1,4 @@ -_model: page +_model: aggregator_page --- title: Aktuelles --- diff --git a/models/aggregator_page.ini b/models/aggregator_page.ini new file mode 100644 index 0000000..d2cc442 --- /dev/null +++ b/models/aggregator_page.ini @@ -0,0 +1,18 @@ +[model] +name = Aggregator Page +label = {{ this.title }} +inherits = header_slim + +[fields.title] +label = Title +description = Der Seitentitel und die Überschrift dieser Seite +type = string + +[fields.meta_description] +label = Meta Beschreibung +description = Hier kommt die Beschreibung rein, die von Suchmachinen, Seitencrawlern und Previews auf diese Seite generiert werden +type = string + +[fields.body] +label = Body +type = markdown diff --git a/templates/aggregator_page.html b/templates/aggregator_page.html new file mode 100644 index 0000000..5ce07a4 --- /dev/null +++ b/templates/aggregator_page.html @@ -0,0 +1,50 @@ +{% extends "header_slim.html" %} +{%- block title -%}{{ this.title }}{%- endblock -%} +{%- block meta_description -%} + {%- if this.meta_description is defined and this.meta_description != "" -%} + {{ this.meta_description }} + {%- else -%} + Werkkooperative der Technikfreundinnen eG + {%- endif -%} +{%- endblock -%} +{% block body %} +
+ {% set blog_posts = site.get('/blog').children.order_by('-pub_date').limit(3) %} +
+ {% for post in blog_posts %} +
+

+ + RSS Logo {{ post.title }} + +

+
+

+ geschreiben von {{ post.author }} am {{ post.pub_date }} +

+

+ {{ post.meta_description }} +

+
+ {% endfor %} + + {% set episodes = site.get('/podcast').children.order_by('-pub_date').limit(3) %} + {% for episode in episodes %} +
+

+ + Podcast Logo {{ episode.title }} + +

+
+

+ geschreiben von {{ episode.author }} am {{ episode.pub_date }} +

+

+ {{ episode.podcast_teaser }} +

+
+ {% endfor %} +
+
+{% endblock %}