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']));
|
$replyEmail = trim((string)($config['reply_to'] ?: $config['from_email']));
|
||||||
$replyHref = 'mailto:' . $replyEmail;
|
$replyHref = 'mailto:' . $replyEmail;
|
||||||
$summaryText = $count === 1
|
$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.';
|
: 'In diesem Zeitraum wurden ' . $count . ' neue Wiki-Artikel veröffentlicht.';
|
||||||
|
|
||||||
[$periodStart, $periodEnd] = newsletterPeriod((string)$config['period_mode']);
|
[$periodStart, $periodEnd] = newsletterPeriod((string)$config['period_mode']);
|
||||||
@@ -358,10 +358,10 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
|||||||
if ($count === 0) {
|
if ($count === 0) {
|
||||||
$articleRows = '
|
$articleRows = '
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:0 26px 18px 26px;" class="mobile-padding">
|
<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 #d9dfe7;background:#ffffff;">
|
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;border:1px solid #d7dee8;background:#ffffff;border-radius:14px;">
|
||||||
<tr>
|
<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.
|
Für diesen Zeitraum wurden keine neuen Artikel gefunden.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -372,29 +372,29 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
|||||||
foreach ($articles as $article) {
|
foreach ($articles as $article) {
|
||||||
$articleRows .= '
|
$articleRows .= '
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:0 26px 16px 26px;" class="mobile-padding">
|
<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 #e2e7ee;border-left:4px solid #ef7d00;">
|
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;background:#ffffff;border:1px solid #d7dee8;border-radius:14px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:14px 16px 0 16px;font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:17px;color:#5c6675;">
|
<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;">
|
||||||
Thomas-Krenn-Wiki
|
Wiki-Beitrag
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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;">
|
<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:#ef7d00;text-decoration:none;">' . h($article['title']) . '</a>
|
<a href="' . h($article['url']) . '" target="_blank" style="color:#122845;text-decoration:none;">' . h($article['title']) . '</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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']) . '.
|
Veröffentlicht am ' . h($article['date_de']) . ' von ' . h($article['author']) . '.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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">
|
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="#ef7d00" style="background:#ef7d00;">
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -408,10 +408,10 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
|||||||
|
|
||||||
$testBadge = $isTest
|
$testBadge = $isTest
|
||||||
? '<tr>
|
? '<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">
|
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<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
|
TESTVERSAND
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -434,7 +434,7 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<title>Thomas-Krenn Wiki Newsletter</title>
|
<title>Thomas-Krenn Wiki Newsletter</title>
|
||||||
<style type="text/css">
|
<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; }
|
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; }
|
img { border:0; outline:none; text-decoration:none; -ms-interpolation-mode:bicubic; display:block; }
|
||||||
a { text-decoration:none; }
|
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; }
|
.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) {
|
@media only screen and (max-width: 680px) {
|
||||||
.email-container { width:100% !important; }
|
.email-container { width:100% !important; }
|
||||||
.mobile-padding { padding-left:14px !important; padding-right:14px !important; }
|
.mobile-padding { padding-left:16px !important; padding-right:16px !important; }
|
||||||
.mobile-intro { font-size:16px !important; line-height:24px !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>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body style="margin:0;padding:0;background:#dadada;">
|
<body style="margin:0;padding:0;background:#e8edf3;">
|
||||||
<div class="preheader">' . h($preheader) . ' ‌ ‌ ‌</div>
|
<div class="preheader">' . h($preheader) . ' ‌ ‌ ‌</div>
|
||||||
<center role="article" aria-roledescription="email" lang="de" 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="#dadada" style="width:100%;background:#dadada;">
|
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#e8edf3" style="width:100%;background:#e8edf3;">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" style="padding:12px 8px;">
|
<td align="center" style="padding:22px 10px;">
|
||||||
<table role="presentation" width="690" border="0" cellspacing="0" cellpadding="0" class="email-container" style="width:100%;max-width:690px;background:#ffffff;">
|
<table role="presentation" width="700" border="0" cellspacing="0" cellpadding="0" class="email-container" style="width:100%;max-width:700px;background:#ffffff;">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" style="padding:8px 26px 14px 26px;">
|
<td align="center" style="padding:24px 32px 18px 32px;">
|
||||||
<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;">
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:0 26px;" class="mobile-padding">
|
<td style="padding:0 32px;" class="mobile-padding">
|
||||||
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;background:#10233a;">
|
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;background:#102a46;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:18px 18px 20px 18px;font-family:Arial,Helvetica,sans-serif;">
|
<td style="padding:30px 26px;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:12px;line-height:16px;font-weight:700;color:#ef7d00;letter-spacing:1px;text-transform:uppercase;">Thomas-Krenn Wiki Update</div>
|
||||||
<div style="font-size:20px;line-height:26px;font-weight:700;color:#ffffff;margin-top:2px;">' . h($periodLabel) . '</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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<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">
|
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<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>
|
Guten Tag,<br><br>
|
||||||
hier erhalten Sie Ihre aktuelle Übersicht aus dem Thomas-Krenn-Wiki, ' . $dateRangeText . '.<br>
|
hier finden Sie die aktuellen Beitraege aus dem Thomas-Krenn-Wiki ' . $dateRangeText . '.<br>
|
||||||
' . $summaryText . '<br><br>
|
Alle Themen sind kuratiert, kompakt aufbereitet und direkt fuer Sie verlinkt.
|
||||||
Viel Spaß beim Lesen wünscht<br>Ihr Team von Thomas-Krenn
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
@@ -489,23 +490,25 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
|||||||
' . $testBadge . '
|
' . $testBadge . '
|
||||||
' . $articleRows . '
|
' . $articleRows . '
|
||||||
<tr>
|
<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">
|
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<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?
|
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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="background:#eceef1;padding:20px 26px;text-align:center;font-family:Arial,Helvetica,sans-serif;">
|
<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:#646d7b;">
|
<div style="font-size:12px;line-height:20px;color:#b8c5d4;">
|
||||||
Tel.: +49 8551 9150 0 | Fax: +49 8551 9150 55<br>
|
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>
|
<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 . '
|
' . $unsubscribeFooter . '
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user