Skip to content

Commit

Permalink
let profile avatar show at the normal size
Browse files Browse the repository at this point in the history
  • Loading branch information
humorless committed Aug 28, 2024
1 parent 6d7ba5c commit ab03619
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/co/gaiwan/compass/html/profiles.clj
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
(o/defprop --arc-thickness "30px")

(o/defstyled image-frame :div
[:.img :w-full
{:padding --arc-thickness
[:.img :w-100px
{#_#_:padding --arc-thickness
#_#_:margin-left "-100%"}
[:>* :w-full :aspect-square :rounded-full
{:background-size "cover"
:background-position "50% 50%"}]]
([{:profile/keys [image]} user]
([{:profile/keys [image]}]
[:<>
[:div.img
[:div
Expand All @@ -31,7 +31,7 @@
([{:public-profile/keys [name bio]
:user/keys [uuid] :as user}]
[:<>
[image-frame {:profile/image (user/avatar-css-value (:public-profile/avatar-url user))} user]
[image-frame {:profile/image (user/avatar-css-value user)}]
[:div.details
[:h3 name]
(when bio
Expand All @@ -53,7 +53,7 @@
([{:public-profile/keys [name]
:user/keys [uuid] :as user}]
[:<>
[image-frame {:profile/image (user/avatar-css-value user)} user]
[image-frame {:profile/image (user/avatar-css-value user)}]
[:div.details
[:h3.title name]]
#_[:div (pr-str user)]
Expand Down Expand Up @@ -141,6 +141,8 @@
"Show different name to confidantes?"]
[:div.input-block {:id "private-name-block"}]
[:div
(when user
[image-frame {:profile/image (user/avatar-css-value user)}])
[:label {:for "image"} "Avatar"]
[:input {:id "image" :name "image" :type "file" :accept "image/png, image/jpeg"}]]
[:div
Expand Down

0 comments on commit ab03619

Please sign in to comment.