From 80bc0bb72847eb2bf042a594264fcb9657c9a43a Mon Sep 17 00:00:00 2001 From: smueller Date: Tue, 7 Jul 2026 12:22:08 +0200 Subject: [PATCH] Add top highlights section to newsletter HTML in index.php, enhancing content visibility. Updated hero headline and adjusted article layout for improved readability and aesthetics. --- index.php | 99 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 79 insertions(+), 20 deletions(-) diff --git a/index.php b/index.php index 40c23d1..c05f3f5 100644 --- a/index.php +++ b/index.php @@ -346,6 +346,7 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel $summaryText = $count === 1 ? 'In diesem Zeitraum wurde ein neuer Wiki-Artikel veröffentlicht.' : 'In diesem Zeitraum wurden ' . $count . ' neue Wiki-Artikel veröffentlicht.'; + $heroHeadline = 'Die wichtigsten Wiki-Updates fuer Ihr Team'; [$periodStart, $periodEnd] = newsletterPeriod((string)$config['period_mode']); $rangeEnd = $periodEnd; @@ -354,11 +355,46 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel } $dateRangeText = 'vom ' . $periodStart->format('d.m') . ' bis ' . $rangeEnd->format('d.m'); + $highlightsRows = ''; + if ($count > 0) { + $maxHighlights = min(3, $count); + for ($i = 0; $i < $maxHighlights; $i++) { + $highlightsRows .= ' + + + ' . ($i + 1) . '. + ' . h($articles[$i]['title']) . ' + + '; + } + } + + $highlightsSection = ''; + if ($highlightsRows !== '') { + $highlightsSection = ' + + + + + + + + + +
+ Top Highlights +
+ ' . $highlightsRows . '
+
+ + '; + } + $articleRows = ''; if ($count === 0) { $articleRows = ' - + -
@@ -372,20 +408,25 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel foreach ($articles as $article) { $articleRows .= '
+ - - - + + + @@ -394,7 +435,7 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
+ Wiki-Beitrag
+ ' . h($article['title']) . '
+ + Kompakte technische Einordnung und direkte Handlungsempfehlungen aus dem Thomas-Krenn-Wiki. +
Veröffentlicht am ' . h($article['date_de']) . ' von ' . h($article['author']) . '.
- Artikel lesen + Zum Beitrag
@@ -423,7 +464,7 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel $unsubscribeFooter = ''; $unsubscribeUrl = trim((string)($config['unsubscribe_url'] ?? '')); if ($unsubscribeUrl !== '' && $unsubscribeUrl !== '#' && filter_var($unsubscribeUrl, FILTER_VALIDATE_URL)) { - $unsubscribeFooter = '
Abmelden'; + $unsubscribeFooter = '
Abmelden'; } return ' @@ -443,9 +484,10 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel @media only screen and (max-width: 680px) { .email-container { width:100% !important; } .mobile-padding { padding-left:16px !important; padding-right:16px !important; } - .mobile-intro { font-size:16px !important; line-height:25px !important; } - .mobile-headline { font-size:30px !important; line-height:36px !important; } - .mobile-card-title { font-size:21px !important; line-height:28px !important; } + .mobile-intro { font-size:17px !important; line-height:27px !important; } + .mobile-headline { font-size:30px !important; line-height:37px !important; } + .mobile-card-title { font-size:22px !important; line-height:29px !important; } + .mobile-hero-copy { font-size:17px !important; line-height:26px !important; } } @@ -467,8 +509,8 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
Thomas-Krenn Wiki Update
-
' . h($periodLabel) . '
-
' . h($summaryText) . '
+
' . h($heroHeadline) . '
+
' . h($periodLabel) . ' | ' . h($summaryText) . '
@@ -480,17 +522,34 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel Guten Tag,

- hier finden Sie die aktuellen Beitraege aus dem Thomas-Krenn-Wiki ' . $dateRangeText . '.
- Alle Themen sind kuratiert, kompakt aufbereitet und direkt fuer Sie verlinkt. + hier ist Ihre kuratierte Uebersicht mit den wichtigsten Beitraegen aus dem Thomas-Krenn-Wiki ' . $dateRangeText . '.
+ Der Fokus liegt auf praxisnahen Themen, damit Ihr Team schneller zu Entscheidungen kommt. + ' . $highlightsSection . ' ' . $testBadge . ' ' . $articleRows . ' - + + + + + + + + +
+ Redaktionstipp +
+ Priorisieren Sie in dieser Ausgabe die Security- und Plattform-Artikel. Diese bringen in der Regel den groessten Hebel fuer Stabilitaet und Betriebssicherheit. +
+ + + + -
@@ -504,11 +563,11 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
-
- Tel.: +49 8551 9150 0 | Fax: +49 8551 9150 55
- thomas-krenn.com

- Thomas-Krenn.AG | Speltenbach-Steinaecker 1 | D-94078 Freyung +
+
+ Thomas-Krenn.AG | Speltenbach-Steinaecker 1 | D-94078 Freyung
+ Tel.: +49 8551 9150 0 | Fax: +49 8551 9150 55 | + thomas-krenn.com ' . $unsubscribeFooter . '