浏览代码

Improve doc list/picker on mobile

Thibaut Courouble 9 年之前
父节点
当前提交
aa6b928324
共有 2 个文件被更改,包括 6 次插入12 次删除
  1. 4 1
      assets/javascripts/views/layout/mobile.coffee
  2. 2 11
      assets/stylesheets/components/_mobile.scss

+ 4 - 1
assets/javascripts/views/layout/mobile.coffee

@@ -55,7 +55,10 @@ class app.views.Mobile extends app.View
     return
 
   showSidebar: =>
-    return if @isSidebarShown()
+    if @isSidebarShown()
+      @body.scrollTop = 0
+      return
+
     @contentTop = @body.scrollTop
     @content.style.display = 'none'
     @sidebar.style.display = 'block'

+ 2 - 11
assets/stylesheets/components/_mobile.scss

@@ -55,9 +55,6 @@
     position: static;
     min-height: 100%;
     overflow: visible;
-    padding-bottom: 2rem;
-
-    > ._list { padding-bottom: 0; }
   }
 
   ._list, ._sidebar-footer { width: 100%; }
@@ -81,16 +78,10 @@
 
   ._list-link { display: none; }
 
-  ._sidebar-footer {
-    position: static;
-    margin-top: .5rem;
-    font-weight: bold;
-
-    &:before { content: none; }
-  }
+  ._sidebar-footer { box-shadow: none; }
 
   ._sidebar-footer-save {
-    margin-top: 1rem;
+    margin: 0;
     box-shadow: 0 1px $noteGreenBorder, 0 -1px $noteGreenBorder;
   }