Ver código fonte

Move disable doc notice to the top

Thibaut 10 anos atrás
pai
commit
f25d19a7dd

+ 1 - 0
assets/javascripts/views/misc/notice.coffee

@@ -16,6 +16,7 @@ class app.views.Notice extends app.View
     return
 
   show: ->
+    @addClass '_top' if @type is 'disabledDoc'
     @html @tmpl("#{@type}Notice", @args...)
     @prependTo $('._app')
     return

+ 1 - 1
assets/stylesheets/application-dark.css.scss

@@ -23,8 +23,8 @@
         'components/content',
         'components/page',
         'components/fail',
-        'components/notice',
         'components/path',
+        'components/notice',
         'components/prism',
         'components/mobile';
 

+ 1 - 1
assets/stylesheets/application.css.scss

@@ -23,8 +23,8 @@
         'components/content',
         'components/page',
         'components/fail',
-        'components/notice',
         'components/path',
+        'components/notice',
         'components/prism',
         'components/mobile';
 

+ 9 - 0
assets/stylesheets/components/_notice.scss

@@ -12,6 +12,15 @@
   @media #{$mediumScreen} { left: $sidebarMediumWidth; }
 
   ~ ._container { padding-bottom: 2.5rem; }
+
+  &._top {
+    bottom: auto;
+    top: $headerHeight;
+    margin-top: 1px;
+    box-shadow: inset 0 -1px $noticeBorder;
+
+    ~ ._container { padding-bottom: 0; padding-top: 2.5rem; }
+  }
 }
 
 ._notice-text {