From c9de9f62266634f97ddeb5622c5c399731d1eff2 Mon Sep 17 00:00:00 2001 From: smueller Date: Tue, 7 Jul 2026 10:29:57 +0200 Subject: [PATCH] Enhance newsletter HTML layout and styling. Added summary text for article count, improved test badge visibility, and adjusted padding and font sizes for better readability. Updated unsubscribe link text for clarity. --- .gitignore | 1 + index.php | 169 +++++++++++++++++++++++++++-------------------------- wiki.php | 169 +++++++++++++++++++++++++++-------------------------- 3 files changed, 173 insertions(+), 166 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..feedc7b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +WG Neue Server spannendes Know-how Der Thomas-Krenn-Newsletter im Mai.msg \ No newline at end of file diff --git a/index.php b/index.php index 66ef2ac..a5e9ad8 100644 --- a/index.php +++ b/index.php @@ -340,61 +340,13 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel $replyEmail = trim((string)($config['reply_to'] ?: $config['from_email'])); $replyHref = 'mailto:' . $replyEmail; - $articleRows = ''; - if ($count === 0) { - $articleRows = ' - - - - - - -
- Für diesen Zeitraum wurden keine neuen Artikel gefunden. -
- - '; - } else { - foreach ($articles as $article) { - $articleRows .= ' - - - - - - - - - - - - - - - -
- Thomas-Krenn-Wiki -
- ' . h($article['title']) . ' -
- Veröffentlicht am ' . h($article['date_de']) . ' von ' . h($article['author']) . '. -
- - - - -
- Jetzt Artikel lesen -
-
- - '; - } - } + $summaryText = $count === 1 + ? 'Im ' . h($periodLabel) . ' wurde 1 neuer Wiki-Artikel veröffentlicht.' + : 'Im ' . h($periodLabel) . ' wurden ' . $count . ' neue Wiki-Artikel veröffentlicht.'; $testBadge = $isTest ? ' - + ' : ''; + $articleRows = ''; + if ($count === 0) { + $articleRows = ' + + + '; + } else { + foreach ($articles as $article) { + $articleRows .= ' + + + '; + } + } + $unsubscribeFooter = ''; $unsubscribeUrl = trim((string)($config['unsubscribe_url'] ?? '')); if ($unsubscribeUrl !== '' && $unsubscribeUrl !== '#' && filter_var($unsubscribeUrl, FILTER_VALIDATE_URL)) { - $unsubscribeFooter = '
Newsletter abbestellen'; + $unsubscribeFooter = '
Abmelden'; } - $summaryText = $count === 1 - ? 'Im ' . h($periodLabel) . ' wurde 1 neuer Wiki-Artikel veröffentlicht.' - : 'Im ' . h($periodLabel) . ' wurden ' . $count . ' neue Wiki-Artikel veröffentlicht.'; - return ' @@ -424,56 +424,57 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel Thomas-Krenn Wiki Newsletter - -
' . h($preheader) . ' ‌ ‌ ‌ ‌
-
-
@@ -406,16 +358,64 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
+ + + + +
+ Für diesen Zeitraum wurden keine neuen Artikel gefunden. +
+
+ + + + + + + + + + + + + +
+ Thomas-Krenn-Wiki +
+ ' . h($article['title']) . ' +
+ Veröffentlicht am ' . h($article['date_de']) . ' von ' . h($article['author']) . '. +
+ + + + +
+ Jetzt Artikel lesen +
+
+
+ +
' . h($preheader) . ' ‌ ‌ ‌
+
+
-
- +