Files
Munich-news/news_sender/newsletter_template.html
2025-11-16 20:59:14 +01:00

352 lines
20 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Munich News Daily</title>
<!--[if mso]>
<style type="text/css">
body, table, td {font-family: Arial, Helvetica, sans-serif !important;}
</style>
<![endif]-->
</head>
<body style="margin: 0; padding: 0; background-color: #f4f4f4; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;">
<!-- Wrapper Table -->
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color: #f4f4f4;">
<tr>
<td align="center" style="padding: 20px 0;">
<!-- Main Container -->
<table role="presentation" width="600" cellpadding="0" cellspacing="0" border="0" style="background-color: #ffffff; max-width: 600px;">
<!-- Header -->
<tr>
<td style="background-color: #1a1a1a; padding: 30px 40px; text-align: center;">
<h1 style="margin: 0 0 8px 0; font-size: 28px; font-weight: 700; color: #ffffff; letter-spacing: -0.5px;">
Munich News Daily
</h1>
<p style="margin: 0; font-size: 14px; color: #999999; letter-spacing: 0.5px;">
{{ date }}
</p>
</td>
</tr>
<!-- Greeting -->
<tr>
<td style="padding: 30px 40px 20px 40px;">
<p style="margin: 0; font-size: 16px; line-height: 1.5; color: #333333;">
Good morning ☀️
</p>
<p style="margin: 15px 0 0 0; font-size: 15px; line-height: 1.6; color: #666666; text-align: justify;">
Here's what's happening in Munich today. We've summarized {{ article_count }} stories using AI so you can stay informed in under 5 minutes.
</p>
{% if weather and weather.success %}
<!-- Weather Widget -->
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="margin-top: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; overflow: hidden;">
<tr>
<td style="padding: 20px;">
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="width: 60%; vertical-align: middle;">
<p style="margin: 0 0 5px 0; font-size: 13px; color: rgba(255,255,255,0.9); font-weight: 600;">
TODAY'S WEATHER
</p>
<p style="margin: 0; font-size: 32px; color: #ffffff; font-weight: 700; line-height: 1;">
{{ weather.icon }} {{ weather.temperature }}°C
</p>
<p style="margin: 5px 0 0 0; font-size: 14px; color: rgba(255,255,255,0.9);">
{{ weather.condition }}
</p>
</td>
<td style="width: 40%; text-align: right; vertical-align: middle;">
<p style="margin: 0; font-size: 14px; color: rgba(255,255,255,0.9);">
High: <strong style="color: #ffffff;">{{ weather.high }}°C</strong>
</p>
<p style="margin: 5px 0 0 0; font-size: 14px; color: rgba(255,255,255,0.9);">
Low: <strong style="color: #ffffff;">{{ weather.low }}°C</strong>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
{% endif %}
</td>
</tr>
<!-- Divider -->
<tr>
<td style="padding: 0 40px;">
<div style="height: 1px; background-color: #e0e0e0;"></div>
</td>
</tr>
<!-- TL;DR Section -->
<tr>
<td style="padding: 30px 40px;">
<h2 style="margin: 0 0 20px 0; font-size: 22px; font-weight: 700; color: #1a1a1a;">
📋 TL;DR - Quick Summary
</h2>
<p style="margin: 0 0 15px 0; font-size: 14px; color: #666666;">
Here's everything in one sentence each:
</p>
{% for section in category_sections %}
{% for article in section.articles %}
<div style="margin-bottom: 12px; padding-left: 20px; position: relative;">
<span style="position: absolute; left: 0; top: 0; color: #667eea; font-weight: 700;">{{ loop.index }}.</span>
<p style="margin: 0; font-size: 14px; line-height: 1.5; color: #333333;">
<strong>{{ article.title_en if article.title_en else article.title }}</strong>
{{ article.summary.split('.')[0] }}.
</p>
</div>
{% endfor %}
{% endfor %}
</td>
</tr>
{% if transport_disruptions and transport_disruptions|length > 0 %}
<!-- Divider -->
<tr>
<td style="padding: 0 40px;">
<div style="height: 2px; background-color: #e0e0e0;"></div>
</td>
</tr>
<!-- Transport Disruptions Section -->
<tr>
<td style="padding: 30px 40px;">
<h2 style="margin: 0 0 20px 0; font-size: 22px; font-weight: 700; color: #1a1a1a;">
🚆 S-Bahn Disruptions Today
</h2>
<p style="margin: 0 0 20px 0; font-size: 14px; color: #666666;">
Current service disruptions affecting Munich S-Bahn:
</p>
{% for disruption in transport_disruptions %}
<!-- Disruption Card -->
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="margin-bottom: 15px; background-color: #fff8f0; border-left: 4px solid #ff9800; border-radius: 4px;">
<tr>
<td style="padding: 15px 20px;">
<!-- Severity and Lines -->
<p style="margin: 0 0 8px 0; font-size: 13px; color: #666666;">
{{ disruption.severity_icon }} <strong style="color: #000000;">{{ disruption.lines_str }}</strong>
</p>
<!-- Title -->
<p style="margin: 0 0 8px 0; font-size: 15px; font-weight: 700; color: #1a1a1a; line-height: 1.4;">
{{ disruption.title }}
</p>
<!-- Description -->
{% if disruption.description %}
<p style="margin: 0 0 8px 0; font-size: 14px; color: #333333; line-height: 1.5;">
{{ disruption.description }}
</p>
{% endif %}
<!-- Time -->
{% if disruption.start_time_str or disruption.end_time_str %}
<p style="margin: 0; font-size: 13px; color: #666666;">
{% if disruption.start_time_str %}
From {{ disruption.start_time_str }}
{% endif %}
{% if disruption.end_time_str %}
until {{ disruption.end_time_str }}
{% endif %}
</p>
{% endif %}
</td>
</tr>
</table>
{% endfor %}
<p style="margin: 15px 0 0 0; font-size: 12px; color: #999999; font-style: italic;">
💡 Plan your commute accordingly. Check <a href="https://www.mvg.de" style="color: #667eea; text-decoration: none;">MVG.de</a> for real-time updates.
</p>
</td>
</tr>
{% endif %}
<!-- Divider -->
<tr>
<td style="padding: 0 40px;">
<div style="height: 2px; background-color: #e0e0e0;"></div>
</td>
</tr>
<!-- Category Sections -->
{% for section in category_sections %}
<tr>
<td style="padding: 30px 40px 15px 40px;">
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<h2 style="margin: 0; font-size: 22px; font-weight: 700; color: #1a1a1a;">
{{ section.icon }} {{ section.name }}
</h2>
<p style="margin: 8px 0 0 0; font-size: 13px; color: #666666;">
Top stories in {{ section.name.lower() }}
</p>
</td>
</tr>
</table>
</td>
</tr>
<!-- Category Articles -->
{% for article in section.articles %}
<tr>
<td style="padding: 25px 40px;">
<!-- Article Number Badge -->
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<span style="display: inline-block; background-color: #000000; color: #ffffff; width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%; font-size: 12px; font-weight: 600;">
{{ loop.index }}
</span>
</td>
</tr>
</table>
<!-- Article Title -->
<h2 style="margin: 12px 0 8px 0; font-size: 19px; font-weight: 700; line-height: 1.3; color: #1a1a1a;">
{{ article.title_en if article.title_en else article.title }}
</h2>
<!-- Original German Title (subtitle) -->
{% if article.title_en and article.title_en != article.title %}
<p style="margin: 0 0 12px 0; font-size: 13px; color: #999999; font-style: italic;">
Original: {{ article.title }}
</p>
{% endif %}
<!-- Article Meta -->
<p style="margin: 0 0 12px 0; font-size: 13px; color: #999999;">
{% if article.is_clustered %}
<span style="color: #000000; font-weight: 600;">Multiple sources</span>
{% else %}
<span style="color: #000000; font-weight: 600;">{{ article.source }}</span>
{% if article.author %}
<span> • {{ article.author }}</span>
{% endif %}
{% endif %}
</p>
<!-- Article Summary -->
<p style="margin: 0 0 15px 0; font-size: 15px; line-height: 1.6; color: #333333; text-align: justify;">
{{ article.summary }}
</p>
<!-- Read More Links -->
{% if article.is_clustered and article.sources %}
<!-- Multiple sources -->
<p style="margin: 0 0 8px 0; font-size: 13px; color: #666666;">
📰 Covered by {{ article.article_count }} sources:
</p>
<div style="margin: 0;">
{% for source in article.sources %}
<a href="{{ source.link }}" style="display: inline-block; color: #000000; text-decoration: none; font-size: 13px; font-weight: 600; border-bottom: 2px solid #000000; padding-bottom: 2px; margin-right: 15px; margin-bottom: 8px;">
{{ source.name }} →
</a>
{% endfor %}
</div>
{% else %}
<!-- Single source -->
<a href="{{ article.link }}" style="display: inline-block; color: #000000; text-decoration: none; font-size: 14px; font-weight: 600; border-bottom: 2px solid #000000; padding-bottom: 2px;">
Read more →
</a>
{% endif %}
</td>
</tr>
<!-- Article Divider -->
{% if not loop.last %}
<tr>
<td style="padding: 0 40px;">
<div style="height: 1px; background-color: #f0f0f0;"></div>
</td>
</tr>
{% endif %}
{% endfor %}
<!-- Category Section Divider -->
{% if not loop.last %}
<tr>
<td style="padding: 25px 40px;">
<div style="height: 2px; background-color: #e0e0e0;"></div>
</td>
</tr>
{% endif %}
{% endfor %}
<!-- Bottom Divider -->
<tr>
<td style="padding: 25px 40px 0 40px;">
<div style="height: 1px; background-color: #e0e0e0;"></div>
</td>
</tr>
<td style="padding: 30px 40px;">
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color: #f8f8f8; border-radius: 8px;">
<tr>
<td style="padding: 25px; text-align: center;">
<p style="margin: 0 0 8px 0; font-size: 13px; color: #666666; text-transform: uppercase; letter-spacing: 1px; font-weight: 600;">
Today's Digest
</p>
<p style="margin: 0; font-size: 36px; font-weight: 700; color: #000000;">
{{ article_count }}
</p>
<p style="margin: 8px 0 0 0; font-size: 14px; color: #666666;">
stories • AI-summarized • 5 min read
</p>
</td>
</tr>
</table>
</td>
<!-- Footer -->
<tr>
<td style="background-color: #1a1a1a; padding: 30px 40px; text-align: center;">
<p style="margin: 0 0 15px 0; font-size: 14px; color: #ffffff; font-weight: 600;">
Munich News Daily
</p>
<p style="margin: 0 0 20px 0; font-size: 13px; color: #999999; line-height: 1.5;">
AI-powered news summaries for busy people.<br>
Delivered daily to your inbox.
</p>
<!-- Footer Links -->
<p style="margin: 0; font-size: 12px; color: #666666;">
<a href="{{ website_link }}" style="color: #999999; text-decoration: none;">Visit Website</a>
<span style="color: #444444;"></span>
<a href="{{ preferences_link }}" style="color: #999999; text-decoration: none;">Manage Preferences</a>
<span style="color: #444444;"></span>
<a href="{{ unsubscribe_link }}" style="color: #999999; text-decoration: none;">Unsubscribe</a>
</p>
{% if tracking_enabled %}
<!-- Privacy Notice -->
<p style="margin: 20px 0 0 0; font-size: 11px; color: #666666; line-height: 1.4;">
This email contains tracking to measure engagement and improve our content.<br>
We respect your privacy and anonymize data after 90 days.
</p>
{% endif %}
<p style="margin: 20px 0 0 0; font-size: 11px; color: #666666;">
© {{ year }} Munich News Daily. All rights reserved.
</p>
</td>
</tr>
</table>
<!-- End Main Container -->
</td>
</tr>
</table>
<!-- End Wrapper Table -->
</body>
</html>