浏览代码

fix(mobile): empty space below new page

Tienson Qin 3 年之前
父节点
当前提交
ef1b3d7131
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 1 2
      src/main/frontend/components/sidebar.cljs
  2. 4 1
      src/main/frontend/components/sidebar.css

+ 1 - 2
src/main/frontend/components/sidebar.cljs

@@ -311,8 +311,7 @@
           [:a.button#search-button-mobile
            {:on-click #(state/pub-event! [:go/search])}
            (ui/icon "search" {:style {:fontSize ui/icon-size}})])]])
-    [:div.flex-1.h-0.overflow-y-auto {:style {:position "relative"
-                                              :top "-48px"}}
+    [:div.flex-1.h-0.overflow-y-auto
      (sidebar-nav route-match close-fn)]]])
 
 (rum/defc main <

+ 4 - 1
src/main/frontend/components/sidebar.css

@@ -100,7 +100,10 @@ html.is-mobile {
   overflow: auto;
 
   > .wrap {
-    padding-top: 60px;
+      padding-top: 24px;
+      @screen md {
+          padding-top: 60px;
+      }
   }
 
   .dropdown-wrapper {