style emails lol

This commit is contained in:
shibao 2022-02-17 22:47:54 -05:00
parent 534ff4e69b
commit faaadba3f1
6 changed files with 85 additions and 45 deletions

View File

@ -1,12 +1,25 @@
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center;">
<span style="margin-bottom: 0.75em; font-size: 1.5em;">
<%= dgettext("emails", "Hi %{email},", email: @user.email) %> <%= dgettext("emails", "Hi %{email},", email: @user.email) %>
</span>
<br/>
<span style="margin-bottom: 1em; font-size: 1.25em;">
<%= dgettext("emails", "Welcome to %{name}!", name: "Cannery") %> <%= dgettext("emails", "Welcome to %{name}!", name: "Cannery") %>
</span>
<br/>
<%= dgettext("emails", "You can confirm your account by visiting the URL below:") %> <%= dgettext("emails", "You can confirm your account by visiting the URL below:") %>
<%= @url %> <br/>
<a style="margin: 1em; color: rgb(31, 31, 31);" href="{@url}"><%= @url %></a>
<br/>
<%= dgettext("emails", <%= dgettext("emails",
"If you didn't create an account at %{url}, please ignore this.", "If you didn't create an account at %{name}, please ignore this.",
url: Routes.live_url(Endpoint, HomeLive)) %> name: "Cannery") %>
</div>

View File

@ -1,10 +1,19 @@
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center;">
<span style="margin-bottom: 0.5em; font-size: 1.5em;">
<%= dgettext("emails", "Hi %{email},", email: @user.email) %> <%= dgettext("emails", "Hi %{email},", email: @user.email) %>
</span>
<br/>
<%= dgettext("emails", "You can reset your password by visiting the URL below:") %> <%= dgettext("emails", "You can reset your password by visiting the URL below:") %>
<%= @url %> <br/>
<a style="margin: 1em; color: rgb(31, 31, 31);" href="{@url}"><%= @url %></a>
<br/>
<%= dgettext("emails", <%= dgettext("emails",
"If you didn't request this change from %{url}, please ignore this.", "If you didn't request this change from %{name}, please ignore this.",
url: Routes.live_url(Endpoint, HomeLive)) %> name: "Cannery") %>
</div>

View File

@ -1,10 +1,19 @@
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center;">
<span style="margin-bottom: 0.5em; font-size: 1.5em;">
<%= dgettext("emails", "Hi %{email},", email: @user.email) %> <%= dgettext("emails", "Hi %{email},", email: @user.email) %>
</span>
<br/>
<%= dgettext("emails", "You can change your email by visiting the URL below:") %> <%= dgettext("emails", "You can change your email by visiting the URL below:") %>
<%= @url %> <br/>
<a style="margin: 1em; color: rgb(31, 31, 31);" href="{@url}"><%= @url %></a>
<br/>
<%= dgettext("emails", <%= dgettext("emails",
"If you didn't request this change from %{url}, please ignore this.", "If you didn't request this change from %{name}, please ignore this.",
url: Routes.live_url(Endpoint, HomeLive)) %> name: "Cannery") %>
</div>

View File

@ -4,15 +4,21 @@
<%= @email.subject %> <%= @email.subject %>
</title> </title>
</head> </head>
<body> <body
style="padding: 2em; color: rgb(31, 31, 31); background-color: rgb(220, 220, 228); font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; text-align: center;"
>
<%= @inner_content %> <%= @inner_content %>
<hr <hr
style="border-width: 1px; border-color: rgb(212, 212, 216); width: 100%; max-width: 42rem;" style="margin: 2em auto; border-width: 1px; border-color: rgb(212, 212, 216); width: 100%; max-width: 42rem;"
/> />
<a href={Routes.live_url(Endpoint, HomeLive)}> <a style="color: rgb(31, 31, 31);" href={Routes.live_url(Endpoint, HomeLive)}>
<%= dgettext("emails", "This email was sent from %{name}", name: "Cannery") %> <%= dgettext(
"emails",
"This email was sent from %{name}, the self-hosted firearm tracker website.",
name: "Cannery"
) %>
</a> </a>
</body> </body>
</html> </html>

View File

@ -1,6 +1,5 @@
<%= @email.subject %> <%= @email.subject %>
==================== ====================
<%= @inner_content %> <%= @inner_content %>
@ -8,6 +7,6 @@
===================== =====================
<%= dgettext("emails", <%= dgettext("emails",
"This email was sent from %{name} at %{url}", "This email was sent from %{name} at %{url}, the self-hosted firearm tracker website.",
name: "Cannery", name: "Cannery",
url: Routes.live_url(Endpoint, HomeLive)) %> url: Routes.live_url(Endpoint, HomeLive)) %>

