takahiros пре 6 година
родитељ
комит
1a3ba05df1

+ 0 - 4
src/client/styles/scss/_alert.scss

@@ -1,4 +0,0 @@
-.myadmin-alert {
-  border: none;
-  border-radius: initial;
-}

+ 22 - 2
src/client/styles/scss/_override-bootstrap-variables.scss

@@ -59,11 +59,31 @@ $input-bg-disabled:              $btn-default-bgcolor;
 //** `<input>` border color
 //** `<input>` border color
 $input-border:                   $border;
 $input-border:                   $border;
 
 
-//** alert
+//** override bootstrap theme colors
 $theme-colors: (
 $theme-colors: (
   'primary': #337ab7,
   'primary': #337ab7,
   'success': #3c763d,
   'success': #3c763d,
   'info': #31708f,
   'info': #31708f,
   'warning': #8a6d3b,
   'warning': #8a6d3b,
   'danger': #ff0a54
   'danger': #ff0a54
-)
+);
+
+//** alert with custom color
+.alert {
+  a:not(.btn) {
+    color: white;
+  }
+}
+@each $theme-color, $color in $theme-colors {
+  .alert.alert-#{$theme-color} {
+    background: $color;
+    border: initial;
+    border-radius: initial;
+    a:not(.btn) {
+      &:hover,
+      &:focus {
+        color: lighten($color, 30%);
+      }
+    }
+  }
+}

+ 0 - 1
src/client/styles/scss/style-app.scss

@@ -37,7 +37,6 @@
 @import 'page';
 @import 'page';
 @import 'page_growi';
 @import 'page_growi';
 @import 'search';
 @import 'search';
-@import 'alert';
 @import 'shortcuts';
 @import 'shortcuts';
 @import 'user';
 @import 'user';
 @import 'user_growi';
 @import 'user_growi';

+ 4 - 2
src/client/styles/scss/theme/_override-agileadmin.scss

@@ -82,6 +82,7 @@ a {
 /*
 /*
  * Alert
  * Alert
  */
  */
+/*
 .alert {
 .alert {
   a:not(.btn) {
   a:not(.btn) {
     color: white;
     color: white;
@@ -111,15 +112,16 @@ a {
       }
       }
     }
     }
   }
   }
-  /*&.alert-danger {
+  &.alert-danger {
     a:not(.btn) {
     a:not(.btn) {
       &:hover,
       &:hover,
       &:focus {
       &:focus {
         color: lighten($danger, 30%);
         color: lighten($danger, 30%);
       }
       }
     }
     }
-  }*/
+  }
 }
 }
+*/
 
 
 /*
 /*
  * Form
  * Form

+ 1 - 1
src/server/views/layout-growi/base/layout.html

@@ -9,7 +9,7 @@
 <div class="container-fluid">
 <div class="container-fluid">
 
 
   <div class="row">
   <div class="row">
-    <div class="col-12 grw-title-bar">
+    <div class="col-12 header-container grw-title-bar">
       <div class="d-none d-md-block d-print-none py-2">
       <div class="d-none d-md-block d-print-none py-2">
         {% block content_header %}
         {% block content_header %}
         {% endblock %}
         {% endblock %}

+ 57 - 55
src/server/views/layout-growi/widget/header.html

@@ -1,68 +1,70 @@
 <div class="header-wrap">
 <div class="header-wrap">
-  <header id="page-header" class="d-flex align-items-center">
+  <header id="page-header">
 
 
-    <div class="title-logo-container hidden-xs hidden-sm">
-      <a class="logo" href="/">
-        <div class="logo-mark">{% include '../../widget/logo.html' %}</div>
-      </a>
-    </div><!-- /.title-logo-container -->
+    <div class="d-flex align-items-center">
+      <div class="title-logo-container hidden-xs hidden-sm">
+        <a class="logo" href="/">
+          <div class="logo-mark">{% include '../../widget/logo.html' %}</div>
+        </a>
+      </div><!-- /.title-logo-container -->
 
 
-    <div class="title-container">
-      <h1 class="title" id="revision-path"></h1>
-      {% if not forbidden and not isTrashPage() %}
-        <div id="tag-label"></div>
-      {% endif %}
-    </div><!-- /.title-container -->
-    {% if page %}
-    {% include '../../widget/header-buttons.html' %}
+      <div class="title-container">
+        <h1 class="title" id="revision-path"></h1>
+        {% if not forbidden and not isTrashPage() %}
+          <div id="tag-label"></div>
+        {% endif %}
+      </div><!-- /.title-container -->
+      {% if page %}
+      {% include '../../widget/header-buttons.html' %}
 
 
-    <ul class="authors hidden-sm hidden-xs text-nowrap">
-      <li>
-        <div class="d-flex align-items-center not-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 rounded-circle">
-          </a>
-          <div>
-            <div>Created by <a href="{{ userPageRoot(page.creator) }}">{{ page.creator.name|default(author.name) }}</a></div>
-            <div class="text-muted">{{ page.createdAt|datetz('Y/m/d H:i:s') }}</div>
+      <ul class="authors hidden-sm hidden-xs text-nowrap">
+        <li>
+          <div class="d-flex align-items-center not-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 rounded-circle">
+            </a>
+            <div>
+              <div>Created by <a href="{{ userPageRoot(page.creator) }}">{{ page.creator.name|default(author.name) }}</a></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 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>
           </div>
-        </div>
-      </li>
-      <li class="mt-2">
-        <div class="d-flex align-items-center not-affix">
-          <a class="mr-2" href="{{ userPageRoot(author) }}" data-toggle="tooltip" data-placement="bottom" title="{{ author.name }}">
-            <img src="{{ author|picture }}" class="picture rounded-circle">
-          </a>
-          <div>
-            <div>Updated by <a href="{{ userPageRoot(page.revision.author) }}">{{ author.name }}</a></div>
-            <div class="text-muted"">{{ page.updatedAt|datetz('Y/m/d H:i:s') }}</div>
+        </li>
+        <li class="mt-2">
+          <div class="d-flex align-items-center not-affix">
+            <a class="mr-2" href="{{ userPageRoot(author) }}" data-toggle="tooltip" data-placement="bottom" title="{{ author.name }}">
+              <img src="{{ author|picture }}" class="picture rounded-circle">
+            </a>
+            <div>
+              <div>Updated by <a href="{{ userPageRoot(page.revision.author) }}">{{ author.name }}</a></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 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>
           </div>
-        </div>
-      </li>
-    </ul><!-- /.authors -->
-    {% endif %}
+        </li>
+      </ul><!-- /.authors -->
+      {% endif %}
 
 
-    {% if not page and not forbidden and ('/' === path or 'crowi' === getConfig('crowi', 'customize:behavior')) and not isUserPageList(path) and !isTrashPage() %}
-      {% if '/' === path.slice(-1) %}
-        {% include '../../widget/create_portal.html' %}
+      {% if not page and not forbidden and ('/' === path or 'crowi' === getConfig('crowi', 'customize:behavior')) and not isUserPageList(path) and !isTrashPage() %}
+        {% if '/' === path.slice(-1) %}
+          {% include '../../widget/create_portal.html' %}
+        {% endif %}
       {% endif %}
       {% endif %}
-    {% endif %}
+    </div>
 
 
   </header>
   </header>
 </div><!-- / .header-wrap -->
 </div><!-- / .header-wrap -->