From e34a8ee64bd30414cd1c5642cbbe550fada6e283 Mon Sep 17 00:00:00 2001 From: Stefan Koelle Date: Fri, 7 Aug 2026 14:25:52 +0200 Subject: [PATCH] mail layout imp 2 --- src/mailer.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/mailer.py b/src/mailer.py index 7c19e21..070a616 100644 --- a/src/mailer.py +++ b/src/mailer.py @@ -89,12 +89,11 @@ def build_message(birthdays: list[dict], target_date: date | None = None) -> Ema age_str = f' · {age} Jahre' if age is not None else "" contact_link = f"{Config.WEB_URL.rstrip('/')}/contacts/{b['id']}" if Config.WEB_URL else "" is_today = b["birthday"].month == today.month and b["birthday"].day == today.day - card_bg = "#fff3cd" if is_today else "#ffffff" - border_color = "#ffc107" if is_today else "#e0e0e0" + card_bg = "#f0f0f0" if is_today else "#ffffff" org_html = f'
{b["organization"]}
' if b.get("organization") else "" photo_cell = "" if b.get("photo_url"): - photo_cell = f'' + photo_cell = f'' if contact_link: content_html = f"""
{b["full_name"]}
@@ -108,7 +107,7 @@ def build_message(birthdays: list[dict], target_date: date | None = None) -> Ema cards_html += f""" - +
{content_html} @@ -149,21 +148,17 @@ def build_message(birthdays: list[dict], target_date: date | None = None) -> Ema
- +
- - - - - {link_html}
+

Geburtstage heute

-

{today.strftime('%d.%m.%Y')} · {len(birthdays)} Kontakte

-
+

{today.strftime('%d.%m.%Y')} · {len(birthdays)} Kontakte

{cards_html}
+ {link_html}