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) . ' ‌ ‌ ‌
+
+
-
- +