Browse Source

增加蓝色主题配色

jqh 5 years ago
parent
commit
64f28b2d4c

File diff suppressed because it is too large
+ 19 - 0
resources/dist/adminlte/adminlte-blue.css


File diff suppressed because it is too large
+ 0 - 0
resources/dist/css/dcat-app-blue.css


+ 0 - 0
resources/dist/dcat/css/dcat-app.css → resources/dist/css/dcat-app.css


+ 1 - 0
resources/dist/dcat/extra/markdown-blue.css

@@ -0,0 +1 @@
+.editormd-html-preview code,.editormd-preview-container code{font-size:13px!important;font-family:Inconsolata,Fira Mono,Consolas,Liberation Mono,Menlo,Courier,monospace!important;word-wrap:break-word!important}.markdown-body pre code{box-shadow:none}.com{color:#93939e!important}.tag,.typ{color:#da564a!important}.clo,.opn{color:#93a1a1!important}.atn,.lit{color:#007ee5!important}.atv{color:#fc8bb3!important}.dec,.var{color:teal!important}.fun{color:#dc322f!important}pre.prettyprint{padding:10px;border:1px solid #e1e1e8!important;-moz-tab-size:4!important;-o-tab-size:4!important;tab-size:4!important}pre.prettyprint.linenums{box-shadow:inset 40px 0 0 hsla(0,0%,93.3%,.35),inset 41px 0 0 hsla(0,0%,93.3%,.35)!important}pre.prettyprint.linenums ol.linenums{color:#1e347b!important;padding-left:30px!important;margin-top:0!important;margin-bottom:0}pre.prettyprint.linenums ol.linenums li{color:#bebec5!important;line-height:18px!important;padding-left:12px!important;background:#f7f7f9!important}pre.prettyprint.linenums ol.linenums li.L0,pre.prettyprint.linenums ol.linenums li.L1,pre.prettyprint.linenums ol.linenums li.L2,pre.prettyprint.linenums ol.linenums li.L3,pre.prettyprint.linenums ol.linenums li.L4,pre.prettyprint.linenums ol.linenums li.L5,pre.prettyprint.linenums ol.linenums li.L6,pre.prettyprint.linenums ol.linenums li.L7,pre.prettyprint.linenums ol.linenums li.L8,pre.prettyprint.linenums ol.linenums li.L9{list-style-type:decimal!important}pre.prettyprint{width:100%;border:0!important}.pln{color:#444!important}.kwd{color:#07a!important;font-weight:700}.pun{color:#999!important}.str{color:#2e7d32!important}pre.prettyprint{background-color:#f7f7f9!important;border:0 solid #333}.editormd-html-preview,.editormd-preview-container{padding:0}

File diff suppressed because it is too large
+ 0 - 0
resources/dist/dcat/extra/step-blue.css


File diff suppressed because it is too large
+ 0 - 0
resources/dist/dcat/extra/upload-blue.css


+ 3 - 3
resources/views/filter/button.blade.php

@@ -1,6 +1,6 @@
-<div class="btn-group filter-button-group btn-no-shadow dropdown" style="margin-right:3px">
+<div class="btn-group filter-button-group dropdown" style="margin-right:3px">
     <button
-            class="btn btn-outline-primary {{ $btn_class }}"
+            class="btn btn-primary {{ $btn_class }}"
             @if($only_scopes)data-toggle="dropdown"@endif
             @if($scopes->isNotEmpty()) style="border-right: 0" @endif
     >
@@ -14,7 +14,7 @@
             <li role="separator" class="dropdown-divider"></li>
             <li class="dropdown-item"><a href="{{ $url_no_scopes }}">{{ trans('admin.cancel') }}</a></li>
         </ul>
-        <button type="button" class="btn btn-outline-primary" data-toggle="dropdown" style="padding: 0.75rem 1rem !important;border-left: 0">
+        <button type="button" class="btn btn-primary" data-toggle="dropdown" style="padding: 0.75rem 1rem !important;border-left: 0">
             @if($current_label) <span>{{ $current_label }}&nbsp;</span>@endif <i class="feather icon-chevron-down"></i>
         </button>
     @endif

+ 1 - 1
resources/views/tree/container.blade.php

@@ -18,7 +18,7 @@
 
         @if($useRefresh)
             &nbsp;<div class="btn-group" style="margin-right:3px">
-                <button class="btn btn-outline-primary btn-sm" data-action="refresh" ><i class="feather icon-refresh-cw"></i><span class="d-none d-sm-inline">&nbsp;{{ trans('admin.refresh') }}</span></button>
+                <button class="btn btn-primary btn-sm" data-action="refresh" ><i class="feather icon-refresh-cw"></i><span class="d-none d-sm-inline">&nbsp;{{ trans('admin.refresh') }}</span></button>
             </div>
         @endif
 

+ 10 - 4
src/Color.php

@@ -64,15 +64,21 @@ class Color
      */
     protected static $colors = [
         'indigo' => [
-            'css' => [
-
-            ],
+            'css' => [],
             'colors' => [
                 'primary'        => 'indigo',
                 'primary-darker' => 'indigo-darker',
                 'link'           => 'indigo-darker',
             ],
         ],
+        'blue' => [
+            'css' => [],
+            'colors' => [
+                'primary'        => '#3d97dd',
+                'primary-darker' => '#278bd9',
+                'link'           => '#278bd9',
+            ],
+        ],
     ];
 
     /**
@@ -100,7 +106,7 @@ class Color
 
         // 其他蓝色
         'blue1' => '#007ee5',
-        'blue2' => '#4199de',
+        'blue2' => '#3d97dd',
 
         // 橘色
         'orange1' => '#ffcc80',

+ 3 - 3
src/Grid/Tools/CreateButton.php

@@ -39,7 +39,7 @@ class CreateButton implements Renderable
             ->success('Dcat.reload()')
             ->dimensions($width, $height);
 
-        return "<button data-url='$url' class='btn btn-outline-primary {$class}'><i class='feather icon-plus'></i><span class='d-none d-sm-inline'>&nbsp; $new</span></button>";
+        return "<button data-url='$url' class='btn btn-primary {$class}'><i class='feather icon-plus'></i><span class='d-none d-sm-inline'>&nbsp; $new</span></button>";
     }
 
     protected function renderCreateButton()
@@ -51,13 +51,13 @@ class CreateButton implements Renderable
         $new = trans('admin.new');
         $url = $this->grid->getCreateUrl();
 
-        return "<a href='{$url}' class='btn btn-outline-primary'>
+        return "<a href='{$url}' class='btn btn-primary'>
     <i class='feather icon-plus'></i><span class='d-none d-sm-inline'>&nbsp;&nbsp;{$new}</span>
 </a>";
     }
 
     public function render()
     {
-        return "<div class='btn-group btn-no-shadow' style='margin-right:3px'>{$this->renderCreateButton()}{$this->renderDialogCreateButton()}</div>";
+        return "<div class='btn-group' style='margin-right:3px'>{$this->renderCreateButton()}{$this->renderDialogCreateButton()}</div>";
     }
 }

+ 1 - 1
src/Grid/Tools/ExportButton.php

@@ -103,7 +103,7 @@ JS;
 
         return <<<EOT
 <div class="btn-group dropdown shadow-none" style="margin-right:3px">
-    <button type="button" class="btn btn-outline-primary dropdown-toggle" data-toggle="dropdown">
+    <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
         <i class="feather icon-download"></i>
         <span class="d-none d-sm-inline">&nbsp;{$export}&nbsp;</span>
         <span class="caret"></span>

+ 1 - 1
src/Grid/Tools/RefreshButton.php

@@ -16,7 +16,7 @@ class RefreshButton implements Renderable
         $refresh = trans('admin.refresh');
 
         return <<<EOT
-<button data-action="refresh" class="btn btn-outline-primary grid-refresh btn-mini" style="margin-right:3px">
+<button data-action="refresh" class="btn btn-primary grid-refresh btn-mini" style="margin-right:3px">
     <i class="feather icon-refresh-cw"></i><span class="d-none d-sm-inline">&nbsp; $refresh</span>
 </button>
 EOT;

+ 17 - 3
webpack.mix.js

@@ -13,6 +13,8 @@ require('dotenv').config();
  */
 const glob = require('glob')
 
+let theme = null;
+
 let distPath = mix.inProduction() ? 'resources/dist' : 'resources/pre-dist';
 
 function mixAssetsDir(query, cb) {
@@ -22,6 +24,12 @@ function mixAssetsDir(query, cb) {
   });
 }
 
