From 27ef931670401a5e1b07b8c2e0cb29b6bbbf4101 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Thu, 18 Feb 2021 17:47:15 +0000 Subject: [PATCH] add possible dark mode fix for Outlook --- email.go | 5 +++++ mail/announcement.mjml | 18 +++++++++++++++++- mail/confirmation.mjml | 18 +++++++++++++++++- mail/created.mjml | 18 +++++++++++++++++- mail/deleted.mjml | 18 +++++++++++++++++- mail/email.mjml | 18 +++++++++++++++++- mail/expired.mjml | 18 +++++++++++++++++- mail/invite-email.mjml | 18 +++++++++++++++++- mail/welcome.mjml | 18 +++++++++++++++++- 9 files changed, 141 insertions(+), 8 deletions(-) diff --git a/email.go b/email.go index 73799db..f0fe3d2 100644 --- a/email.go +++ b/email.go @@ -169,6 +169,11 @@ func (emailer *Emailer) NewSMTP(server string, port int, username, password stri func (emailer *Emailer) construct(app *appContext, section, keyFragment string, data map[string]interface{}) (html, text string, err error) { var tpl *template.Template + if substituteStrings == "" { + data["jellyfin"] = "Jellyfin" + } else { + data["jellyfin"] = substituteStrings + } for _, key := range []string{"html", "text"} { filesystem, fpath := app.GetPath(section, keyFragment+key) tpl, err = template.ParseFS(filesystem, fpath) diff --git a/mail/announcement.mjml b/mail/announcement.mjml index 6e30b2d..8e6b9d4 100644 --- a/mail/announcement.mjml +++ b/mail/announcement.mjml @@ -15,6 +15,14 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } @media (prefers-color-scheme: dark) { Color-scheme: dark; @@ -22,12 +30,20 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } - + diff --git a/mail/confirmation.mjml b/mail/confirmation.mjml index 6de3499..18fbc7a 100644 --- a/mail/confirmation.mjml +++ b/mail/confirmation.mjml @@ -15,6 +15,14 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } @media (prefers-color-scheme: dark) { Color-scheme: dark; @@ -22,12 +30,20 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } - + diff --git a/mail/created.mjml b/mail/created.mjml index e0f5521..ea615ab 100644 --- a/mail/created.mjml +++ b/mail/created.mjml @@ -15,6 +15,14 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } @media (prefers-color-scheme: dark) { Color-scheme: dark; @@ -22,12 +30,20 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } - + diff --git a/mail/deleted.mjml b/mail/deleted.mjml index 9720521..1effe28 100644 --- a/mail/deleted.mjml +++ b/mail/deleted.mjml @@ -15,6 +15,14 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } @media (prefers-color-scheme: dark) { Color-scheme: dark; @@ -22,12 +30,20 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } - + diff --git a/mail/email.mjml b/mail/email.mjml index 37950f6..a51d52f 100644 --- a/mail/email.mjml +++ b/mail/email.mjml @@ -15,6 +15,14 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } @media (prefers-color-scheme: dark) { Color-scheme: dark; @@ -22,12 +30,20 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } - + diff --git a/mail/expired.mjml b/mail/expired.mjml index 2c89955..633ac72 100644 --- a/mail/expired.mjml +++ b/mail/expired.mjml @@ -15,6 +15,14 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } @media (prefers-color-scheme: dark) { Color-scheme: dark; @@ -22,12 +30,20 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } - + diff --git a/mail/invite-email.mjml b/mail/invite-email.mjml index 7b3a862..50259ad 100644 --- a/mail/invite-email.mjml +++ b/mail/invite-email.mjml @@ -15,6 +15,14 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } @media (prefers-color-scheme: dark) { Color-scheme: dark; @@ -22,12 +30,20 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } - + diff --git a/mail/welcome.mjml b/mail/welcome.mjml index 55c973e..4006e0c 100644 --- a/mail/welcome.mjml +++ b/mail/welcome.mjml @@ -15,6 +15,14 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } @media (prefers-color-scheme: dark) { Color-scheme: dark; @@ -22,12 +30,20 @@ background: #242424 !important; background-color: #242424 !important; } + [data-ogsc] .body { + background: #242424 !important; + background-color: #242424 !important; + } + [data-ogsb] .body { + background: #242424 !important; + background-color: #242424 !important; + } } - +