mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-20 06:37:59 +01:00
correct avatar class for users with avatar
This commit is contained in:
parent
fbfa572a1e
commit
da09d45c7f
1 changed files with 7 additions and 2 deletions
|
@ -34,8 +34,13 @@ defmodule PhilomenaWeb.UserAttributionView do
|
||||||
do: anonymous_avatar(object, class)
|
do: anonymous_avatar(object, class)
|
||||||
def user_avatar(%{user: %{avatar: nil}} = object, class),
|
def user_avatar(%{user: %{avatar: nil}} = object, class),
|
||||||
do: anonymous_avatar(object, class)
|
do: anonymous_avatar(object, class)
|
||||||
def user_avatar(%{user: %{avatar: avatar}}, class),
|
def user_avatar(%{user: %{avatar: avatar}}, class) do
|
||||||
do: img_tag(avatar_url_root() <> "/" <> avatar, class: class)
|
class = Enum.join(["image-constrained", class], " ")
|
||||||
|
|
||||||
|
content_tag :div, [class: class] do
|
||||||
|
img_tag(avatar_url_root() <> "/" <> avatar)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def user_labels(%{user: user}) do
|
def user_labels(%{user: user}) do
|
||||||
[]
|
[]
|
||||||
|
|
Loading…
Reference in a new issue