You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/lib/plausible_web/views/email_view.ex

28 lines
480 B
Elixir

defmodule PlausibleWeb.EmailView do
use PlausibleWeb, :view
def admin_email do
Application.get_env(:plausible, :admin_email)
end
def plausible_url do
PlausibleWeb.Endpoint.url()
end
def base_domain() do
PlausibleWeb.Endpoint.host()
end
def user_salutation(user) do
if user.name do
String.split(user.name) |> List.first()
else
""
end
end
def date_format(date) do
Timex.format!(date, "{D} {Mshort} {YYYY}")
end
end