Browse Source

Merge pull request #4923 from weseek/feat/83936-84034-show-navbar

always show navbar
Yuki Takei 4 years ago
parent
commit
28c397810a
2 changed files with 18 additions and 14 deletions
  1. 2 14
      packages/app/src/styles/_search.scss
  2. 16 0
      packages/app/src/styles/_sidebar.scss

+ 2 - 14
packages/app/src/styles/_search.scss

@@ -184,8 +184,8 @@
     top: 0px;
     top: 0px;
 
 
     .search-result-list-scroll {
     .search-result-list-scroll {
-      // subtract the height of SearchControl component + a gap made above #page-wrapper and below #main
-      height: calc(100vh - 117px);
+      // subtract the height of GrowiNavbar + (SearchControl component + other factors)
+      height: calc(100vh - (($grw-navbar-height + $grw-navbar-border-width) + 110px));
       overflow-y: scroll;
       overflow-y: scroll;
     }
     }
     .nav.nav-pills {
     .nav.nav-pills {
@@ -276,18 +276,6 @@
   }
   }
 }
 }
 
 
-// class to add to .grw-navbar to hide its navbar above the displaying page
-body.on-search {
-  .grw-navbar {
-    position: fixed !important;
-    width: 100vw;
-  }
-  .page-wrapper {
-    position: relative;
-    top: $grw-navbar-border-width;
-  }
-}
-
 // 2021/9/22 TODO: Remove after moving to SearchResult
 // 2021/9/22 TODO: Remove after moving to SearchResult
 .search-page-input {
 .search-page-input {
   position: sticky;
   position: sticky;

+ 16 - 0
packages/app/src/styles/_sidebar.scss

@@ -327,3 +327,19 @@
 .grw-sidebar-backdrop.modal-backdrop {
 .grw-sidebar-backdrop.modal-backdrop {
   z-index: $zindex-fixed + 1;
   z-index: $zindex-fixed + 1;
 }
 }
+
+// style to apply when displaying search page
+.growi.on-search {
+  // set sidebar height shown in search page
+  $search-page-sidebar-height: calc(100vh - ($grw-navbar-height + $grw-navbar-border-width));
+
+  .grw-sidebar {
+    height: $search-page-sidebar-height;
+    .data-layout-container {
+      height: $search-page-sidebar-height;
+    }
+    .grw-sidebar-nav {
+      height: $search-page-sidebar-height;
+    }
+  }
+}