streamlined all templates

This commit is contained in:
eclipse 2025-03-11 21:46:44 +01:00
parent 7f3fbd61cf
commit 4ccfa4b818
14 changed files with 140 additions and 66 deletions

View File

@ -283,14 +283,18 @@ h1, h2, h3, h4, h5, h6 {
/* Main content */
#main-header h1,
#site-footer p {
#site-footer p,
.extra-header h1 {
box-shadow: var(--pico-card-box-shadow);
padding: calc(var(--pico-block-spacing-horizontal) * 0.5) calc(var(--pico-block-spacing-vertical) * 0.5);
text-align: center;
background-color: var(--pico-card-background-color);
}
#content-header h1 {
text-align: center;
}
.featured-image {
text-align: center;
}
@ -299,7 +303,7 @@ figcaption {
text-align: center;
font-size: 0.8em;
a { font-size: 0.85m;}
a { font-size: 0.85em;}
}
#no-bottom-margin {
@ -307,8 +311,16 @@ figcaption {
clip-path: inset(-138px -138px -0px -138px);
}
/* Index page */
article form {
box-shadow: none;
}
.padded {
margin-left: var(--pico-block-spacing-horizontal);
margin-right: var(--pico-block-spacing-horizontal);
}
/* Index page */
.index {
display: flex;
flex-wrap: wrap;
@ -593,7 +605,7 @@ img.impr {
height: 1.2lh;
}
.main-footer {
.content-footer {
font-size: calc(var(--pico-font-size) * .7);
a {

View File

@ -7,14 +7,16 @@
{% if article.summary %} {{ article.summary|e }} {% else %} An Article in {{ SITETAG }}: {{ article.title }}{% endif %}
{% endblock %}
{% block content_all %}
<article>
{% block content_header %}
<header id="main-header">
<header id="content-header">
<h1>{{ article.title }}</h1>
</header>
{% endblock content_header %}
{% block content_body %}
<article>
<div id="content-body">
<div class="body-column-text">
{% if article.content | length is not eq(0) %}
@ -62,9 +64,12 @@
</div>
</div>
{% endblock content_body %}
{% block content_footer %}
<footer class="content-footer">
<a href="/{{ article.save_as.split('/')[:-1] | join('/') }}/">&larr; {{ article.category }}</a>
</footer>
</article>
{% endblock content_footer %}
</article>
{% endblock content_all %}

View File

@ -17,22 +17,26 @@
</head>
<body>
<header>
<div id="jumbotron">{% include "includes/jumbotron.html" %}</div>
</header>
{% block site_header %}
<header><div id="jumbotron">{% include "includes/jumbotron.html" %}</div></header>
{% endblock site_header %}
<main class="container">
<div id="main-content" role="document">
<div id="site-content" role="document">
{% block content_all %}
{% block content_header %}
{% endblock %}
{% endblock content_header %}
{% block content_body %}
{% endblock %}
{% endblock content_body %}
{% block content_footer %}
{% endblock %}
{% endblock content_footer %}
{% endblock content_all %}
</div>
</main>
{% block site_footer %}
<footer id="site-footer">{% include "includes/footer.html" %}</footer>
{% endblock site_footer %}
</body>
<script src="{{ SITEURL }}/theme/js/SwitchColorMode.js"></script>
</html>

View File

@ -1,8 +1,16 @@
{% extends "page.html" %}
{% extends "base.html" %}
{% block content_all %}
{% block content_header %}
<div class="extra-header">
<h1>{{ page.title }}</h1>
</div>
{% endblock content_header %}
{% block content_body %}
{% set selector_value = page.card_selector_value if page.card_selector_value is defined else page.title %}
<section class="cards">
<div class="cards">
{% set article_list = [] %}
{% 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") %}
@ -19,5 +27,7 @@
</div>
</article>
{% endfor %}
</section>
</div>
{% endblock content_body %}
{% endblock content_all %}

View File

@ -1,13 +1,28 @@
{% extends "page.html" %} {% block content_header %}
{% extends "page.html" %}
{% block content_all %}
<article>
{% block content_header %}
{{ super() }}
{% endblock content_header %}
{% block content_body %}
{% if page.featured_image %}
<header class="content-header">
{% from 'includes/macros.html' import fi %} {% set i =
page.featured_image[0] %} {{ fi(i.pic, i.link, i.text, i.alt, i.credit,
i.credit_link) }}
</header>
{% endif %} {% endblock content_header %} {% block content_body %} {% include
"includes/contact_form.html" %} {% endblock content_body %} {% block
content_footer %}
{% from 'includes/macros.html' import fi %}
{% set i = page.featured_image[0] %}
{{ fi(i.pic, i.link, i.text, i.alt, i.credit, i.credit_link) }}
{% endif %}
{% if page.content %}
<div class="padded">
{{ page.content }}
</div>
{% endif %}
{% include "includes/contact_form.html" %}
{% endblock content_body %}
</article>
{% endblock content_footer %}
{% endblock content_all %}

View File

@ -1,4 +1,4 @@
<div class="container main-footer" >
<div class="container site-footer" >
{% set t = [ pages | map(attribute="modified") | list | max , articles | map(attribute="modified") | list | max ] | max %}
<p>{{ t.strftime("%Y") }} erstellt mit <a href="https://www.getpelican.com/" target="_blank">Pelican</a> und viel <span class="heart">&#9829;</span> von Tobias Radloff</p>
</div>

View File

@ -3,7 +3,7 @@
<div class="featured-image">
<figure>
{% if link %}<a href="{{ link }}"{% if title %} title="{{ title }}"{% endif %}>{% endif %}<img class="image-process-featured" src="{{ pic }}"{% if alt %} alt="{{ alt }}"{% endif %}/>{% if link %}</a>{% endif %}
{% if credit %}<figcaption>{% if credit_link %}<a href="{{ credit_link }}" alt="Bildquelle: {{ credit }}" target="_blank">{% endif %}{{ credit }}{% if credit_link %}</a>{% endif %}</figcaption>{% endif %}
{% if credit %}<figcaption>Bild: {% if credit_link %}<a href="{{ credit_link }}" alt="Bildquelle: {{ credit }}" target="_blank">{% endif %}{{ credit }}{% if credit_link %}</a>{% endif %}</figcaption>{% endif %}
</figure>
</div>
{% endmacro %}
@ -13,7 +13,7 @@
<div class="card-image">
<figure>
{% if link %}<a href="{{ link }}"{% if title %} title="{{ title }}"{% endif %}>{% endif %}<img class="image-process-card" src="{{ pic }}"{% if alt %} alt="{{ alt }}"{% endif %}/>{% if link %}</a>{% endif %}
{% if credit %}<figcaption>{% if credit_link %}<a href="{{ credit_link }}" alt="Bildquelle: {{ credit }}" target="_blank">{% endif %}{{ credit }}{% if credit_link %}</a>{% endif %}</figcaption>{% endif %}
{% if credit %}<figcaption>Bild: {% if credit_link %}<a href="{{ credit_link }}" alt="Bildquelle: {{ credit }}" target="_blank">{% endif %}{{ credit }}{% if credit_link %}</a>{% endif %}</figcaption>{% endif %}
</figure>
</div>
{% endmacro %}

View File

@ -1,17 +1,22 @@
{% extends "base.html" %}
{% block content_body %}
{% for p in pages if p.title == "Index" %}
{% set lr = cycler("row-reverse", "row") %}
{% if p.featured is defined %}
<div class="index-featured"></div>
<div class="index-featured">not implemented yet</div>
{% endif %}
{% set lr = cycler("row-reverse", "row") %}
{% from 'includes/macros.html' import fi %}
{% for i in p.index_cards %}
<div class="index" style="flex-direction: {{ lr.next() }};">
<section class="index" style="flex-direction: {{ lr.next() }};">
{{ fi( i.pic, i.link, i.alt, i.title, i.credit, i.credit_link) }}
<p><a class="index-link" href="{{ i.link }}">{{ i.alt }}</a></p>
</div>
</section>
{% endfor %}
{% endfor %}
{% include "includes/subscribe.html" %}
{% include "includes/subscribe_form.html" %}
{% endblock content_body %}

View File

@ -6,14 +6,16 @@
{% if page.summary %}{{ page.summary|e }}{% else %}{{ super() }}{% endif %}
{% endblock %}
{% block content_all %}
<article>
{% block content_header %}
<header id="main-header">
<header id="content-header">
<h1>{{ page.title }}</h1>
</header>
{% endblock content_header %}
{% block content_body %}
<article>
<div id="content-body">
<div class="body-column-text">
{{ page.content }}
@ -39,4 +41,6 @@
</footer>
{% endif %}
{% endblock content_footer %}
</article>
{% endblock content_all %}

View File

@ -1,7 +1,7 @@
{% extends "index.html" %}
{% block content_header %}
<header id="main-header">
<header id="content_header">
<h1>{{ tag }} (Schlagwort)</h1>
</header>
{% endblock content_header %}

View File

@ -3,15 +3,23 @@
{% if page.termine is defined %}
{% set date_format = "%d.%m." %}
{% set time_format = "%H:%M" %}
{% block content_body %}
{% block content_all %}
<article>
{% block content_header %}
{{ super() }}
{% endblock content_header %}
{% block content_body %}
{% if page.featured_image %}
<header class="content-header">
<div>
{% from 'includes/macros.html' import fi %}
{% set i = page.featured_image[0] %}
{{ fi(i.pic, i.link, i.text, i.alt, i.credit, i.credit_link) }}
</header>
</div>
{% endif %}
<div id="content-body">
<table class="events">
<thead>
@ -35,12 +43,16 @@
</table>
</div>
{% endblock content_body %}
{% if page.written_at is defined %}
{% block content_footer %}
{% if page.written_at is defined %}
<footer class="content-footer">
<p>Letzte Aktualisierung: {{ page.written_at | strftime("%d.%m.%Y, %H:%M Uhr") }}</p>
</footer>
{% endif %}
{% endblock content_footer %}
{% endif %}
</article>
{% endblock content_all %}
{% endif %}

View File

@ -1,4 +1,12 @@
{% extends "page.html" %}
{% extends "base.html" %}
{% block content_all%}
{% block content_header %}
<div class="extra-header">
<h1>{{ page.title }}</h1>
</div>
{% endblock content_header %}
{% block content_body %}
{# build list of pages where the slugs correspond to an entry in page.wide_cards; some hackiness required to keep the
@ -35,5 +43,4 @@ wide_card) | list | first is defined %}
{% endfor %}
{% endblock content_body %}
{% block content_footer %}
{% endblock content_footer %}
{% endblock content_all %}