jqh 5 gadi atpakaļ
vecāks
revīzija
97d8f4d6e4

+ 4 - 50
resources/assets/dcat/sass/components/_button.scss

@@ -39,63 +39,17 @@
 
 // --------------------- btn-custom -----------------------
 .btn-custom {
-  background: $custom;
-  border-color: $custom;
-  color: $white;
+  @include button-variant($custom, $custom);
 }
-
-.btn-custom:hover {
-  color: $white;
-  box-shadow: 0 8px 25px -8px $custom;
-}
-
 .btn-outline-custom {
-  border: 1px solid $custom;
-  color: $custom;
-  box-shadow: none;
-}
-
-.btn-outline-custom:hover {
-  background: rgba($custom, .15);
-  color: $custom;
-}
-
-.btn-outline-custom:not(:disabled):not(.disabled):active, .btn-outline-custom:not(:disabled):not(.disabled).active, .show > .btn-outline-custom.dropdown-toggle {
-  color: #fff;
-  background-color: $custom;
-  border-color: $custom;
+  @include button-outline-variant($custom, $custom);
 }
-.btn-outline-custom:not(:disabled):not(.disabled):active:focus, .btn-outline-custom:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-custom.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba($custom, 0.5);
-}
-
 // --------------------- btn-cyan -----------------------
 .btn-cyan {
-  background: $cyan;
-  border-color: $cyan;
-  color: $white;
+  @include button-variant($cyan, $cyan);
 }
-.btn-cyan:hover {
-  color: $white;
-  box-shadow: 0 8px 25px -8px $cyan;
-}
-
 .btn-outline-cyan {
-  border: 1px solid $cyan;
-  color: $cyan;
-  box-shadow: none;
-}
-.btn-outline-cyan:hover {
-  background: rgba($cyan, .15);
-  color: $cyan;
-}
-.btn-outline-cyan:not(:disabled):not(.disabled):active, .btn-outline-cyan:not(:disabled):not(.disabled).active, .show > .btn-outline-cyan.dropdown-toggle {
-  color: #fff;
-  background-color: $cyan;
-  border-color: $cyan;
-}
-.btn-outline-cyan:not(:disabled):not(.disabled):active:focus, .btn-outline-cyan:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-cyan.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba($cyan, 0.5);
+  @include button-outline-variant($cyan, $cyan);
 }
 
 .btn.btn-white {

+ 3 - 0
resources/assets/dcat/sass/variables/_variables.scss

@@ -5,6 +5,9 @@
 @import "../../../sass/variables/variables";
 @import "../../../sass/bootstrap/variables";
 
+// 按钮定义
+@import "../../../sass/bootstrap/mixins";
+
 
 @import "../theme/colors";
 

+ 5 - 83
resources/assets/sass/bootstrap-extended/_buttons.scss

@@ -7,13 +7,17 @@
   }
   // for white button
   &.btn-white{
-    background: white;
+    background-color: white;
     color: $body-color;
     &:hover,&:focus,&:active{
       color: $body-color !important;
     }
   }
 
+  &.btn-white.btn-primary {
+    background-color: $primary;
+  }
+
   // box shadow for gradient colors
   &[class*="bg-gradient-"]:hover{
     box-shadow: $gradient-button-bs;
@@ -44,37 +48,6 @@
     border: 1px solid;
   }
 
-  // Flat Secondary, Light and Dark
-  &.btn-flat-secondary {
-    &:hover {
-      background-color: rgba($secondary, 0.1);
-    }
-    &:active,
-    &:focus {
-      background: $secondary
-    }
-  }
-
-  &.btn-flat-dark {
-    &:hover {
-      background-color: rgba($dark, 0.1);
-    }
-    &:active,
-    &:focus {
-      background: $dark;
-      color: $white;
-    }
-  }
-
-  &.btn-flat-light {
-    &:hover {
-      background-color: rgba($light, 0.1);
-    }
-    &:active,
-    &:focus {
-      background: $light;
-    }
-  }
 
   // to remove extra spacing because of border in btn outline
   &[class*="btn-outline-"]{
@@ -86,52 +59,6 @@
     }
   }
 
