Remove outdated newsletter message file and update HTML layout in index.php and wiki.php. Adjusted padding, colors, and font sizes for improved readability, and added test badge visibility. Updated background color for better contrast.

This commit is contained in:
smueller
2026-07-07 10:35:09 +02:00
parent c9de9f6226
commit b71cf73f1e
4 changed files with 98 additions and 103 deletions

100
index.php
View File

@@ -339,33 +339,18 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
$replyEmail = trim((string)($config['reply_to'] ?: $config['from_email']));
$replyHref = 'mailto:' . $replyEmail;
$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
? '<tr>
<td style="padding:0 24px 12px 24px;" class="mobile-padding">
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#fff3cd" style="background-color:#fff3cd;border:1px solid #f4d58a;padding:6px 10px;font-family:Arial,Helvetica,sans-serif;font-size:11px;line-height:15px;font-weight:700;color:#7a5200;">
TESTVERSAND
</td>
</tr>
</table>
</td>
</tr>'
: '';
$articleRows = '';
if ($count === 0) {
$articleRows = '
<tr>
<td style="padding:0 24px 18px 24px;" class="mobile-padding">
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;border:1px solid #d7d7d7;background:#ffffff;">
<td style="padding:0 26px 18px 26px;" class="mobile-padding">
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;border:1px solid #d9dfe7;background:#ffffff;">
<tr>
<td style="padding:18px;font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:21px;color:#333333;">
<td style="padding:18px;font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:22px;color:#2b3340;">
Für diesen Zeitraum wurden keine neuen Artikel gefunden.
</td>
</tr>
@@ -376,29 +361,29 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
foreach ($articles as $article) {
$articleRows .= '
<tr>
<td style="padding:0 24px 18px 24px;" class="mobile-padding">
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;background:#ffffff;">
<td style="padding:0 26px 16px 26px;" class="mobile-padding">
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;background:#ffffff;border:1px solid #e2e7ee;border-left:4px solid #ef7d00;">
<tr>
<td style="padding:0 0 5px 0;font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:17px;color:#595959;">
<td style="padding:14px 16px 0 16px;font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:17px;color:#5c6675;">
Thomas-Krenn-Wiki
</td>
</tr>
<tr>
<td style="padding:0 0 5px 0;font-family:Arial,Helvetica,sans-serif;font-size:22px;line-height:28px;font-weight:700;color:#ef7d00;">
<td style="padding:4px 16px 6px 16px;font-family:Arial,Helvetica,sans-serif;font-size:21px;line-height:28px;font-weight:700;color:#ef7d00;">
<a href="' . h($article['url']) . '" target="_blank" style="color:#ef7d00;text-decoration:none;">' . h($article['title']) . '</a>
</td>
</tr>
<tr>
<td style="padding:0 0 10px 0;font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:22px;color:#2e2e2e;">
<td style="padding:0 16px 12px 16px;font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:21px;color:#313844;">
Veröffentlicht am ' . h($article['date_de']) . ' von ' . h($article['author']) . '.
</td>
</tr>
<tr>
<td style="padding:0;">
<td style="padding:0 16px 15px 16px;">
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#ef7d00" style="background:#ef7d00;">
<a href="' . h($article['url']) . '" target="_blank" style="display:inline-block;padding:8px 14px;font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:16px;color:#ffffff;text-decoration:none;">Jetzt Artikel lesen</a>
<a href="' . h($article['url']) . '" target="_blank" style="display:inline-block;padding:8px 14px;font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:16px;font-weight:700;color:#ffffff;text-decoration:none;">Jetzt Artikel lesen</a>
</td>
</tr>
</table>
@@ -410,6 +395,20 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
}
}
$testBadge = $isTest
? '<tr>
<td style="padding:0 26px 12px 26px;" class="mobile-padding">
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#fff3cd" style="background:#fff3cd;border:1px solid #f3d38a;padding:6px 10px;font-family:Arial,Helvetica,sans-serif;font-size:11px;line-height:14px;font-weight:700;color:#7a5200;">
TESTVERSAND
</td>
</tr>
</table>
</td>
</tr>'
: '';
$unsubscribeFooter = '';
$unsubscribeUrl = trim((string)($config['unsubscribe_url'] ?? ''));
if ($unsubscribeUrl !== '' && $unsubscribeUrl !== '#' && filter_var($unsubscribeUrl, FILTER_VALIDATE_URL)) {
@@ -424,58 +423,57 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Thomas-Krenn Wiki Newsletter</title>
<style type="text/css">
html, body { margin:0 !important; padding:0 !important; width:100% !important; background:#e6e6e6; }
html, body { margin:0 !important; padding:0 !important; width:100% !important; background:#dadada; }
table, td { border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; }
img { border:0; outline:none; text-decoration:none; -ms-interpolation-mode:bicubic; display:block; }
a { text-decoration:none; }
* { -ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; }
.preheader { display:none !important; visibility:hidden; opacity:0; color:transparent; height:0; width:0; max-height:0; max-width:0; overflow:hidden; mso-hide:all; }
@media only screen and (max-width: 640px) {
@media only screen and (max-width: 680px) {
.email-container { width:100% !important; }
.mobile-padding { padding-left:14px !important; padding-right:14px !important; }
.mobile-body { font-size:15px !important; line-height:23px !important; }
.mobile-title { font-size:19px !important; line-height:25px !important; }
.mobile-intro { font-size:16px !important; line-height:24px !important; }
}
</style>
</head>
<body style="margin:0;padding:0;background:#e6e6e6;">
<body style="margin:0;padding:0;background:#dadada;">
<div class="preheader">' . h($preheader) . '&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;</div>
<center role="article" aria-roledescription="email" lang="de" style="width:100%;background:#e6e6e6;">
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#e6e6e6" style="width:100%;background:#e6e6e6;">
<center role="article" aria-roledescription="email" lang="de" style="width:100%;background:#dadada;">
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#dadada" style="width:100%;background:#dadada;">
<tr>
<td align="center" style="padding:6px 8px;">
<table role="presentation" width="620" border="0" cellspacing="0" cellpadding="0" class="email-container" style="width:100%;max-width:620px;background:#ffffff;">
<td align="center" style="padding:12px 8px;">
<table role="presentation" width="690" border="0" cellspacing="0" cellpadding="0" class="email-container" style="width:100%;max-width:690px;background:#ffffff;">
<tr>
<td align="center" style="padding:8px 20px 6px 20px;font-family:Arial,Helvetica,sans-serif;font-size:11px;line-height:15px;color:#4e4e4e;">
<td align="center" style="padding:10px 26px 7px 26px;font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:16px;color:#4e5561;">
Sollte diese E-Mail nicht einwandfrei dargestellt werden, klicken Sie bitte hier.
</td>
</tr>
<tr>
<td align="center" style="padding:4px 20px 10px 20px;font-family:Arial,Helvetica,sans-serif;font-size:30px;line-height:32px;font-weight:700;color:#555555;">
<td align="center" style="padding:5px 26px 12px 26px;font-family:Arial,Helvetica,sans-serif;font-size:52px;line-height:46px;font-weight:700;color:#4c5461;letter-spacing:0.6px;">
THOMAS<br>KRENN
</td>
</tr>
<tr>
<td style="padding:0 24px;" class="mobile-padding">
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;background:#142232;">
<td style="padding:0 26px;" class="mobile-padding">
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;background:#10233a;">
<tr>
<td style="padding:16px 14px;font-family:Arial,Helvetica,sans-serif;color:#ffffff;">
<div style="font-size:12px;line-height:16px;font-weight:700;letter-spacing:0.6px;color:#ef7d00;">NEWSLETTER</div>
<div class="mobile-title" style="font-size:24px;line-height:30px;font-weight:700;color:#ffffff;">' . h($periodLabel) . '</div>
<td style="padding:18px 18px 20px 18px;font-family:Arial,Helvetica,sans-serif;">
<div style="font-size:30px;line-height:16px;font-weight:700;color:#ef7d00;letter-spacing:0.7px;">NEWSLETTER</div>
<div style="font-size:45px;line-height:30px;font-weight:700;color:#ffffff;margin-top:6px;">' . h($periodLabel) . '</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:10px 24px 8px 24px;background:#f3f3f3;" class="mobile-padding">
<td style="padding:14px 26px 12px 26px;background:#eef0f3;" class="mobile-padding">
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="mobile-body" style="font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:21px;color:#1f1f1f;">
<td class="mobile-intro" style="font-family:Arial,Helvetica,sans-serif;font-size:17px;line-height:27px;color:#1e2530;">
Guten Tag,<br><br>
„oh mei“ sagen wir in Bayern, wenn mal was schiefgeht. In diesem Newsletter finden Sie aktuelles und kostenfreies IT-Know-how aus dem Thomas-Krenn-Wiki.
<br><br>' . $summaryText . '
<br><br>Viel Spaß beim Lesen wünscht<br>Ihr Team von Thomas-Krenn
hier ist Ihre aktuelle Übersicht aus dem Thomas-Krenn-Wiki.<br>
' . $summaryText . '<br><br>
Viel Spaß beim Lesen wünscht<br>Ihr Team von Thomas-Krenn
</td>
</tr>
</table>
@@ -484,10 +482,10 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
' . $testBadge . '
' . $articleRows . '
<tr>
<td style="padding:0 24px 18px 24px;" class="mobile-padding">
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;">
<td style="padding:4px 26px 20px 26px;" class="mobile-padding">
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:22px;color:#2e2e2e;">
<td style="font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:22px;color:#2a303b;">
Haben Sie Fragen oder einen Themenwunsch?
<a href="' . h($replyHref) . '" style="color:#ef7d00;text-decoration:underline;">Kontaktieren Sie uns gerne direkt.</a>
</td>
@@ -496,8 +494,8 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
</td>
</tr>
<tr>
<td style="background:#ececec;padding:18px 24px;text-align:center;font-family:Arial,Helvetica,sans-serif;">
<div style="font-size:12px;line-height:18px;color:#666666;">
<td style="background:#eceef1;padding:20px 26px;text-align:center;font-family:Arial,Helvetica,sans-serif;">
<div style="font-size:12px;line-height:20px;color:#646d7b;">
Tel.: +49 8551 9150 0 | Fax: +49 8551 9150 55<br>
<a href="https://www.thomas-krenn.com/de/wiki/Hauptseite" target="_blank" style="color:#ef7d00;text-decoration:underline;">thomas-krenn.com</a><br><br>
Thomas-Krenn.AG | Speltenbach-Steinäcker 1 | D-94078 Freyung