diff --git a/content/aktuality/_index.md b/content/aktuality/_index.md index 6ab4f78..36bde5b 100644 --- a/content/aktuality/_index.md +++ b/content/aktuality/_index.md @@ -1,5 +1,6 @@ +++ title = "Aktuality" sort_by = "date" +template = "posts.html" +++ diff --git a/sass/main.scss b/sass/main.scss index 1c1b460..343e993 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -307,6 +307,10 @@ main { } } + .columns-2 { + grid-template-columns: 1fr 1fr; + } + .people-profile, .people-list { display: flex; flex-direction: column; @@ -669,6 +673,7 @@ table { main .blocks { grid-template-columns: 1fr } main .websites { grid-template-columns: 1fr 1fr 1fr } + main .columns-2 { grid-template-columns: 1fr } main .people-list .group { grid-template-columns: 1fr } main .gallery { grid-template-columns: 1fr 1fr } } diff --git a/templates/macros.html b/templates/macros.html index 8ba12f2..9434b57 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -83,9 +83,10 @@ {% endmacro %} -{% macro list_posts(section) %} +{% macro list_posts(section, include_expired=false) %} {% for post in section.pages %} - {% if post.extra.expiration and post.extra.expiration | date(format="%s") | int + 86400 < now(timestamp=true) %} + + {% if include_expired==false and post.extra.expiration and post.extra.expiration | date(format="%s") | int + 86400 < now(timestamp=true) %} {% continue %} {% endif %}
diff --git a/templates/posts.html b/templates/posts.html new file mode 100644 index 0000000..105e05e --- /dev/null +++ b/templates/posts.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} + +{% block extra %} + {{ macro::breadcrumbs(page=section) }} +{% endblock %} + +{% block content %} +
+
+

{% if section.extra.heading %} + {{ section.extra.heading }} + {% else %} + {{ section.title }} + {% endif %}

+ +
+ {{ macro::list_posts(section=section, include_expired=true) }} +
+ + {{ section.content | safe }} +
+
+{% endblock content %}