-  // Relief Buttons Secondary, Light and Dark
-  &.btn-relief-secondary {
-    background-color: $secondary;
-    box-shadow: inset 0 -3px 0 0 rgba($pure-black, .2);
-    color: $white;
-
-    &:hover {
-      color: $white;
-    }
-
-    &:active,
-    &:focus {
-      outline: none;
-      transform: translateY(3px);
-    }
-  }
-  &.btn-relief-light {
-    box-shadow: inset 0 -3px 0 0 rgba(0, 0, 0, .2);
-    color: $white;
-
-    &:hover {
-      color: $white;
-    }
-
-    &:active,
-    &:focus {
-      outline: none;
-      transform: translateY(3px);
-    }
-  }
-  &.btn-relief-dark {
-    background-color: $dark;
-    box-shadow: inset 0 -3px 0 0 rgba(255, 255, 255, .1);
-    color: $white;
-
-    &:hover {
-      color: $white;
-    }
-
-    &:active,
-    &:focus {
-      outline: none;
-      transform: translateY(3px);
-    }
-  }
-
   // For btn-icon
   &.btn-icon {
     padding: .715rem .736rem;
@@ -147,11 +74,6 @@
     }
   }
 
-  // Remove focus/active focus outline
-  &.btn-square {
-    @include button-square-variant(0);
-  }
-
   &.btn-round {
     @include button-round-variant(2rem);
   }

+ 0 - 3
resources/assets/sass/bootstrap-extended/mixins/_buttons.scss

@@ -1,6 +1,3 @@
-@mixin button-square-variant($border) {
-    @include border-radius($border);
-}
 @mixin button-round-variant($border) {
     @include border-radius($border);
 }

+ 3 - 3
resources/assets/sass/bootstrap/mixins/_buttons.scss

@@ -3,7 +3,7 @@
 // Easily pump out default styles, as well as :hover, :focus, :active,
 // and disabled options for all buttons
 
-@mixin button-variant($background, $border, $hover-background: darken($background, 7.5%), $hover-border: darken($border, 10%), $active-background: darken($background, 10%), $active-border: darken($border, 12.5%)) {
+@mixin button-variant($background, $border, $hover-background: darken($background, 3.5%), $hover-border: darken($border, 3.5%), $active-background: darken($background, 5%), $active-border: darken($border, 5%)) {
   color: color-yiq($background);
   @include gradient-bg($background);
   border-color: $border;
@@ -63,8 +63,8 @@
   border-color: $color;
 
   @include hover {
-    color: $color-hover;
-    background-color: $active-background;
+    color: $color;
+    background-color: rgba($active-background, .1);
     border-color: $active-border;
   }
 

+ 1 - 2
resources/views/layouts/full-page.blade.php

@@ -1,6 +1,5 @@
 <!DOCTYPE html>
-<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"
-      data-textdirection="{{ $configData['direction'] === 'rtl' ? 'rtl' : 'ltr' }}">
+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
 
 <head>
     <meta charset="utf-8">

+ 4 - 0
src/Layout/Content.php

@@ -409,6 +409,7 @@ class Content implements Renderable
     {
         // default data array
         $defaultData = [
+            'theme' => '',
             'sidebar_collapsed' => false,
             'navbar_color' => '',
             'navbar_class' => 'floating',
@@ -422,6 +423,9 @@ class Content implements Renderable
         );
 
         $allOptions = [
+            'theme' => '',
+            'footer_type' => '',
+            'body_class' => '',
             'sidebar_collapsed' => [true, false],
             'navbar_color' => ['bg-primary', 'bg-info', 'bg-warning', 'bg-success', 'bg-danger', 'bg-dark'],
             'navbar_class' => ['floating' => 'floating-nav', 'sticky' => 'fixed-top', 'hidden' => 'd-none'],