From c3c4c68de7b409ecfd1ef34f5ac10dfd6c27ed07 Mon Sep 17 00:00:00 2001 From: Milky Date: Tue, 12 May 2026 08:24:40 +0100 Subject: [PATCH] Refactor email header layout and shrink logo Rework the email header to an inline two-cell layout for better vertical alignment: remove the fixed width, set the header inner table to display:table, and split the logo and subject into separate TDs. Reduce the logo from 48px to 32px, adjust paddings, border-radius, vertical alignment, and lighten the subject font weight for a more compact, balanced header in narrow clients. Also remove the obsolete goldlabel.bak.py backup file. --- app/utils/email_templates/goldlabel.bak.py | 130 --------------------- app/utils/email_templates/goldlabel.py | 18 +-- 2 files changed, 10 insertions(+), 138 deletions(-) delete mode 100644 app/utils/email_templates/goldlabel.bak.py diff --git a/app/utils/email_templates/goldlabel.bak.py b/app/utils/email_templates/goldlabel.bak.py deleted file mode 100644 index 0f49e59..0000000 --- a/app/utils/email_templates/goldlabel.bak.py +++ /dev/null @@ -1,130 +0,0 @@ -"""Goldlabel branded HTML email template.""" - -_LOGO_URL = "https://goldlabel.pro/goldlabelpro/png/favicon.png" - -# Palette (dark theme used for the email chrome; body text stays readable on white clients) -_DARK_BG = "#364450" -_DARK_PAPER = "#364450" -_DARK_PRIMARY = "#ffd849" -_DARK_TEXT = "#ffffff" -_LIGHT_BG = "#eaf0f5" -_LIGHT_PAPER = "#EEF7FF" -_LIGHT_TEXT = "#000000" -_LIGHT_PRIMARY = "#364450" - - -def goldlabel_email(subject: str, body_html: str) -> str: - """Return a complete HTML email string with Goldlabel branding. - - Args: - subject: Used as the visible heading inside the email. - body_html: Inner HTML content placed in the message body area. - - Returns: - A self-contained HTML string ready to pass to send_email_resend(). - """ - return f""" - - - - - - - {subject} - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -""" diff --git a/app/utils/email_templates/goldlabel.py b/app/utils/email_templates/goldlabel.py index e4f372f..15bc09f 100644 --- a/app/utils/email_templates/goldlabel.py +++ b/app/utils/email_templates/goldlabel.py @@ -78,19 +78,21 @@ def goldlabel_email( - + - +