Skip to content

Commit

Permalink
menubar: hide home
Browse files Browse the repository at this point in the history
  • Loading branch information
mhuebert committed Aug 9, 2023
1 parent 7ae2a19 commit 7864f01
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 4 additions & 2 deletions editor2/src/main/maria/cloud/menubar.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@
[:div.flex-grow]
menubar-content
[:div.flex-grow]
#_[:a.text-black.inline-flex.items-center {:class trigger-classes
:href "/"} [icons/home "w-4 h-4"]]
(let [cmd (keymaps/resolve-command :file/new)]
[:div.cursor-pointer.p-1
{:class [trigger-classes
Expand All @@ -194,8 +196,8 @@
"New"
#_[icons/document-plus:mini "w-5 h-5 -mt-[2px]"]]
#_[ui/tooltip
...
(:title (keymaps/resolve-command :file/new))])
...
(:title (keymaps/resolve-command :file/new))])
[command-bar/input]
(if-let [{:keys [photo-url display-name]} (gh/get-user)]
[menu [:el menu/Trigger {:class [trigger-classes
Expand Down
7 changes: 1 addition & 6 deletions editor2/src/main/maria/cloud/sidebar.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@
title])))
(db/where [:curriculum/name]))])

(defn icon:home [class]
[:svg {:class class :xmlns "http://www.w3.org/2000/svg" :viewBox "0 0 20 20" :fill "currentColor"}
[:path {:fillRule "evenodd" :d "M9.293 2.293a1 1 0 011.414 0l7 7A1 1 0 0117 11h-1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-3a1 1 0 00-1-1H9a1 1 0 00-1 1v3a1 1 0 01-1 1H5a1 1 0 01-1-1v-6H3a1 1 0 01-.707-1.707l7-7z" :clipRule "evenodd"}]])

(ui/defview content []
(let [{current-path ::routes/path} @routes/!location]
[:> acc/Root {:type "multiple"
Expand All @@ -110,8 +106,7 @@
{:on-click #(swap! ui/!state assoc :sidebar/visible? false)
:style {:margin-top 3}}
[icons/x-mark:mini "w-5 h-5 rotate-180"]]
[:div.flex-grow]
[:a.p-2.hover:bg-slate-300.cursor-pointer.text-black {:href "/"} [icon:home "w-4 h-4"]]]
[:div.flex-grow]]

[recents current-path]
[curriculum-list current-path]
Expand Down
7 changes: 6 additions & 1 deletion editor2/src/main/maria/editor/icons.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,9 @@
#_(v/x
[:svg {:xmlns "http://www.w3.org/2000/svg" :fill "none" :viewBox "0 0 24 24" :strokeWidth "{1.5}" :stroke "currentColor" :class class}
[:path {:strokeLinecap "round" :strokeLinejoin "round" :d "M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"}]])
)
)

(defn home [class]
(v/x
[:svg {:class class :xmlns "http://www.w3.org/2000/svg" :viewBox "0 0 20 20" :fill "currentColor"}
[:path {:fillRule "evenodd" :d "M9.293 2.293a1 1 0 011.414 0l7 7A1 1 0 0117 11h-1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-3a1 1 0 00-1-1H9a1 1 0 00-1 1v3a1 1 0 01-1 1H5a1 1 0 01-1-1v-6H3a1 1 0 01-.707-1.707l7-7z" :clipRule "evenodd"}]]))

0 comments on commit 7864f01

Please sign in to comment.