corrected and improved semantic markup

This commit is contained in:
eclipse 2025-03-11 12:24:56 +01:00
parent 19841251d1
commit 7f3fbd61cf
7 changed files with 131 additions and 113 deletions

View File

@ -8,6 +8,7 @@ featured_image:
alt: die Abkürzung "DSGVO" vor einem blauem, einem Computerchip nachempfundenen Hintergrund
credit: Gerd Altmann | pixabay.com
credit_link: https://pixabay.com/users/geralt-9301
footer_line: Erstellt nach Vorlage des <a href="https://www.ihk.de/" target="_blank">IHK</a>
---
## I. Name und Anschrift des Verantwortlichen

View File

@ -400,7 +400,7 @@ figcaption {
/* settings for articles */
#article-body, #page-body {
#content-body, #content-body {
overflow: hidden;
display: flex;
justify-content: space-between;
@ -494,7 +494,7 @@ figcaption {
min-width: 300px;
}
.wcard-title .tag-content {
.wcard-title, .tag-content {
flex: 1 0 calc((100% - (2 * var(--pico-nav-element-spacing-horizontal))) * 0.382);
min-width: 185px;
display: flex;

View File

@ -14,46 +14,57 @@
{% endblock content_header %}
{% block content_body %}
<article id="article-body">
<div class="body-column-text">
{% if article.content | length is not eq(0) %}{{ article.content }}{% endif %}
{% if article.stats or article.tags %}
<div>
<h2>Details</h2>
<ul class="article-stats">
{% if article.stats %}
{% set stats = article.stats %}
{% if stats.reihe is defined %}
<li>aus der Reihe "{{ stats.reihe }}"</li>
{% endif %}
{% if stats.isbn is defined %}
<li>ISBN: {{ stats.isbn }}</li>
{% endif %}
{% if stats.verlag is defined %}
<li>erschienen bei: {{ stats.verlag }}</li>
{% endif %}
{% endif %}
{% if article.tags is defined %}
<li>Schlagworte: <ul class="article-tags">
{% for t in article.tags %}<li><a href="/tag/{{ t | lower }}/">{{ t }}</a></li>{% endfor %}
</ul></li>
{% endif %}
</ul>
<article>
<div id="content-body">
<div class="body-column-text">
{% if article.content | length is not eq(0) %}
{{ article.content }}
{% endif %}
{% if article.stats or article.tags %}
<div>
<h2>Details</h2>
<ul class="article-stats">
{% if article.stats %}
{% set stats = article.stats %}
{% if stats.reihe is defined %}
<li>aus der Reihe "{{ stats.reihe }}"</li>
{% endif %}
{% if stats.isbn is defined %}
<li>ISBN: {{ stats.isbn }}</li>
{% endif %}
{% if stats.verlag is defined %}
<li>erschienen bei: {{ stats.verlag }}</li>
{% endif %}
{% endif %}
{% if article.tags is defined %}
<li>Schlagworte:
<ul class="article-tags">
{% for t in article.tags %}
<li><a href="/tag/{{ t | lower }}/">{{ t }}</a></li>
{% endfor %}
</ul>
</li>
{% endif %}
</ul>
</div>
{% endif %}
</div>
<div class="body-column-img">
{% if article.featured_image is defined %}
{% from 'includes/macros.html' import fi %}
{% set i = article.featured_image[0] %}
{{ fi(i.pic, i.link, i.text, i.title, i.credit, i.credit_link) }}
{% endif %}
{% if article.klappentext %}
<h2>Klappentext</h2>
<blockquote>{{ article.klappentext }}</blockquote>
{% endif %}
</div>
</div>
{% endif %}
</div>
<div class="body-column-img">
{% if article.featured_image is defined %}
{% from 'includes/macros.html' import fi %}
{% set i = article.featured_image[0] %}
{{ fi(i.pic, i.link, i.text, i.title, i.credit, i.credit_link) }}
{% endif %}
{% if article.klappentext %}
<h2>Klappentext</h2>
<blockquote>{{ article.klappentext }}</blockquote>
{% endif %}
{% endblock content_body %}
{% block content_footer %}
<footer class="content-footer">
<a href="/{{ article.save_as.split('/')[:-1] | join('/') }}/">&larr; {{ article.category }}</a>
</footer>
</article>
<footer class="article-footer">
<a href="/{{ article.save_as.split('/')[:-1] | join('/') }}/">&larr; {{ article.category }}</a>
</footer>
{% endblock content_body %}
{% endblock content_footer %}

View File

@ -1,15 +1,13 @@
{% extends "page.html" %}
{% block content_body %}
{% if page.featured_image %}
{% from 'includes/macros.html' import pi %}
{% set i = page.featured_image[0] %}
{{ pi(i.pic, i.link, i.text, i.alt, i.credit, i.credit_link) }}
{% endif %}
{% extends "page.html" %} {% block content_header %}
<article>
{% include "includes/contact_form.html" %}
{% 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 %}
</article>
{% endblock content_body %}
{% block content_footer %}
{% endblock content_footer %}

View File

@ -8,12 +8,6 @@
</div>
{% endmacro %}
{# output a featured image for a page #}
{% macro pi(pic, link='', alt='', title='', credit='', credit_link='') %}
<article id="no-bottom-margin">{{ fi(pic, link, text, alt, credit, credit_link) }}</article>
{% endmacro %}
{# output a card image #}
{% macro ci(pic, link='', alt='', title='', credit='', credit_link='') %}
<div class="card-image">

View File

@ -1,7 +1,10 @@
{% extends "base.html" %}
{% block title %}{{ page.title }} - {{ SITENAME }}{% endblock %}
{% block metadesc %}{% if page.summary %}{{ page.summary|e }}{% else %}{{ super() }}{% endif
%}{% endblock %}
{% block title %}
{{ page.title }} - {{ SITENAME }}
{% endblock %}
{% block metadesc %}
{% if page.summary %}{{ page.summary|e }}{% else %}{{ super() }}{% endif %}
{% endblock %}
{% block content_header %}
<header id="main-header">
@ -10,24 +13,30 @@
{% endblock content_header %}
{% block content_body %}
<article id="page-body">
<div class="body-column-text">
<article>
<div id="content-body">
<div class="body-column-text">
{{ page.content }}
</div>
<div class="body-column-image">
{% if page.featured_image %}
{% 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 %}
</div>
</div>
<div class="body-column-image">
{% if page.featured_image is defined %}
{% 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 %}
</div>
</div>
{% endblock content_body %}
{% endblock content_body %}
{% block content_footer %}
{% if page.footer_line is defined %}
<p class="muted">{{ page.footer_line }}</p>
{% elif page.footer_include is defined %}
{% include page.footer_include %}
{% endif %}
{% endblock content_footer %}
{% block content_footer %}
{% if page.footer_line %}
<footer class="content-footer">
<p>{{ page.footer_line }}</p>
</footer>
{% elif page.footer_include %}
<footer class="content-footer">
{% include page.footer_include %}
</footer>
{% endif %}
{% endblock content_footer %}
</article>

View File

@ -4,38 +4,43 @@
{% set date_format = "%d.%m." %}
{% set time_format = "%H:%M" %}
{% block content_body %}
{% if page.featured_image %}
<article>
{% if page.featured_image %}
<header class="content-header">
{% from 'includes/macros.html' import fi %}
{% set i = page.featured_image[0] %}
<article id="no-bottom-margin">{{ fi(i.pic, i.link, i.text, i.alt, i.credit, i.credit_link) }}</article>
{{ fi(i.pic, i.link, i.text, i.alt, i.credit, i.credit_link) }}
</header>
{% endif %}
<div id="content-body">
<table class="events">
<thead>
<tr>
<th class="event-info">Wann & Wo</th>
<th class="event-detail">Was & Wieso</th>
</tr>
</thead>
<tbody>
{% for t in page.termine %}
<tr>
<td class="event-info"><strong>{{ t.startdate | strftime(date_format) }}{% if t.enddate is defined %}{{t.enddate | strftime(date_format) }}{% elif t.starttime is defined %} {{ t.starttime | strftime(time_format) }}{% endif %}</strong><br>{{ t.location }}</td>
<td class="event-detail">
<p>{{ t.summary }} {% if "Moderation" in t.categories %}(Moderation){%endif%}</p>
{% if t.description is defined %}<p>{{ t.description | replace("\n\n", "</p><p>") | replace("\n", "<br>") | replace("</p><br><p>", "</p><p>")}}</p>{% endif %}
{% if t.attach is defined %}<p><a href="{{ t.attach }}" target="_blank" title="siehe auch …">Mehr Infos</a></p>{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock content_body %}
{% if page.written_at is defined %}
{% block content_footer %}
<footer class="content-footer">
<p>Letzte Aktualisierung: {{ page.written_at | strftime("%d.%m.%Y, %H:%M Uhr") }}</p>
</footer>
{% endblock content_footer %}
{% endif %}
<article id="page-body">
<table class="events">
<thead>
<tr>
<th class="event-info">Wann & Wo</th>
<th class="event-detail">Was & Wieso</th>
</tr>
</thead>
<tbody>
{% for t in page.termine %}
<tr>
<td class="event-info"><strong>{{ t.startdate | strftime(date_format) }}{% if t.enddate is defined %}{{t.enddate | strftime(date_format) }}{% elif t.starttime is defined %} {{ t.starttime | strftime(time_format) }}{% endif %}</strong><br>{{ t.location }}</td>
<td class="event-detail">
<p>{{ t.summary }} {% if "Moderation" in t.categories %}(Moderation){%endif%}</p>
{% if t.description is defined %}<p>{{ t.description | replace("\n\n", "</p><p>") | replace("\n", "<br>") | replace("</p><br><p>", "</p><p>")}}</p>{% endif %}
{% if t.attach is defined %}<p><a href="{{ t.attach }}" target="_blank" title="siehe auch …">Mehr Infos</a></p>{% endif %}
</td>
</tr>
{% endfor %}
<tr><td colspan="2"><small class="tr-muted">Letzte Aktualisierung: {{ page.written_at | strftime("%d.%m.%Y, %H:%M Uhr") }}</small></td></tr>
</body>
</table>
</article>
{% endblock content_body %}
{% if page.written_at is defined %}
{% block content_footer %}
{% endblock content_footer %}
{% endif %}
{% endif %}