Просмотр исходного кода

remove codes that is related to header affix

Yuki Takei 6 лет назад
Родитель
Сommit
5304b3b14e

+ 0 - 22
src/client/js/legacy/crowi.js

@@ -116,28 +116,6 @@ Crowi.handleKeyCtrlSlashHandler = (event) => {
   event.preventDefault();
   event.preventDefault();
 };
 };
 
 
-// Crowi.initAffix = () => {
-//   const $affixContent = $('#page-header');
-//   if ($affixContent.length > 0) {
-//     const $affixContentContainer = $('.row.grw-subnav');
-//     const containerHeight = $affixContentContainer.outerHeight(true);
-//     $affixContent.affix({
-//       offset: {
-//         top() {
-//           return $('.navbar').outerHeight(true) + containerHeight;
-//         },
-//       },
-//     });
-//     $('[data-affix-disable]').on('click', function(e) {
-//       const $elm = $($(this).data('affix-disable'));
-//       $(window).off('.affix');
-//       $elm.removeData('affix').removeClass('affix affix-top affix-bottom');
-//       return false;
-//     });
-//     $affixContentContainer.css({ 'min-height': containerHeight });
-//   }
-// };
-
 Crowi.initClassesByOS = function() {
 Crowi.initClassesByOS = function() {
   // add classes to cmd-key by OS
   // add classes to cmd-key by OS
   const platform = navigator.platform.toLowerCase();
   const platform = navigator.platform.toLowerCase();

+ 41 - 38
src/client/styles/agile-admin/inverse/colors/_apply-colors-dark.scss

@@ -1,16 +1,19 @@
 .top-left-part {
 .top-left-part {
-  .logo-mark, .logo-text {
+  .logo-mark,
+  .logo-text {
     fill: white;
     fill: white;
   }
   }
 }
 }
 
 
-
 /*
 /*
  * Button
  * Button
  */
  */
 .btn-default {
 .btn-default {
-  &:hover, &:focus,
-  &.active, &.active:hover, &.active:focus {
+  &:hover,
+  &:focus,
+  &.active,
+  &.active:hover,
+  &.active:focus {
     color: white;
     color: white;
     background-color: lighten($bodycolor, 5%);
     background-color: lighten($bodycolor, 5%);
   }
   }
@@ -19,12 +22,14 @@
 /*
 /*
   * Form
   * Form
   */
   */
-input.form-control, textarea.form-control {
+input.form-control,
+textarea.form-control {
   color: lighten($bodytext, 30%);
   color: lighten($bodytext, 30%);
   background-color: darken($bodycolor, 5%);
   background-color: darken($bodycolor, 5%);
   border: 1px solid darken($border, 30%);
   border: 1px solid darken($border, 30%);
 }
 }
-.form-control[disabled], .form-control[readonly] {
+.form-control[disabled],
+.form-control[readonly] {
   color: lighten($bodytext, 10%);
   color: lighten($bodytext, 10%);
   background-color: lighten($bodycolor, 5%);
   background-color: lighten($bodycolor, 5%);
 }
 }
@@ -61,8 +66,11 @@ input.form-control, textarea.form-control {
  * Panel
  * Panel
  */
  */
 .panel {
 .panel {
-  &, &.panel-white, &.panel-default {
-    .panel-heading, .panel-body {
+  &,
+  &.panel-white,
+  &.panel-default {
+    .panel-heading,
+    .panel-body {
       color: $light;
       color: $light;
     }
     }
   }
   }
@@ -71,36 +79,31 @@ input.form-control, textarea.form-control {
 /*
 /*
  * Table
  * Table
  */
  */
- .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th,
- .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td ,
- .table > thead > tr > th, .table-bordered{
-     border-top: 1px solid $border;
- }
-
- .table-bordered > thead > tr > th,
- .table-bordered > tbody > tr > th,
- .table-bordered > tfoot > tr > th,
- .table-bordered > thead > tr > td,
- .table-bordered > tbody > tr > td,
- .table-bordered > tfoot > tr > td {
-   border: 1px solid $border;
- }
- .table > thead > tr > th {
-     border-bottom: 1px solid $border;
- }
-
- .table-bordered {
-     border: 1px solid $border;
- }
+.table > thead > tr > th,
+.table > tbody > tr > th,
+.table > tfoot > tr > th,
+.table > thead > tr > td,
+.table > tbody > tr > td,
+.table > tfoot > tr > td,
+.table > thead > tr > th,
+.table-bordered {
+  border-top: 1px solid $border;
+}
 
 
+.table-bordered > thead > tr > th,
+.table-bordered > tbody > tr > th,
+.table-bordered > tfoot > tr > th,
+.table-bordered > thead > tr > td,
+.table-bordered > tbody > tr > td,
+.table-bordered > tfoot > tr > td {
+  border: 1px solid $border;
+}
+.table > thead > tr > th {
+  border-bottom: 1px solid $border;
+}
 
 
-/*
- * GROWI header
- */
-.main-container header.affix {
-  .logo-mark {
-    fill: white;
-  }
+.table-bordered {
+  border: 1px solid $border;
 }
 }
 
 
 /*
 /*
@@ -160,8 +163,8 @@ legend {
 .admin-page {
 .admin-page {
   #themeOptions {
   #themeOptions {
     .theme-option-container.active a {
     .theme-option-container.active a {
-      background-color: darken($themecolor,15%);
-      border-color: darken($themecolor,15%);
+      background-color: darken($themecolor, 15%);
+      border-color: darken($themecolor, 15%);
     }
     }
   }
   }
 }
 }

+ 0 - 25
src/client/styles/scss/_page_growi.scss

@@ -39,29 +39,4 @@
       }
       }
     }
     }
   }
   }
-
-  /*
-   * affix header
-   */
-  header:not(.affix) {
-    .only-affix {
-      display: none !important;
-    }
-  }
-  header.affix {
-    .not-affix {
-      display: none !important;
-    }
-
-    // show logo link
-    div.title-logo-container {
-      display: unset;
-      margin-right: 6px;
-      margin-left: -12px;
-    }
-    // hide authors in affix
-    .authors {
-      padding-left: 0.5em;
-    }
-  }
 }
 }

+ 2 - 18
src/server/views/layout-growi/widget/header.html

@@ -18,7 +18,7 @@
 
 
     <ul class="authors hidden-sm hidden-xs text-nowrap">
     <ul class="authors hidden-sm hidden-xs text-nowrap">
       <li>
       <li>
-        <div class="d-flex align-items-center not-affix">
+        <div class="d-flex align-items-center">
           <a class="mr-2" href="{{ userPageRoot(page.creator) }}" data-toggle="tooltip" data-placement="bottom" title="{{ page.creator.name|default(author.name) }}">
           <a class="mr-2" href="{{ userPageRoot(page.creator) }}" data-toggle="tooltip" data-placement="bottom" title="{{ page.creator.name|default(author.name) }}">
             <img src="{{ page.creator|default(author)|picture }}" class="picture rounded-circle">
             <img src="{{ page.creator|default(author)|picture }}" class="picture rounded-circle">
           </a>
           </a>
@@ -27,17 +27,9 @@
             <div class="text-muted">{{ page.createdAt|datetz('Y/m/d H:i:s') }}</div>
             <div class="text-muted">{{ page.createdAt|datetz('Y/m/d H:i:s') }}</div>
           </div>
           </div>
         </div>
         </div>
-        <div class="d-flex align-items-center only-affix">
-          <a class="mr-2" href="{{ userPageRoot(page.creator) }}" data-toggle="tooltip" data-placement="bottom" title="{{ page.creator.name|default(author.name) }}">
-            <img src="{{ page.creator|default(author)|picture }}" class="picture picture-xs rounded-circle">
-          </a>
-          <div class="ml-auto">
-            <div>Created in <span class="text-muted">{{ page.createdAt|datetz('Y/m/d H:i:s') }}</span></div>
-          </div>
-        </div>
       </li>
       </li>
       <li class="mt-1">
       <li class="mt-1">
-        <div class="d-flex align-items-center not-affix">
+        <div class="d-flex align-items-center">
           <a class="mr-2" href="{{ userPageRoot(author) }}" data-toggle="tooltip" data-placement="bottom" title="{{ author.name }}">
           <a class="mr-2" href="{{ userPageRoot(author) }}" data-toggle="tooltip" data-placement="bottom" title="{{ author.name }}">
             <img src="{{ author|picture }}" class="picture rounded-circle">
             <img src="{{ author|picture }}" class="picture rounded-circle">
           </a>
           </a>
@@ -46,14 +38,6 @@
             <div class="text-muted"">{{ page.updatedAt|datetz('Y/m/d H:i:s') }}</div>
             <div class="text-muted"">{{ page.updatedAt|datetz('Y/m/d H:i:s') }}</div>
           </div>
           </div>
         </div>
         </div>
-        <div class="d-flex align-items-center only-affix">
-          <a class="mr-2" href="{{ userPageRoot(author) }}" data-toggle="tooltip" data-placement="bottom" title="{{ author.name }}">
-            <img src="{{ author|picture }}" class="picture picture-xs rounded-circle">
-          </a>
-          <div class="ml-auto">
-            <div>Updated in <span class="text-muted"">{{ page.updatedAt|datetz('Y/m/d H:i:s') }}</span></div>
-          </div>
-        </div>
       </li>
       </li>
     </ul><!-- /.authors -->
     </ul><!-- /.authors -->
     {% endif %}
     {% endif %}