From: Stephen Cameron Date: Thu, 21 Nov 2019 19:03:26 +0000 (+0100) Subject: WIP #3053 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7d6a0938d8961e9a1d6d3e7d9eb008def6030b23;p=ccv-wordpress.git WIP #3053 --- diff --git a/wp-content/mu-plugins/cube/src/Elementor/Setup.php b/wp-content/mu-plugins/cube/src/Elementor/Setup.php index 9e6c992..556b0f6 100644 --- a/wp-content/mu-plugins/cube/src/Elementor/Setup.php +++ b/wp-content/mu-plugins/cube/src/Elementor/Setup.php @@ -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%', diff --git a/wp-content/mu-plugins/cube/src/Elementor/Widgets/BackgroundImage.php b/wp-content/mu-plugins/cube/src/Elementor/Widgets/BackgroundImage.php index 0ce61a0..7bf2b64 100644 --- a/wp-content/mu-plugins/cube/src/Elementor/Widgets/BackgroundImage.php +++ b/wp-content/mu-plugins/cube/src/Elementor/Widgets/BackgroundImage.php @@ -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 '
'; diff --git a/wp-content/mu-plugins/cube/src/Elementor/Widgets/TextBlock.php b/wp-content/mu-plugins/cube/src/Elementor/Widgets/TextBlock.php index c2fb95a..e5d36e8 100644 --- a/wp-content/mu-plugins/cube/src/Elementor/Widgets/TextBlock.php +++ b/wp-content/mu-plugins/cube/src/Elementor/Widgets/TextBlock.php @@ -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', [ diff --git a/wp-content/themes/CCV/resources/assets/styles/common/layout.styl b/wp-content/themes/CCV/resources/assets/styles/common/layout.styl index bc168e1..53c08a7 100644 --- a/wp-content/themes/CCV/resources/assets/styles/common/layout.styl +++ b/wp-content/themes/CCV/resources/assets/styles/common/layout.styl @@ -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 diff --git a/wp-content/themes/CCV/resources/assets/styles/components/buttons.styl b/wp-content/themes/CCV/resources/assets/styles/components/buttons.styl index b3ce76f..fb00b26 100644 --- a/wp-content/themes/CCV/resources/assets/styles/components/buttons.styl +++ b/wp-content/themes/CCV/resources/assets/styles/components/buttons.styl @@ -26,46 +26,12 @@ .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 diff --git a/wp-content/themes/CCV/resources/assets/styles/components/headings.styl b/wp-content/themes/CCV/resources/assets/styles/components/headings.styl index ef15456..e4df31b 100644 --- a/wp-content/themes/CCV/resources/assets/styles/components/headings.styl +++ b/wp-content/themes/CCV/resources/assets/styles/components/headings.styl @@ -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 diff --git a/wp-content/themes/CCV/resources/assets/styles/components/sections.styl b/wp-content/themes/CCV/resources/assets/styles/components/sections.styl index c1e8afb..35cd88f 100644 --- a/wp-content/themes/CCV/resources/assets/styles/components/sections.styl +++ b/wp-content/themes/CCV/resources/assets/styles/components/sections.styl @@ -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 diff --git a/wp-content/themes/CCV/resources/assets/styles/widgets/background-image.styl b/wp-content/themes/CCV/resources/assets/styles/widgets/background-image.styl index 8600bbf..24955f2 100644 --- a/wp-content/themes/CCV/resources/assets/styles/widgets/background-image.styl +++ b/wp-content/themes/CCV/resources/assets/styles/widgets/background-image.styl @@ -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 diff --git a/wp-content/themes/CCV/resources/assets/styles/widgets/text-block.styl b/wp-content/themes/CCV/resources/assets/styles/widgets/text-block.styl index 5e6894c..ba3e70c 100644 --- a/wp-content/themes/CCV/resources/assets/styles/widgets/text-block.styl +++ b/wp-content/themes/CCV/resources/assets/styles/widgets/text-block.styl @@ -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 @@ -31,6 +35,13 @@ 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