added paragraph preservation for Klappentext; small changes
This commit is contained in:
parent
d467fa4db7
commit
4ac79a72e9
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "Das hat geklappt"
|
||||
title: "Das hat geklappt :-)"
|
||||
date: 2025-03-04 23:19
|
||||
author: Tobias Radloff
|
||||
summary: Ein Arbeitsschritt wurde erfolgreich bewältigt.
|
||||
|
||||
@ -19,6 +19,7 @@ $body = [
|
||||
"Emailadresse: {$_POST['email']}",
|
||||
"Nachricht: {$_POST['nachricht']}"
|
||||
];
|
||||
|
||||
$mailContents = [
|
||||
'subject' => 'Diese Nachricht kam ueber das Kontaktformular von t-r.de',
|
||||
'bodyText' => implode("\n\n", $body),
|
||||
@ -32,6 +33,6 @@ try {
|
||||
GracefulExit($errorURL, "{$err}: {$e->getMessage()}");
|
||||
}
|
||||
|
||||
header("Location: {$successURL}");
|
||||
// success
|
||||
GracefulExit($successURL, "Deine Nachricht wurde erfolgreich verschickt und ist jetzt auf dem Weg zu mir.");
|
||||
?>
|
||||
|
||||
|
||||
@ -431,12 +431,14 @@ figcaption {
|
||||
}
|
||||
|
||||
.article-stats {
|
||||
padding-left: 0;
|
||||
margin-top: var(--pico-block-spacing-vertical);
|
||||
|
||||
ul { padding-left: 0;
|
||||
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
}
|
||||
}}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -18,8 +18,9 @@
|
||||
<div class="body-column-text">
|
||||
{% if article.content | length is not eq(0) %}{{ article.content | safe }}{% endif %}
|
||||
{% if article.klappentext %}
|
||||
{% from 'includes/macros.html' import kt %}
|
||||
<h2>Klappentext</h2>
|
||||
<blockquote>{{ article.klappentext | e }}</blockquote>
|
||||
<blockquote>{{ kt(article.klappentext) }}</blockquote>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="body-column-img">
|
||||
@ -28,9 +29,9 @@
|
||||
{% set i = article.featured_image[0] %}
|
||||
{{ fi(i.pic, i.link, i.text, i.title, i.credit, i.credit_link) }}
|
||||
{% endif %}
|
||||
<div>
|
||||
<div class="article-stats">
|
||||
<h2>Details</h2>
|
||||
<ul class="article-stats">
|
||||
<ul>
|
||||
{% if article.reihe is defined %}
|
||||
<li>aus der Reihe {{ article.reihe }}</li>
|
||||
{% endif %}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{# featured image macro #}
|
||||
{# output a featured image #}
|
||||
{% macro fi(pic, link='', alt='', title='', credit='', credit_link='') %}
|
||||
<div class="featured-image">
|
||||
<figure>
|
||||
@ -8,7 +8,7 @@
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{# card image macro #}
|
||||
{# output a card image #}
|
||||
{% macro ci(pic, link='', alt='', title='', credit='', credit_link='') %}
|
||||
<div class="card-image">
|
||||
<figure>
|
||||
@ -17,3 +17,8 @@
|
||||
</figure>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{# split long string (e.g. Klappentext) into paragraphs and output them as <p> elements #}
|
||||
{% macro kt(text) %}
|
||||
{% for k in text.strip().split("\n\n") | list %}<p>{{ k }}</p>{% endfor %}
|
||||
{% endmacro %}
|
||||
Loading…
Reference in New Issue
Block a user