Parcourir la source

enhance: enable blocks-collapse on mobile browsers

llcc il y a 3 ans
Parent
commit
fa26d2179f
1 fichiers modifiés avec 9 ajouts et 10 suppressions
  1. 9 10
      src/main/frontend/components/page.cljs

+ 9 - 10
src/main/frontend/components/page.cljs

@@ -339,17 +339,16 @@
                :class (util/classnames [{:is-journals (or journal? fmt-journal?)}])})
 
        [:div.relative
-        (when (and (not sidebar?)
-                   (not block?))
+        (when (and (not sidebar?) (not block?))
           [:div.flex.flex-row.space-between
-           (when (mobile-util/is-native-platform?)
-            [:div.flex.flex-row.pr-2
-             {:style {:margin-left -15}
-              :on-mouse-over (fn [e]
-                               (page-mouse-over e *control-show? *all-collapsed?))
-              :on-mouse-leave (fn [e]
-                                (page-mouse-leave e *control-show?))}
-             (page-blocks-collapse-control title *control-show? *all-collapsed?)])
+           (when (or (mobile-util/is-native-platform?) (util/mobile?))
+             [:div.flex.flex-row.pr-2
+              {:style {:margin-left -15}
+               :on-mouse-over (fn [e]
+                                (page-mouse-over e *control-show? *all-collapsed?))
+               :on-mouse-leave (fn [e]
+                                 (page-mouse-leave e *control-show?))}
+              (page-blocks-collapse-control title *control-show? *all-collapsed?)])
            [:div.flex-1.flex-row
             (page-title page-name icon title format fmt-journal?)]
            (when (not config/publishing?)