Refine newsletter HTML layout in index.php by updating padding, font sizes, and background colors for improved aesthetics and readability. Adjusted article count message for grammatical accuracy in German.
This commit is contained in:
87
index.php
87
index.php
@@ -344,7 +344,7 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
||||
$replyEmail = trim((string)($config['reply_to'] ?: $config['from_email']));
|
||||
$replyHref = 'mailto:' . $replyEmail;
|
||||
$summaryText = $count === 1
|
||||
? 'In diesem Zeitraum wurde 1 neuer Wiki-Artikel veröffentlicht.'
|
||||
? 'In diesem Zeitraum wurde ein neuer Wiki-Artikel veröffentlicht.'
|
||||
: 'In diesem Zeitraum wurden ' . $count . ' neue Wiki-Artikel veröffentlicht.';
|
||||
|
||||
[$periodStart, $periodEnd] = newsletterPeriod((string)$config['period_mode']);
|
||||
@@ -358,10 +358,10 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
||||
if ($count === 0) {
|
||||
$articleRows = '
|
||||
<tr>
|
||||
<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;">
|
||||
<td style="padding:0 32px 22px 32px;" class="mobile-padding">
|
||||
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;border:1px solid #d7dee8;background:#ffffff;border-radius:14px;">
|
||||
<tr>
|
||||
<td style="padding:18px;font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:22px;color:#2b3340;">
|
||||
<td style="padding:22px;font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:23px;color:#2e3b4d;">
|
||||
Für diesen Zeitraum wurden keine neuen Artikel gefunden.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -372,29 +372,29 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
||||
foreach ($articles as $article) {
|
||||
$articleRows .= '
|
||||
<tr>
|
||||
<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;">
|
||||
<td style="padding:0 32px 18px 32px;" class="mobile-padding">
|
||||
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;background:#ffffff;border:1px solid #d7dee8;border-radius:14px;">
|
||||
<tr>
|
||||
<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 style="padding:18px 22px 4px 22px;font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:17px;color:#6a7688;font-weight:700;letter-spacing:.4px;text-transform:uppercase;">
|
||||
Wiki-Beitrag
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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 style="padding:0 22px 8px 22px;font-family:Arial,Helvetica,sans-serif;font-size:23px;line-height:31px;font-weight:700;color:#122845;">
|
||||
<a href="' . h($article['url']) . '" target="_blank" style="color:#122845;text-decoration:none;">' . h($article['title']) . '</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:0 16px 12px 16px;font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:21px;color:#313844;">
|
||||
<td style="padding:0 22px 16px 22px;font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:22px;color:#334257;">
|
||||
Veröffentlicht am ' . h($article['date_de']) . ' von ' . h($article['author']) . '.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:0 16px 15px 16px;">
|
||||
<td style="padding:0 22px 20px 22px;">
|
||||
<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;font-weight:700;color:#ffffff;text-decoration:none;">Jetzt Artikel lesen</a>
|
||||
<a href="' . h($article['url']) . '" target="_blank" style="display:inline-block;padding:11px 18px;font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:16px;font-weight:700;color:#ffffff;text-decoration:none;">Artikel lesen</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -408,10 +408,10 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
||||
|
||||
$testBadge = $isTest
|
||||
? '<tr>
|
||||
<td style="padding:0 26px 12px 26px;" class="mobile-padding">
|
||||
<td style="padding:0 32px 14px 32px;" 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;">
|
||||
<td bgcolor="#fff4e6" style="background:#fff4e6;border:1px solid #ffd2a3;padding:8px 12px;font-family:Arial,Helvetica,sans-serif;font-size:11px;line-height:14px;font-weight:700;color:#a34f00;">
|
||||
TESTVERSAND
|
||||
</td>
|
||||
</tr>
|
||||
@@ -434,7 +434,7 @@ 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:#dadada; }
|
||||
html, body { margin:0 !important; padding:0 !important; width:100% !important; background:#e8edf3; }
|
||||
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; }
|
||||
@@ -442,46 +442,47 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
||||
.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: 680px) {
|
||||
.email-container { width:100% !important; }
|
||||
.mobile-padding { padding-left:14px !important; padding-right:14px !important; }
|
||||
.mobile-intro { font-size:16px !important; line-height:24px !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; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body style="margin:0;padding:0;background:#dadada;">
|
||||
<body style="margin:0;padding:0;background:#e8edf3;">
|
||||
<div class="preheader">' . h($preheader) . ' ‌ ‌ ‌</div>
|
||||
<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;">
|
||||
<center role="article" aria-roledescription="email" lang="de" style="width:100%;background:#e8edf3;">
|
||||
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#e8edf3" style="width:100%;background:#e8edf3;">
|
||||
<tr>
|
||||
<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;">
|
||||
<td align="center" style="padding:22px 10px;">
|
||||
<table role="presentation" width="700" border="0" cellspacing="0" cellpadding="0" class="email-container" style="width:100%;max-width:700px;background:#ffffff;">
|
||||
<tr>
|
||||
<td align="center" style="padding:8px 26px 14px 26px;">
|
||||
<img src="https://www.thomas-krenn.com/res/pics/tk_logo_340px.png" width="170" alt="Thomas-Krenn Logo" style="display:block;margin:0 auto;border:0;outline:none;text-decoration:none;height:auto;">
|
||||
<td align="center" style="padding:24px 32px 18px 32px;">
|
||||
<img src="https://www.thomas-krenn.com/res/pics/tk_logo_340px.png" width="182" alt="Thomas-Krenn Logo" style="display:block;margin:0 auto;border:0;outline:none;text-decoration:none;height:auto;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:0 26px;" class="mobile-padding">
|
||||
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;background:#10233a;">
|
||||
<td style="padding:0 32px;" class="mobile-padding">
|
||||
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;background:#102a46;">
|
||||
<tr>
|
||||
<td style="padding:18px 18px 20px 18px;font-family:Arial,Helvetica,sans-serif;">
|
||||
<div style="font-size:13px;line-height:18px;font-weight:700;color:#ef7d00;letter-spacing:0.7px;">NEWSLETTER</div>
|
||||
<div style="font-size:20px;line-height:26px;font-weight:700;color:#ffffff;margin-top:2px;">' . h($periodLabel) . '</div>
|
||||
<td style="padding:30px 26px;font-family:Arial,Helvetica,sans-serif;">
|
||||
<div style="font-size:12px;line-height:16px;font-weight:700;color:#ef7d00;letter-spacing:1px;text-transform:uppercase;">Thomas-Krenn Wiki Update</div>
|
||||
<div class="mobile-headline" style="font-size:36px;line-height:42px;font-weight:700;color:#ffffff;margin-top:10px;">' . h($periodLabel) . '</div>
|
||||
<div style="font-size:16px;line-height:24px;color:#bfd0e2;margin-top:10px;">' . h($summaryText) . '</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:14px 26px 12px 26px;background:#eef0f3;" class="mobile-padding">
|
||||
<td style="padding:22px 32px 22px 32px;" class="mobile-padding">
|
||||
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="mobile-intro" style="font-family:Arial,Helvetica,sans-serif;font-size:17px;line-height:27px;color:#1e2530;">
|
||||
<td class="mobile-intro" style="font-family:Arial,Helvetica,sans-serif;font-size:18px;line-height:29px;color:#22324a;">
|
||||
Guten Tag,<br><br>
|
||||
hier erhalten Sie Ihre aktuelle Übersicht aus dem Thomas-Krenn-Wiki, ' . $dateRangeText . '.<br>
|
||||
' . $summaryText . '<br><br>
|
||||
Viel Spaß beim Lesen wünscht<br>Ihr Team von Thomas-Krenn
|
||||
hier finden Sie die aktuellen Beitraege aus dem Thomas-Krenn-Wiki ' . $dateRangeText . '.<br>
|
||||
Alle Themen sind kuratiert, kompakt aufbereitet und direkt fuer Sie verlinkt.
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -489,23 +490,25 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
||||
' . $testBadge . '
|
||||
' . $articleRows . '
|
||||
<tr>
|
||||
<td style="padding:4px 26px 20px 26px;" class="mobile-padding">
|
||||
<td style="padding:2px 32px 28px 32px;" 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:#2a303b;">
|
||||
<td style="font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:24px;color:#2a3950;">
|
||||
Haben Sie Fragen oder einen Themenwunsch?
|
||||
<a href="' . h($replyHref) . '" style="color:#ef7d00;text-decoration:underline;">Kontaktieren Sie uns gerne direkt.</a>
|
||||
<a href="' . h($replyHref) . '" style="color:#ef7d00;text-decoration:underline;">Schreiben Sie uns gerne direkt.</a><br><br>
|
||||
Viele Gruesse<br>
|
||||
Ihr Thomas-Krenn Team
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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;">
|
||||
<td style="background:#0f243d;padding:26px 26px;text-align:center;font-family:Arial,Helvetica,sans-serif;">
|
||||
<div style="font-size:12px;line-height:20px;color:#b8c5d4;">
|
||||
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
|
||||
Thomas-Krenn.AG | Speltenbach-Steinaecker 1 | D-94078 Freyung
|
||||
' . $unsubscribeFooter . '
|
||||
</div>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user