mirror of
https://github.com/plausible/analytics.git
synced 2024-12-26 02:55:02 +03:00
47bf003c29
Fix email links
22 lines
436 B
Elixir
22 lines
436 B
Elixir
defmodule PlausibleWeb.EmailView do
|
|
use PlausibleWeb, :view
|
|
|
|
def plausible_url do
|
|
PlausibleWeb.Endpoint.url()
|
|
end
|
|
|
|
def base_domain() do
|
|
PlausibleWeb.Endpoint.host()
|
|
end
|
|
|
|
def greet_recipient(%{user: %{name: name}}) when is_binary(name) do
|
|
"Hey #{String.split(name) |> List.first()},"
|
|
end
|
|
|
|
def greet_recipient(_), do: "Hey,"
|
|
|
|
def date_format(date) do
|
|
Timex.format!(date, "{D} {Mshort} {YYYY}")
|
|
end
|
|
end
|