mirror of
https://github.com/ClaperCo/Claper.git
synced 2026-02-24 12:09:59 +01:00
14 lines
519 B
Plaintext
14 lines
519 B
Plaintext
<div>
|
|
<%= if @user.avatar do %>
|
|
<img class="w-10 h-10 bg-gray-300 rounded-full" src={@user.avatar} alt="avatar" />
|
|
<% else %>
|
|
<div class="bg-neutral-500 h-10 w-10 rounded-full text-center flex items-center justify-center">
|
|
<%= if @user.full_name do %>
|
|
{with [first | _] <- String.codepoints(@user.full_name), do: String.capitalize(first)}
|
|
<% else %>
|
|
{with [first | _] <- String.codepoints(@user.email), do: String.capitalize(first)}
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|