+function themeCss(path) {
+  let sf = theme ? '-'+theme : '';
+
+  return `${distPath}/${path}${sf}.css`
+}
+
 function dcatPath(path) {
   return 'resources/assets/dcat/' + path;
 }
@@ -42,7 +50,7 @@ mix.copyDirectory('resources/assets/fonts', distPath + '/fonts');
 mix.copyDirectory('resources/assets/vendors', distPath + '/vendors');
 
 // AdminLTE3.0
-mix.sass('resources/assets/adminlte/scss/AdminLTE.scss', distPath + '/adminlte/adminlte.css').sourceMaps();
+mix.sass('resources/assets/adminlte/scss/AdminLTE.scss', themeCss('adminlte/adminlte')).sourceMaps();
 mix.js('resources/assets/adminlte/js/AdminLTE.js', distPath + '/adminlte/adminlte.js').sourceMaps();
 
 // 复制第三方插件文件夹
@@ -50,8 +58,14 @@ mix.copyDirectory(dcatPath('plugins'), dcatDistPath('plugins'));
 // 打包app.js
 mix.js(dcatPath('js/dcat-app.js'), dcatDistPath('js/dcat-app.js')).sourceMaps();
 // 打包app.scss
-mix.sass(dcatPath('sass/dcat-app.scss'), dcatDistPath('css/dcat-app.css')).sourceMaps();
+mix.sass(dcatPath('sass/dcat-app.scss'), themeCss('css/dcat-app')).sourceMaps();
 
 // 打包所有 extra 里面的所有js和css
 mixAssetsDir('dcat/extra/*.js', (src, dest) => mix.js(src, dest));
-mixAssetsDir('dcat/extra/*.scss', (src, dest) => mix.sass(src, dest.replace('scss', 'css')));
+mixAssetsDir('dcat/extra/*.scss', (src, dest) => {
+  if (theme) {
+    return mix.sass(src, dest.replace('\.scss', '-'+theme+'.css'))
+  }
+
+  return mix.sass(src, dest.replace('scss', 'css'))
+});

Some files were not shown because too many files changed in this diff