Add default avatar and header

This commit is contained in:
Mirai Kumiko 2025-06-21 20:54:31 +02:00
parent 3a53113284
commit 124149129e
Signed by: miraikumiko
GPG key ID: 3F178B1B5E0CB278
4 changed files with 19 additions and 3 deletions

View file

@ -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("-", "/")