Skip to content

Commit

Permalink
enhance(css): make icon slightly bigger
Browse files Browse the repository at this point in the history
  • Loading branch information
leizhe authored and leizhe committed Nov 19, 2021
1 parent a366320 commit d96dfd8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions src/main/frontend/components/header.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@
[frontend.mobile.util :as mobile-util]
[frontend.components.widgets :as widgets]))

(defonce icon-size (if (mobile-util/is-native-platform?) 23 20))

(rum/defc home-button []
(ui/with-shortcut :go/home "left"
[:a.button
{:href (rfe/href :home)
:on-click route-handler/go-to-journals!}
(ui/icon "home" {:style {:fontSize 20}})]))
(ui/icon "home" {:style {:fontSize icon-size}})]))

(rum/defc login
[logged?]
Expand Down Expand Up @@ -62,7 +64,7 @@
[:a#left-menu.cp__header-left-menu.button
{:on-click on-click
:style {:margin-left 12}}
(ui/icon "menu-2" {:style {:fontSize 20}})]))
(ui/icon "menu-2" {:style {:fontSize icon-size}})]))

(rum/defc dropdown-menu < rum/reactive
[{:keys [me current-repo t default-home]}]
Expand All @@ -76,7 +78,7 @@
(fn [{:keys [toggle-fn]}]
[:a.button
{:on-click toggle-fn}
(ui/icon "dots" {:style {:fontSize 20}})])
(ui/icon "dots" {:style {:fontSize icon-size}})])
(->>
[(when-not (state/publishing-enable-editing?)
{:title (t :settings)
Expand Down Expand Up @@ -124,12 +126,12 @@
(ui/with-shortcut :go/backward "bottom"
[:a.it.navigation.nav-left.button
{:title "Go back" :on-click #(js/window.history.back)}
(ui/icon "arrow-left")])
(ui/icon "arrow-left" {:style {:fontSize icon-size}})])

(ui/with-shortcut :go/forward "bottom"
[:a.it.navigation.nav-right.button
{:title "Go forward" :on-click #(js/window.history.forward)}
(ui/icon "arrow-right")])])
(ui/icon "arrow-right" {:style {:fontSize icon-size}})])])

(rum/defc updater-tips-new-version
[t]
Expand Down Expand Up @@ -173,7 +175,8 @@
(when-let [target (.-target e)]
(when (and (util/electron?)
(or (.. target -classList (contains "cp__header"))))
(js/window.apis.toggleMaxOrMinActiveWindow))))}
(js/window.apis.toggleMaxOrMinActiveWindow))))
:style {:fontSize 50}}
[:div.l.flex
(left-menu-button {:on-click (fn []
(open-fn)
Expand All @@ -184,7 +187,7 @@
(ui/with-shortcut :go/search "right"
[:a.button#search-button
{:on-click #(state/pub-event! [:go/search])}
(ui/icon "search" {:style {:fontSize 20}})]))]
(ui/icon "search" {:style {:fontSize icon-size}})]))]

[:div.r.flex
(when (and (not (mobile-util/is-native-platform?))
Expand Down
2 changes: 1 addition & 1 deletion src/main/frontend/components/sidebar.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@
(ui/with-shortcut :go/search "right"
[:a.button#search-button
{:on-click #(state/pub-event! [:go/search])}
(ui/icon "search" {:style {:fontSize 20}})])]])
(ui/icon "search" {:style {:fontSize header/icon-size}})])]])
[:div.flex-1.h-0.overflow-y-auto
(sidebar-nav route-match close-fn)]]])

Expand Down

0 comments on commit d96dfd8

Please sign in to comment.