Преглед на файлове

enhance: add monospace theme for tooltips

Devon Zuegel преди 4 години
родител
ревизия
a4d2543bcc

+ 4 - 0
resources/css/tooltip.css

@@ -661,3 +661,7 @@
 .tippy-hover {
 .tippy-hover {
   cursor: pointer;
   cursor: pointer;
 }
 }
+
+.tippy-popper .tippy-tooltip.monospace-theme {
+  font-family: 'Fira Code', Monaco, Menlo, Consolas, 'COURIER NEW', monospace;
+}

+ 5 - 0
src/main/frontend/components/header.cljs

@@ -31,6 +31,7 @@
    {:html [:div.text-sm.font-medium (ui/keyboard-shortcut-from-config :go/home)]
    {:html [:div.text-sm.font-medium (ui/keyboard-shortcut-from-config :go/home)]
     :interactive true
     :interactive true
     :position    "left"
     :position    "left"
+    :theme       "monospace"
     :arrow       true}
     :arrow       true}
    [:a.button
    [:a.button
     {:href     (rfe/href :home)
     {:href     (rfe/href :home)
@@ -65,6 +66,7 @@
   (ui/tippy
   (ui/tippy
    {:html [:div.text-sm.font-medium (ui/keyboard-shortcut-from-config :ui/toggle-left-sidebar)]
    {:html [:div.text-sm.font-medium (ui/keyboard-shortcut-from-config :ui/toggle-left-sidebar)]
     :position    "bottom"
     :position    "bottom"
+    :theme       "monospace"
     :interactive true
     :interactive true
     :arrow       true}
     :arrow       true}
 
 
@@ -134,6 +136,7 @@
     {:html [:div.text-sm.font-medium (ui/keyboard-shortcut-from-config :go/backward)]
     {:html [:div.text-sm.font-medium (ui/keyboard-shortcut-from-config :go/backward)]
      :interactive true
      :interactive true
      :position    "bottom"
      :position    "bottom"
+     :theme       "monospace"
      :arrow       true}
      :arrow       true}
     [:a.it.navigation.nav-left.button
     [:a.it.navigation.nav-left.button
      {:title "Go back" :on-click #(js/window.history.back)}
      {:title "Go back" :on-click #(js/window.history.back)}
@@ -143,6 +146,7 @@
     {:html [:div.text-sm.font-medium (ui/keyboard-shortcut-from-config :go/forward)]
     {:html [:div.text-sm.font-medium (ui/keyboard-shortcut-from-config :go/forward)]
      :interactive true
      :interactive true
      :position    "bottom"
      :position    "bottom"
+     :theme       "monospace"
      :arrow       true}
      :arrow       true}
     [:a.it.navigation.nav-right.button
     [:a.it.navigation.nav-right.button
      {:title "Go forward" :on-click #(js/window.history.forward)}
      {:title "Go forward" :on-click #(js/window.history.forward)}
@@ -201,6 +205,7 @@
             {:html [:div.text-sm.font-medium (ui/keyboard-shortcut-from-config :go/search)]
             {:html [:div.text-sm.font-medium (ui/keyboard-shortcut-from-config :go/search)]
              :interactive true
              :interactive true
              :position    "right"
              :position    "right"
+             :theme       "monospace"
              :arrow       true}
              :arrow       true}
             [:a.button#search-button
             [:a.button#search-button
              {:on-click #(state/pub-event! [:go/search])}
              {:on-click #(state/pub-event! [:go/search])}

+ 1 - 0
src/main/frontend/components/right_sidebar.cljs

@@ -26,6 +26,7 @@
       {:html [:div.text-sm.font-medium
       {:html [:div.text-sm.font-medium
               (ui/keyboard-shortcut-from-config :ui/toggle-right-sidebar)]
               (ui/keyboard-shortcut-from-config :ui/toggle-right-sidebar)]
        :position    "left"
        :position    "left"
+       :theme       "monospace"
        :interactive true
        :interactive true
        :arrow       true}
        :arrow       true}
 
 

+ 2 - 2
src/main/frontend/components/search.cljs

@@ -279,7 +279,7 @@
                       (ui/keyboard-shortcut-from-config :go/search-in-page)]
                       (ui/keyboard-shortcut-from-config :go/search-in-page)]
                :arrow           true
                :arrow           true
                :interactive     true
                :interactive     true
-               }
+               :theme       "monospace"}
               [:div.flex-row.flex.align-items
               [:div.flex-row.flex.align-items
                [:div.mr-2 "Search in page:"]
                [:div.mr-2 "Search in page:"]
                [:div {:style {:margin-top 3}}
                [:div {:style {:margin-top 3}}
@@ -292,7 +292,7 @@
                                  "Tip: " [:code (util/->platform-shortcut "Ctrl + Shift + p")] " to open the commands palette"]
                                  "Tip: " [:code (util/->platform-shortcut "Ctrl + Shift + p")] " to open the commands palette"]
                           :interactive     true
                           :interactive     true
                           :arrow           true
                           :arrow           true
-                          }
+                          :theme       "monospace"}
                          [:a.inline-block.fade-link
                          [:a.inline-block.fade-link
                           {:style {:margin-left 12}
                           {:style {:margin-left 12}
                            :on-click #(state/toggle! :ui/command-palette-open?)}
                            :on-click #(state/toggle! :ui/command-palette-open?)}