View File

@ -16,9 +16,9 @@ msgid "Confirm your %{name} account"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/email/confirm_email.html.eex:2 #: lib/cannery_web/templates/email/confirm_email.html.eex:3
#: lib/cannery_web/templates/email/confirm_email.txt.eex:2 #: lib/cannery_web/templates/email/confirm_email.txt.eex:2
#: lib/cannery_web/templates/email/reset_password.html.eex:2 #: lib/cannery_web/templates/email/reset_password.html.eex:3
#: lib/cannery_web/templates/email/reset_password.txt.eex:2 #: lib/cannery_web/templates/email/reset_password.txt.eex:2
#: lib/cannery_web/templates/email/update_email.html.eex:3 #: lib/cannery_web/templates/email/update_email.html.eex:3
#: lib/cannery_web/templates/email/update_email.txt.eex:2 #: lib/cannery_web/templates/email/update_email.txt.eex:2
@ -26,13 +26,11 @@ msgid "Hi %{email},"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/email/confirm_email.html.eex:10
#: lib/cannery_web/templates/email/confirm_email.txt.eex:10 #: lib/cannery_web/templates/email/confirm_email.txt.eex:10
msgid "If you didn't create an account at %{url}, please ignore this." msgid "If you didn't create an account at %{url}, please ignore this."
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/email/reset_password.html.eex:8
#: lib/cannery_web/templates/email/reset_password.txt.eex:8 #: lib/cannery_web/templates/email/reset_password.txt.eex:8
#: lib/cannery_web/templates/email/update_email.txt.eex:8 #: lib/cannery_web/templates/email/update_email.txt.eex:8
msgid "If you didn't request this change from %{url}, please ignore this." msgid "If you didn't request this change from %{url}, please ignore this."
@ -43,23 +41,13 @@ msgstr ""
msgid "Reset your %{name} password" msgid "Reset your %{name} password"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/templates/layout/email.html.heex:17
msgid "This email was sent from %{name}"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/templates/layout/email.txt.eex:10
msgid "This email was sent from %{name} at %{url}"
msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery/accounts/email.ex:44 #: lib/cannery/accounts/email.ex:44
msgid "Update your %{name} email" msgid "Update your %{name} email"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/email/confirm_email.html.eex:4 #: lib/cannery_web/templates/email/confirm_email.html.eex:9
msgid "Welcome to %{name}!" msgid "Welcome to %{name}!"
msgstr "" msgstr ""
@ -69,24 +57,40 @@ msgid "Welcome to %{name}%!"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/email/update_email.html.eex:6 #: lib/cannery_web/templates/email/update_email.html.eex:8
#: lib/cannery_web/templates/email/update_email.txt.eex:4 #: lib/cannery_web/templates/email/update_email.txt.eex:4
msgid "You can change your email by visiting the URL below:" msgid "You can change your email by visiting the URL below:"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/email/confirm_email.html.eex:6 #: lib/cannery_web/templates/email/confirm_email.html.eex:14
#: lib/cannery_web/templates/email/confirm_email.txt.eex:6 #: lib/cannery_web/templates/email/confirm_email.txt.eex:6
msgid "You can confirm your account by visiting the URL below:" msgid "You can confirm your account by visiting the URL below:"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/email/reset_password.html.eex:4 #: lib/cannery_web/templates/email/reset_password.html.eex:8
#: lib/cannery_web/templates/email/reset_password.txt.eex:4 #: lib/cannery_web/templates/email/reset_password.txt.eex:4
msgid "You can reset your password by visiting the URL below:" msgid "You can reset your password by visiting the URL below:"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/email/update_email.html.eex:10 #: lib/cannery_web/templates/email/confirm_email.html.eex:22
msgid "If you didn't request this change from Cannery, please ignore this." msgid "If you didn't create an account at %{name}, please ignore this."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/templates/email/reset_password.html.eex:16
#: lib/cannery_web/templates/email/update_email.html.eex:16
msgid "If you didn't request this change from %{name}, please ignore this."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/templates/layout/email.txt.eex:9
msgid "This email was sent from %{name} at %{url}, the self-hosted firearm tracker website."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/templates/layout/email.html.heex:17
msgid "This email was sent from %{name}, the self-hosted firearm tracker website."
msgstr "" msgstr ""