Skip to content

Commit

Permalink
Fix sidebar scroll, more ui improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
oxalorg committed Sep 15, 2024
1 parent 6560bcf commit 92d481d
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 20 deletions.
23 changes: 20 additions & 3 deletions src/co/gaiwan/compass/html/graphics.clj
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@

(o/defstyled cog-icon :svg
([]
[:<> {:viewbox "0 -256 1536 1536"}
[:path {:d "m 1024,512 q 0,106 -75,181 -75,75 -181,75 -106,0 -181,-75 -75,-75 -75,-181 0,-106 75,-181 75,-75 181,-75 106,0 181,75 75,75 75,181 z m 512,109 V 399 q 0,-12 -8,-23 -8,-11 -20,-13 l -185,-28 q -19,-54 -39,-91 35,-50 107,-138 10,-12 10,-25 0,-13 -9,-23 -27,-37 -99,-108 -72,-71 -94,-71 -12,0 -26,9 L 1035,-4 q -44,-23 -91,-38 -16,-136 -29,-186 -7,-28 -36,-28 H 657 q -14,0 -24.5,8.5 Q 622,-239 621,-226 l -28,184 q -49,16 -90,37 L 362,-112 q -10,-9 -25,-9 -14,0 -25,11 Q 186,4 147,58 q -7,10 -7,23 0,12 8,23 15,21 51,66.5 36,45.5 54,70.5 -27,50 -41,99 L 29,367 Q 16,369 8,379.5 0,390 0,403 v 222 q 0,12 8,23 8,11 19,13 l 186,28 q 14,46 39,92 -40,57 -107,138 -10,12 -10,24 0,10 9,23 26,36 98.5,107.5 72.5,71.5 94.5,71.5 13,0 26,-10 l 138,-107 q 44,23 91,38 16,136 29,186 7,28 36,28 h 222 q 14,0 24.5,-8.5 Q 914,1263 915,1250 l 28,-184 q 49,-16 90,-37 l 142,107 q 9,9 24,9 13,0 25,-10 129,-119 165,-170 7,-8 7,-22 0,-12 -8,-23 -15,-21 -51,-66.5 -36,-45.5 -54,-70.5 26,-50 41,-98 l 183,-28 q 13,-2 21,-12.5 8,-10.5 8,-23.5 z"}]]
))
[:<> {:xmlns "http://www.w3.org/2000/svg" :fill "none" :viewBox "0 0 24 24" :stroke-width "1.5" :stroke "currentColor"}
[:path {:stroke-linecap "round" :stroke-linejoin "round" :d "M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}] [:path {:stroke-linecap "round" :stroke-linejoin "round" :d "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}]]))

