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
|
date: 2025-03-04 23:19
|
||||||
author: Tobias Radloff
|
author: Tobias Radloff
|
||||||
summary: Ein Arbeitsschritt wurde erfolgreich bewältigt.
|
summary: Ein Arbeitsschritt wurde erfolgreich bewältigt.
|
||||||
|
|||||||
@ -19,6 +19,7 @@ $body = [
|
|||||||
"Emailadresse: {$_POST['email']}",
|
"Emailadresse: {$_POST['email']}",
|
||||||
"Nachricht: {$_POST['nachricht']}"
|
"Nachricht: {$_POST['nachricht']}"
|
||||||
];
|
];
|
||||||
|
|
||||||
$mailContents = [
|
$mailContents = [
|
||||||
'subject' => 'Diese Nachricht kam ueber das Kontaktformular von t-r.de',
|
'subject' => 'Diese Nachricht kam ueber das Kontaktformular von t-r.de',
|
||||||
'bodyText' => implode("\n\n", $body),
|
'bodyText' => implode("\n\n", $body),
|
||||||
@ -32,6 +33,6 @@ try {
|
|||||||
GracefulExit($errorURL, "{$err}: {$e->getMessage()}");
|
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 {
|
.article-stats {
|
||||||
padding-left: 0;
|
margin-top: var(--pico-block-spacing-vertical);
|
||||||
|
|
||||||
|
ul { padding-left: 0;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
}
|
}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -18,8 +18,9 @@
|
|||||||
<div class="body-column-text">
|
<div class="body-column-text">
|
||||||
{% if article.content | length is not eq(0) %}{{ article.content | safe }}{% endif %}
|
{% if article.content | length is not eq(0) %}{{ article.content | safe }}{% endif %}
|
||||||
{% if article.klappentext %}
|
{% if article.klappentext %}
|
||||||
|
{% from 'includes/macros.html' import kt %}
|
||||||
<h2>Klappentext</h2>
|
<h2>Klappentext</h2>
|
||||||
<blockquote>{{ article.klappentext | e }}</blockquote>
|
<blockquote>{{ kt(article.klappentext) }}</blockquote>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="body-column-img">
|
<div class="body-column-img">
|
||||||
@ -28,9 +29,9 @@
|
|||||||
{% set i = article.featured_image[0] %}
|
{% set i = article.featured_image[0] %}
|
||||||
{{ fi(i.pic, i.link, i.text, i.title, i.credit, i.credit_link) }}
|
{{ fi(i.pic, i.link, i.text, i.title, i.credit, i.credit_link) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div>
|
<div class="article-stats">
|
||||||
<h2>Details</h2>
|
<h2>Details</h2>
|
||||||
<ul class="article-stats">
|
<ul>
|
||||||
{% if article.reihe is defined %}
|
{% if article.reihe is defined %}
|
||||||
<li>aus der Reihe {{ article.reihe }}</li>
|
<li>aus der Reihe {{ article.reihe }}</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{# featured image macro #}
|
{# output a featured image #}
|
||||||
{% macro fi(pic, link='', alt='', title='', credit='', credit_link='') %}
|
{% macro fi(pic, link='', alt='', title='', credit='', credit_link='') %}
|
||||||
<div class="featured-image">
|
<div class="featured-image">
|
||||||
<figure>
|
<figure>
|
||||||
@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{# card image macro #}
|
{# output a card image #}
|
||||||
{% macro ci(pic, link='', alt='', title='', credit='', credit_link='') %}
|
{% macro ci(pic, link='', alt='', title='', credit='', credit_link='') %}
|
||||||
<div class="card-image">
|
<div class="card-image">
|
||||||
<figure>
|
<figure>
|
||||||
@ -17,3 +17,8 @@
|
|||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% 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