]> _ Git - ccv-wordpress.git/commitdiff
WIP #3053
authorStephen Cameron <stephen@cubedesigners.com>
Thu, 21 Nov 2019 19:03:26 +0000 (20:03 +0100)
committerStephen Cameron <stephen@cubedesigners.com>
Thu, 21 Nov 2019 19:03:26 +0000 (20:03 +0100)
wp-content/mu-plugins/cube/src/Elementor/Setup.php
wp-content/mu-plugins/cube/src/Elementor/Widgets/BackgroundImage.php
wp-content/mu-plugins/cube/src/Elementor/Widgets/TextBlock.php
wp-content/themes/CCV/resources/assets/styles/common/layout.styl
wp-content/themes/CCV/resources/assets/styles/components/buttons.styl
wp-content/themes/CCV/resources/assets/styles/components/headings.styl
wp-content/themes/CCV/resources/assets/styles/components/sections.styl
wp-content/themes/CCV/resources/assets/styles/widgets/background-image.styl
wp-content/themes/CCV/resources/assets/styles/widgets/text-block.styl

index 9e6c9927042a65c7289c6904f7510b22e5a64bc0..556b0f6e6bdd8fc8b706c35331e86977ec47abd7 100644 (file)
@@ -89,8 +89,7 @@ class Setup {
                     'label' => __('Top Padding', 'cube'),
                     'type' => Controls_Manager::SELECT,
                     'options' => [
-                        '' => __( 'Défaut', 'cube' ),
-                        'pt-0' => '0',
+                        '' => __('Aucun (défaut)', 'cube'),
                         'pt-1v' => '2.5%',
                         'pt-2v' => '5%',
                         'pt-3v' => '7.5%',
@@ -107,8 +106,7 @@ class Setup {
                     'label' => __('Bottom Padding', 'cube'),
                     'type' => Controls_Manager::SELECT,
                     'options' => [
-                        '' => __( 'Défaut', 'cube' ),
-                        'pb-0' => '0',
+                        '' => __('Aucun (défaut)', 'cube'),
                         'pb-1v' => '2.5%',
                         'pb-2v' => '5%',
                         'pb-3v' => '7.5%',
index 0ce61a0627add360ba31759f60d5df92cac1624e..7bf2b64c2435d55a38ba1b41c546d64b6bde9987 100644 (file)
@@ -103,7 +103,7 @@ class BackgroundImage extends _Base {
         } else {
             // No image set, use fallback
             $image['url'] = Utils::get_placeholder_image_src();
-            $ratio = '100%';
+            $ratio = '80%';
         }
 
         echo '<div class="bg-image" style="background-image: url('. $image['url'] .'); background-position: '. $bg_position .'"><div class="bg-image-sizer" style="padding-bottom: '. $ratio .'"></div></div>';
index c2fb95a127d63834cca7d63735e3f5d162d35d68..e5d36e8e6a62f0f5e6308ec3c0fe171b029a1521 100644 (file)
@@ -113,6 +113,17 @@ class TextBlock extends _Base {
         );
         */
 
+        $this->add_control(
+            'title_decoration',
+            [
+                'label' => __('Hide title decoration', 'cube'),
+                'type' => Controls_Manager::SWITCHER,
+                'default' => '',
+                'return_value' => 'text-block-title-no-decoration',
+                'prefix_class' => '',
+            ]
+        );
+
         $this->add_control(
                        'title_color',
                        [
index bc168e1c432ae66be799bfd7f21929dcd0d33f38..53c08a7801c7003e0d469a975ab566f825260beb 100644 (file)
@@ -5,6 +5,7 @@
 // harm and it's more intuitive behaviour...
 .elementor-widget-wrap
   height: 100%
+  align-content: center
 
 .container,
 .elementor-section-boxed > .elementor-container
@@ -20,9 +21,7 @@
 
 
 // Override default spacing between widgets
-// All widgets get the bottom margin, even the last child because normally
-// this is desired and if it's not, we can add the class `mb-0!` to it...
-.elementor-widget-wrap .elementor-widget //:not(:last-child)
+.elementor-widget-wrap .elementor-widget:not(:last-child)
   constrain(margin-bottom, $vertical-gutter) // Set margin bottom to standard gutter
 
 // Get rid of default 10px padding around elements
index b3ce76fa26476cf02107e3882109cf7bf6db1aee..fb00b26c56077c079e23ead2575d0ad2c88a598c 100644 (file)
 .elementor-element.elementor-button-info .elementor-button
   @apply bg-teal
 
-  //&-text
-  //  @apply z-10 relative
-
-  //&-no-hover:before
-  //  display: none
-  //
-  //&:hover:before
-  //  transform: scaleX(1)
-  //  opacity: 1
-
-  //&:before
-  //  content: ''
-  //  position: absolute
-  //  top: 0
-  //  left: 0
-  //  width: 100%
-  //  height: 100%
-  //  z-index: 1
-  //  background-color: rgba(#fff, 0.2)
-  //  transform: scaleX(0)
-  //  transform-origin: left
-  //  transition: transform 0.2s ease-out
-
-  // Circle hover effect
-  //&:hover:before
-  //  transform: scale(1.1) translateY(-50%)
-  //  opacity: 1
-  //
-  //&:before
-  //  content: ''
-  //  position: absolute
-  //  top: 50%
-  //  left: 0
-  //  z-index: 1
-  //  background-color: rgba(#fff, 0.15)
-  //  width: 100%
-  //  padding-bottom: 100%
-  //  border-radius: 50%
-  //  transform: scale(0) translateY(-50%)
-  //  transform-origin: top center
-  //  transition: all 0.2s ease-out
-  //  opacity: 0
+// Icons inside buttons
+.elementor-button-content-wrapper
+  @apply flex items-center
+
+.elementor-button-icon
+  svg
+    width: auto
+    height: 1em
 
index ef154566b58399d8e69a150be890b4387fab91cb..e4df31b93215c3afc85af6c0e62a4a1add1f2f78 100644 (file)
@@ -3,7 +3,8 @@ h1, .h1, h2, .h2
   font-weight: 400
 
   &:not(.plain)
-    @apply font-display font-medium mb-2 uppercase
+    @apply font-display font-medium uppercase
+    margin-bottom: 0.5em
 
 h1, .h1
   @apply text-3xl
index c1e8afb5d93090a40c99d4f076e98def3c855204..35cd88f67979eb7d00deab62abc60a5bb04cf04c 100644 (file)
@@ -14,8 +14,8 @@
         margin-bottom: 0
 
   //--- Default section layout
-  &.layout-default.elementor-section-boxed
-    > .elementor-container
+  //&.layout-default.elementor-section-boxed
+  //  > .elementor-container
       //center($content-max-width * 0.8) // 1920px * 0.8 = 1536px
       //horizontal-spacing(5vw)
       //box-sizing: content-box // So padding doesn't influence max-width
index 8600bbf2ca3c972a2b72523b83ef18bcaddfce11..24955f2ff709853b6b93e90040c1e11a9d492469 100644 (file)
@@ -3,12 +3,12 @@
   background-repeat: no-repeat
   background-position: center
 
-  &-sizer
-    // The sizer is only needed when in one column mode.
-    // The rest of the time it should just fill the height
-    // required by the other column's content...
-    +above($breakpoint-columns)
-      display: none
+  //&-sizer
+  //  // The sizer is only needed when in one column mode.
+  //  // The rest of the time it should just fill the height
+  //  // required by the other column's content...
+  //  +above($breakpoint-columns)
+  //    display: none
 
 // Ensure full height on element so the image always covers the full area
 .elementor-widget-cube-bg-image, .elementor-widget-container, .bg-image
index 5e6894c93ca9b6fa696db7e217ec162fdf0f21bb..ba3e70ce1583e23495c75646045966dafcc216a1 100644 (file)
@@ -6,6 +6,9 @@
   width: 100%
   box-sizing: content-box // So padding doesn't influence max-width
 
+  &.text-block-align-center
+    horizontal-spacing(5vw, margin) // Can't have asymetrical margins when we want it perfectly centred
+
   +below(500px)
     horizontal-spacing(5vw, margin)
 
@@ -24,6 +27,7 @@
     .text-block-align-center &
       padding-bottom: 0.75em
       margin-bottom: @padding-bottom
+      margin-left: 0
 
       &:before
         top: auto
         left: 50%
         transform: translateX(-50%)
 
+    .text-block-title-no-decoration &
+      margin-bottom: 0.5rem
+      padding-bottom: 0
+
+      &:before
+        display: none
+
 
     +below(1150px)
       white-space: normal // Avoid strange gaps caused by pre-line breaks wrapping