(o/defstyled sessions-icon :svg
([]
Expand All @@ -99,3 +98,21 @@
(o/defstyled plus-icon :svg
([]
[:<> {:xmlns "http://www.w3.org/2000/svg" :fill "none" :viewBox "0 0 24 24" :stroke-width "1.5" :stroke "currentColor"} [:path {:stroke-linecap "round" :stroke-linejoin "round" :d "M12 4.5v15m7.5-7.5h-15"}]]))


(o/defstyled book-open-icon :svg
([]
[:<> {:xmlns "http://www.w3.org/2000/svg" :fill "none" :viewBox "0 0 24 24" :stroke-width "1.5" :stroke "currentColor"}
[:path {:stroke-linecap "round" :stroke-linejoin "round" :d "M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25"}]]))

(o/defstyled queue-list-icon :svg
([]
[:<> {:xmlns "http://www.w3.org/2000/svg" :fill "none" :viewBox "0 0 24 24" :stroke-width "1.5" :stroke "currentColor"}
[:path {:stroke-linecap "round" :stroke-linejoin "round" :d "M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75Z"}]]))


(o/defstyled ticket-icon :svg
([]
[:<> {:xmlns "http://www.w3.org/2000/svg" :fill "none" :viewBox "0 0 24 24" :stroke-width "1.5" :stroke "currentColor"}
[:path {:stroke-linecap "round" :stroke-linejoin "round" :d "M16.5 6v.75m0 3v.75m0 3v.75m0 3V18m-9-5.25h5.25M7.5 15h3M3.375 5.25c-.621 0-1.125.504-1.125 1.125v3.026a2.999 2.999 0 0 1 0 5.198v3.026c0 .621.504 1.125 1.125 1.125h17.25c.621 0 1.125-.504 1.125-1.125v-3.026a2.999 2.999 0 0 1 0-5.198V6.375c0-.621-.504-1.125-1.125-1.125H3.375Z"}]]
))
47 changes: 30 additions & 17 deletions src/co/gaiwan/compass/html/navigation.clj
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
(o/defstyled menu-panel :nav
:bg-surface-2
:h-screen
:flex :flex-col
:overflow-hidden :shadow-5 :z-1 :fixed
{:transition "transform 300ms ease-in"
:width t/--size-fluid-10
Expand All @@ -68,10 +69,15 @@
:transform "translate(100%, 0)"}
[:svg {:width t/--font-size-5
:height t/--font-size-5}]
[:.bar :flex :justify-between :p-3]
[:.bar :flex :justify-between :p-3 :mb-2 :border-b-4 :border-surface-3]
[:li :font-size-3 :my-4
[:>hr :my-6]
#_[:svg [:path :w-5 :h-5]]
[:>a
:block :bg-surface-1 :hover:bg-surface-3
:block
:bg-surface-1 :hover:bg-surface-3
;; {:background t/--highlight}
;; [:&:hover {:background t/--highlight-yellow}]
:px-4 :py-4 :mx-4 :my-2 :rounded-lg
:no-underline]
{:font-size t/--font-size-3}
Expand All @@ -81,12 +87,12 @@
[:.discord-button :flex :justify-center :py-3
[#{:a :a:visited} {:color t/--gray-2}]]
[:a:visited {:color t/--link}]
["a:has(.notifier-dot)" :flex :gap-1]
["a:has(.notifier-dot)" :flex :gap-1 :items-baseline]
[:svg :inline :mr-1 {:height "1em" :margin-bottom "-0.15em"}
[:path {:fill t/--text-1}]]
[:.bottom :fixed :bottom-0 :left-0
:w-full :mb-3
:text-center
[:path
#_{:fill t/--text-1}
#_{:color t/--text-1}]]
[:.bottom :mt-auto :w-full :mb-3 :text-center
[:p :m-2]]
([user]
[:<>
Expand All @@ -105,6 +111,7 @@
[:li
[:a {:href (url-for :ticket/connect)
:on-click "document.body.classList.toggle('menu-open')"}
[graphics/ticket-icon]
[:strong "Claim your Ti.to ticket for full access"]
[:div.notifier-dot]]]))

Expand All @@ -118,28 +125,34 @@
{:href (url-for :session/new), :on-click "document.body.classList.toggle('menu-open')"}
[graphics/plus-icon]
"Create Activity"]]
[:li
[:hr]]
[:li
[:a
{:href (url-for :profile/edit), :on-click "document.body.classList.toggle('menu-open')"}
[graphics/cog-icon] "Profile & Settings"]]
[graphics/cog-icon]
[:span "Profile & Settings"]]]
[:li
[:a
{:href (url-for :contacts/index), :on-click "document.body.classList.toggle('menu-open')"}
[graphics/queue-list-icon]
"Contacts"]]
[:li
[:a {:href (url-for :contact/qr)
:hx-target "#modal"
:on-click "document.body.classList.toggle('menu-open')"}
[graphics/scan-icon] "Add Contact"]]

[:li [:a {:href "https://github.com/heartofclojure/heartofclojure-site-2024/wiki/Attendee-Guide-2024"
:target "_blank"
}
"Attendee Guide"]]
[:div.bottom
[:p "Proudly made by the " [:a {:href "https://gaiwan.co" :target "_blank"} "Gaiwan Team"] " and contributors."]
[:p [:a {:href "https://github.com/GaiwanTeam/compass" :target "_blank"} [graphics/github-icon] "GaiwanTeam/compass"]]]
]]))
[:li
[:hr]]
[:li
[:a {:href "https://github.com/heartofclojure/heartofclojure-site-2024/wiki/Attendee-Guide-2024"
:target "_blank"}
[graphics/book-open-icon]
"Attendee Guide"]]]
[:div.bottom
[:p "Proudly made by the " [:a {:href "https://gaiwan.co" :target "_blank"} "Gaiwan Team"] " and contributors."]
[:p [:a {:href "https://github.com/GaiwanTeam/compass" :target "_blank"} [graphics/github-icon] "GaiwanTeam/compass"]]]
]))

(o/defrules toggle-menu-button)

Expand Down

0 comments on commit 92d481d

Please sign in to comment.