Přidání archivu článků

Closes: #33
content
Emil Miler 3 years ago
parent 80a526969c
commit 3ddf5cec27

@ -1,5 +1,6 @@
+++ +++
title = "Aktuality" title = "Aktuality"
sort_by = "date" sort_by = "date"
template = "posts.html"
+++ +++

@ -307,6 +307,10 @@ main {
} }
} }
.columns-2 {
grid-template-columns: 1fr 1fr;
}
.people-profile, .people-list { .people-profile, .people-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -669,6 +673,7 @@ table {
main .blocks { grid-template-columns: 1fr } main .blocks { grid-template-columns: 1fr }
main .websites { grid-template-columns: 1fr 1fr 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 .people-list .group { grid-template-columns: 1fr }
main .gallery { grid-template-columns: 1fr 1fr } main .gallery { grid-template-columns: 1fr 1fr }
} }

@ -83,9 +83,10 @@
</div> </div>
{% endmacro %} {% endmacro %}
{% macro list_posts(section) %} {% macro list_posts(section, include_expired=false) %}
{% for post in section.pages %} {% 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 %} {% continue %}
{% endif %} {% endif %}
<article> <article>

@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block extra %}
{{ macro::breadcrumbs(page=section) }}
{% endblock %}
{% block content %}
<main>
<section>
<h1>{% if section.extra.heading %}
{{ section.extra.heading }}
{% else %}
{{ section.title }}
{% endif %}</h1>
<div class="blocks columns-2 noshadow">
{{ macro::list_posts(section=section, include_expired=true) }}
</div>
{{ section.content | safe }}
</section>
</main>
{% endblock content %}
Loading…
Cancel
Save