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.
This commit is contained in:
99
index.php
99
index.php
@@ -346,6 +346,7 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
|||||||
$summaryText = $count === 1
|
$summaryText = $count === 1
|
||||||
? 'In diesem Zeitraum wurde ein 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.';
|
||||||
|
$heroHeadline = 'Die wichtigsten Wiki-Updates fuer Ihr Team';
|
||||||
|
|
||||||
[$periodStart, $periodEnd] = newsletterPeriod((string)$config['period_mode']);
|
[$periodStart, $periodEnd] = newsletterPeriod((string)$config['period_mode']);
|
||||||
$rangeEnd = $periodEnd;
|
$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');
|
$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 .= '
|
||||||
|
<tr>
|
||||||
|
<td style="padding:0 0 8px 0;font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:22px;color:#2f3237;">
|
||||||
|
<span style="display:inline-block;min-width:22px;font-weight:700;color:#ff7d00;">' . ($i + 1) . '.</span>
|
||||||
|
<a href="' . h($articles[$i]['url']) . '" target="_blank" style="color:#2f3237;text-decoration:none;">' . h($articles[$i]['title']) . '</a>
|
||||||
|
</td>
|
||||||
|
</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$highlightsSection = '';
|
||||||
|
if ($highlightsRows !== '') {
|
||||||
|
$highlightsSection = '
|
||||||
|
<tr>
|
||||||
|
<td style="padding:0 32px 20px 32px;" class="mobile-padding">
|
||||||
|
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;background:#fff7f0;border:1px solid #ffd6b0;border-radius:12px;">
|
||||||
|
<tr>
|
||||||
|
<td style="padding:16px 18px 8px 18px;font-family:Arial,Helvetica,sans-serif;font-size:11px;line-height:15px;color:#8e4e12;font-weight:700;letter-spacing:.8px;text-transform:uppercase;">
|
||||||
|
Top Highlights
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding:0 18px 12px 18px;">
|
||||||
|
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0">' . $highlightsRows . '</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
$articleRows = '';
|
$articleRows = '';
|
||||||
if ($count === 0) {
|
if ($count === 0) {
|
||||||
$articleRows = '
|
$articleRows = '
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:0 32px 22px 32px;" class="mobile-padding">
|
<td style="padding:0 32px 24px 32px;" class="mobile-padding">
|
||||||
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;border:1px solid #d8e0ea;background:#ffffff;border-radius:14px;">
|
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;border:1px solid #d8e0ea;background:#ffffff;border-radius:14px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:22px;font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:23px;color:#2e3b4d;">
|
<td style="padding:22px;font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:23px;color:#2e3b4d;">
|
||||||
@@ -372,20 +408,25 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
|||||||
foreach ($articles as $article) {
|
foreach ($articles as $article) {
|
||||||
$articleRows .= '
|
$articleRows .= '
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:0 32px 18px 32px;" class="mobile-padding">
|
<td style="padding:0 32px 16px 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;">
|
<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:18px 22px 4px 22px;font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:17px;color:#5f6d82;font-weight:700;letter-spacing:.4px;text-transform:uppercase;">
|
<td style="padding:18px 22px 4px 22px;font-family:Arial,Helvetica,sans-serif;font-size:11px;line-height:16px;color:#5f6d82;font-weight:700;letter-spacing:.7px;text-transform:uppercase;">
|
||||||
Wiki-Beitrag
|
Wiki-Beitrag
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="mobile-card-title" style="padding:0 22px 8px 22px;font-family:Arial,Helvetica,sans-serif;font-size:23px;line-height:31px;font-weight:700;color:#2f3237;">
|
<td class="mobile-card-title" style="padding:0 22px 6px 22px;font-family:Arial,Helvetica,sans-serif;font-size:24px;line-height:32px;font-weight:700;color:#2f3237;">
|
||||||
<a href="' . h($article['url']) . '" target="_blank" style="color:#2f3237;text-decoration:none;">' . h($article['title']) . '</a>
|
<a href="' . h($article['url']) . '" target="_blank" style="color:#2f3237;text-decoration:none;">' . h($article['title']) . '</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:0 22px 16px 22px;font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:22px;color:#2f4159;">
|
<td style="padding:0 22px 8px 22px;font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:24px;color:#40444b;">
|
||||||
|
Kompakte technische Einordnung und direkte Handlungsempfehlungen aus dem Thomas-Krenn-Wiki.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding:0 22px 16px 22px;font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:20px;color:#667086;">
|
||||||
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>
|
||||||
@@ -394,7 +435,7 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
|||||||
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="#ff7d00" style="background:#ff7d00;">
|
<td bgcolor="#ff7d00" style="background:#ff7d00;">
|
||||||
<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>
|
<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;">Zum Beitrag</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -423,7 +464,7 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
|||||||
$unsubscribeFooter = '';
|
$unsubscribeFooter = '';
|
||||||
$unsubscribeUrl = trim((string)($config['unsubscribe_url'] ?? ''));
|
$unsubscribeUrl = trim((string)($config['unsubscribe_url'] ?? ''));
|
||||||
if ($unsubscribeUrl !== '' && $unsubscribeUrl !== '#' && filter_var($unsubscribeUrl, FILTER_VALIDATE_URL)) {
|
if ($unsubscribeUrl !== '' && $unsubscribeUrl !== '#' && filter_var($unsubscribeUrl, FILTER_VALIDATE_URL)) {
|
||||||
$unsubscribeFooter = '<br><a href="' . h($unsubscribeUrl) . '" target="_blank" style="color:#ef7d00;text-decoration:underline;">Abmelden</a>';
|
$unsubscribeFooter = '<br><a href="' . h($unsubscribeUrl) . '" target="_blank" style="color:#ff7d00;text-decoration:underline;">Abmelden</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<!doctype html>
|
return '<!doctype html>
|
||||||
@@ -443,9 +484,10 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
|||||||
@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:16px !important; padding-right:16px !important; }
|
.mobile-padding { padding-left:16px !important; padding-right:16px !important; }
|
||||||
.mobile-intro { font-size:16px !important; line-height:25px !important; }
|
.mobile-intro { font-size:17px !important; line-height:27px !important; }
|
||||||
.mobile-headline { font-size:30px !important; line-height:36px !important; }
|
.mobile-headline { font-size:30px !important; line-height:37px !important; }
|
||||||
.mobile-card-title { font-size:21px !important; line-height:28px !important; }
|
.mobile-card-title { font-size:22px !important; line-height:29px !important; }
|
||||||
|
.mobile-hero-copy { font-size:17px !important; line-height:26px !important; }
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
@@ -467,8 +509,8 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="padding:30px 26px;font-family:Arial,Helvetica,sans-serif;">
|
<td style="padding:30px 26px;font-family:Arial,Helvetica,sans-serif;">
|
||||||
<div style="font-size:12px;line-height:16px;font-weight:700;color:#ff7d00;letter-spacing:1px;text-transform:uppercase;">Thomas-Krenn Wiki Update</div>
|
<div style="font-size:12px;line-height:16px;font-weight:700;color:#ff7d00;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 class="mobile-headline" style="font-size:34px;line-height:40px;font-weight:700;color:#ffffff;margin-top:10px;">' . h($heroHeadline) . '</div>
|
||||||
<div style="font-size:16px;line-height:24px;color:#eef0f2;margin-top:10px;">' . h($summaryText) . '</div>
|
<div class="mobile-hero-copy" style="font-size:18px;line-height:27px;color:#ffffff;margin-top:10px;">' . h($periodLabel) . ' | ' . h($summaryText) . '</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -480,17 +522,34 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="mobile-intro" style="font-family:Arial,Helvetica,sans-serif;font-size:18px;line-height:29px;color:#22324a;">
|
<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 finden Sie die aktuellen Beitraege aus dem Thomas-Krenn-Wiki ' . $dateRangeText . '.<br>
|
hier ist Ihre kuratierte Uebersicht mit den wichtigsten Beitraegen aus dem Thomas-Krenn-Wiki ' . $dateRangeText . '.<br>
|
||||||
Alle Themen sind kuratiert, kompakt aufbereitet und direkt fuer Sie verlinkt.
|
Der Fokus liegt auf praxisnahen Themen, damit Ihr Team schneller zu Entscheidungen kommt.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
' . $highlightsSection . '
|
||||||
' . $testBadge . '
|
' . $testBadge . '
|
||||||
' . $articleRows . '
|
' . $articleRows . '
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:2px 32px 28px 32px;" class="mobile-padding">
|
<td style="padding:8px 32px 24px 32px;" class="mobile-padding">
|
||||||
|
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;background:#f7f8fa;border:1px solid #e1e5eb;border-radius:12px;">
|
||||||
|
<tr>
|
||||||
|
<td style="padding:16px 18px 8px 18px;font-family:Arial,Helvetica,sans-serif;font-size:11px;line-height:15px;color:#5f6064;font-weight:700;letter-spacing:.8px;text-transform:uppercase;">
|
||||||
|
Redaktionstipp
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding:0 18px 16px 18px;font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:24px;color:#32363d;">
|
||||||
|
Priorisieren Sie in dieser Ausgabe die Security- und Plattform-Artikel. Diese bringen in der Regel den groessten Hebel fuer Stabilitaet und Betriebssicherheit.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding:0 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:15px;line-height:24px;color:#2a3950;">
|
<td style="font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:24px;color:#2a3950;">
|
||||||
@@ -504,11 +563,11 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="background:#5f6064;padding:26px 26px;text-align:center;font-family:Arial,Helvetica,sans-serif;">
|
<td style="background:#5f6064;padding:22px 20px;text-align:center;font-family:Arial,Helvetica,sans-serif;">
|
||||||
<div style="font-size:12px;line-height:20px;color:#eef0f2;">
|
<div style="font-size:12px;line-height:19px;color:#eef0f2;">
|
||||||
Tel.: +49 8551 9150 0 | Fax: +49 8551 9150 55<br>
|
Thomas-Krenn.AG | Speltenbach-Steinaecker 1 | D-94078 Freyung<br>
|
||||||
<a href="https://www.thomas-krenn.com/de/wiki/Hauptseite" target="_blank" style="color:#ff7d00;text-decoration:underline;">thomas-krenn.com</a><br><br>
|
Tel.: +49 8551 9150 0 | Fax: +49 8551 9150 55 |
|
||||||
Thomas-Krenn.AG | Speltenbach-Steinaecker 1 | D-94078 Freyung
|
<a href="https://www.thomas-krenn.com/de/wiki/Hauptseite" target="_blank" style="color:#ff7d00;text-decoration:underline;">thomas-krenn.com</a>
|
||||||
' . $unsubscribeFooter . '
|
' . $unsubscribeFooter . '
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user