Skip to content

Commit

Permalink
try to make the layout close to mastondon
Browse files Browse the repository at this point in the history
  • Loading branch information
humorless authored and plexus committed Sep 9, 2024
1 parent 0fee4f0 commit e800f0c
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions src/co/gaiwan/compass/html/profiles.clj
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@

(o/defstyled profile-detail :div#detail
[image-frame :w-100px {--arc-thickness "7%"}]
[:.contact-list :flex :flex-wrap :gap-4]
[:.remove-btn :cursor-pointer :border-none {:background-color t/--surface-3}]
[:.remove-btn [:&:hover {:background-color t/--surface-4}]]
[:.contact :flex :items-center
[image-frame :w-50px {--arc-thickness "7%"} :mr-2]]
([{:public-profile/keys [name hidden?]
:user/keys [uuid] :as user}]
[:<>
Expand All @@ -79,15 +74,15 @@

#_[:div (pr-str user)]
;; Disable Edit Profile before we can show profile details pretty
#_[:div.actions
[edit-profile-btn user]]]))
[:div.actions
[edit-profile-btn user]]]))

(o/defstyled contact-detail :div
[image-frame :w-100px {--arc-thickness "7%"}]
;;[:.contact-list :flex :flex-wrap :gap-4]
[:.contact-list :w-full :ga-4]
[:.remove-btn :cursor-pointer :border-none {:background-color t/--surface-3}]
[:.remove-btn [:&:hover {:background-color t/--surface-4}]]
[:.contact :flex :items-center
[:.contact :flex :items-center :justify-between
[:div :mr-2]
[image-frame :w-50px {--arc-thickness "7%"} :mr-2]]
([{:public-profile/keys [name]
Expand All @@ -106,14 +101,14 @@
:hx-trigger "contact-deleted from:body"}]
[:h3 "Contacts"]
[:div.contact-list
[:ul
(for [c (:user/contacts user)]
[:li.contact
[image-frame {:profile/image (user/avatar-css-value c)}]
[:div [:label (:public-profile/name c)]
[:label (:discord/email c)]]
[:button.remove-btn {:hx-delete (url-for :contact/link {:id (:db/id c)})}
[graphics/person-remove] "Remove Contact"]])]]]]))
(for [c (:user/contacts user)]
[:div.contact
[image-frame {:profile/image (user/avatar-css-value c)}]
[:div
[:div (:public-profile/name c)]
[:div (:discord/email c)]]
[:button.remove-btn {:hx-delete (url-for :contact/link {:id (:db/id c)})}
[graphics/person-remove] "Remove Contact"]])]]]))

(o/defstyled private-name :div
([user {:keys [private-name-switch] :as params}]
Expand Down

0 comments on commit e800f0c

Please sign in to comment.