Add default avatar and header
This commit is contained in:
parent
3a53113284
commit
124149129e
4 changed files with 19 additions and 3 deletions
|
@ -9,6 +9,22 @@ defmodule NullaWeb.ActorHTML do
|
|||
|
||||
embed_templates "templates/actor/*"
|
||||
|
||||
def avatar(url) do
|
||||
if url do
|
||||
url
|
||||
else
|
||||
"/images/default-avatar.jpg"
|
||||
end
|
||||
end
|
||||
|
||||
def profile_header(url) do
|
||||
if url do
|
||||
url
|
||||
else
|
||||
"/images/default-header.jpg"
|
||||
end
|
||||
end
|
||||
|
||||
def format_birthdate(date) do
|
||||
formatted = Date.to_string(date) |> String.replace("-", "/")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue