From 4be9e83a762cfea2fe6a9c98ed80d2a3e11c9e7e Mon Sep 17 00:00:00 2001 From: soufiane Date: Fri, 14 Jun 2024 16:47:28 +0200 Subject: [PATCH] wait #6962 @2:00 --- .../src/Elementor/Widgets/HeaderSlideshow.php | 93 ++++++++++++++++- wp-content/themes/CCV/dist/mix-manifest.json | 8 +- .../CCV/dist/scripts/flatpickr/trigger.js | 4 +- wp-content/themes/CCV/dist/scripts/vendor.js | 2 +- wp-content/themes/CCV/dist/styles/app.css | 99 ++++++++++++++----- .../resources/assets/images/logo_footer.svg | 27 +++++ .../assets/styles/common/global.styl | 3 + .../assets/styles/components/mmenu.styl | 11 ++- .../styles/widgets/header-slideshow.styl | 65 ++++++++---- 9 files changed, 256 insertions(+), 56 deletions(-) create mode 100644 wp-content/themes/CCV/resources/assets/images/logo_footer.svg diff --git a/wp-content/mu-plugins/cube/src/Elementor/Widgets/HeaderSlideshow.php b/wp-content/mu-plugins/cube/src/Elementor/Widgets/HeaderSlideshow.php index d4fa7f59..a6049828 100644 --- a/wp-content/mu-plugins/cube/src/Elementor/Widgets/HeaderSlideshow.php +++ b/wp-content/mu-plugins/cube/src/Elementor/Widgets/HeaderSlideshow.php @@ -101,6 +101,68 @@ class HeaderSlideshow extends _Base { 'show_label' => true, ] ); + + $this->add_control( + 'cta_text', + [ + 'label' => __('Call to Action text', 'cube'), + 'type' => Controls_Manager::TEXT, + 'default' => '' + ] + ); + + $this->add_control( + 'cta_icon', + [ + 'label' => __('Icon'), + 'label_block' => true, + 'type' => Controls_Manager::MEDIA, + ] + ); + + $this->add_control( + 'cta_link', + [ + 'label' => __('Call to Action link', 'cube'), + 'type' => Controls_Manager::URL, + 'default' => [ + 'url' => '', + 'is_external' => false, + ], + 'show_external' => true + ] + ); + + $this->add_control( + 'cta_text_2', + [ + 'label' => __('Call to Action text', 'cube'), + 'type' => Controls_Manager::TEXT, + 'default' => '' + ] + ); + + $this->add_control( + 'cta_2_icon', + [ + 'label' => __('Icon'), + 'label_block' => true, + 'type' => Controls_Manager::MEDIA, + ] + ); + + $this->add_control( + 'cta_link_2', + [ + 'label' => __('Call to Action link', 'cube'), + 'type' => Controls_Manager::URL, + 'default' => [ + 'url' => '', + 'is_external' => false, + ], + 'show_external' => true + ] + ); $this->end_controls_section(); @@ -120,6 +182,14 @@ class HeaderSlideshow extends _Base { $body = $this->get_settings('body'); $images_desktop = $this->get_settings('images_desktop'); $images_mobile = $this->get_settings('images_mobile'); + $cta_text = $this->get_settings('cta_text'); + $cta_icon = $this->get_settings('cta_icon')['url']; + $cta_link = $this->get_settings('cta_link')['url']; + $cta_text_2 = $this->get_settings('cta_text_2'); + $cta_2_icon = $this->get_settings('cta_2_icon')['url']; + $cta_link_2 = $this->get_settings('cta_link_2')['url']; + + $this->add_render_attribute(['cta_text','cta_text_2'], 'class', ['btn btn-no-hover flex items-center text-sm']); if (!$images_desktop || count($images_desktop) < 1) return false; // Must have images to display @@ -170,12 +240,31 @@ class HeaderSlideshow extends _Base {

- +
+ + + +

- diff --git a/wp-content/themes/CCV/dist/mix-manifest.json b/wp-content/themes/CCV/dist/mix-manifest.json index 39be8c7c..0c665d89 100644 --- a/wp-content/themes/CCV/dist/mix-manifest.json +++ b/wp-content/themes/CCV/dist/mix-manifest.json @@ -5,15 +5,15 @@ "/scripts/consultation.js.map": "/scripts/consultation.js.map?id=8ce6dc2a0eef2666c02e", "/scripts/customizer.js": "/scripts/customizer.js?id=01763427237423347bc2", "/scripts/customizer.js.map": "/scripts/customizer.js.map?id=27f01cf5a772c6ee061a", - "/scripts/flatpickr/trigger.js": "/scripts/flatpickr/trigger.js?id=fc61b0404ca0ad0b078a", + "/scripts/flatpickr/trigger.js": "/scripts/flatpickr/trigger.js?id=d224ec853f6a8c819fee", "/styles/flatpickr.css": "/styles/flatpickr.css?id=df261d4c83e765b7223a", "/styles/lity.css": "/styles/lity.css?id=f0b618fcc4c993e1a325", - "/styles/app.css": "/styles/app.css?id=d884a392509aeac233e1", + "/styles/app.css": "/styles/app.css?id=c8bae870c42f88ad3f60", "/styles/admin.css": "/styles/admin.css?id=f15bee710daeb892af36", "/scripts/flatpickr/trigger.js.map": "/scripts/flatpickr/trigger.js.map?id=d2690e14bff00a75baf1", "/styles/flatpickr.css.map": "/styles/flatpickr.css.map?id=eef3afe69d1acf67a84b", "/styles/lity.css.map": "/styles/lity.css.map?id=55dd6744dfdcf8db5744", - "/styles/app.css.map": "/styles/app.css.map?id=ba817ac9e3a1d8f2f595", + "/styles/app.css.map": "/styles/app.css.map?id=7f6f9b54ab09740e9728", "/styles/admin.css.map": "/styles/admin.css.map?id=073b555eeccf709af20a", "/scripts/forms/forms.js": "/scripts/forms/forms.js?id=470a94a20c9c5c9c646e", "/scripts/forms/forms.js.map": "/scripts/forms/forms.js.map?id=d18bb8011592c79f83ae", @@ -29,7 +29,7 @@ "/scripts/testimonial-carousel.js.map": "/scripts/testimonial-carousel.js.map?id=74a5e1051740624c2fdb", "/scripts/timeline-horizontal.js": "/scripts/timeline-horizontal.js?id=af5b9cd504ddf8bcdd78", "/scripts/timeline-horizontal.js.map": "/scripts/timeline-horizontal.js.map?id=696523272c52cb401b31", - "/scripts/vendor.js": "/scripts/vendor.js?id=7dbb46cd595155c1c593", + "/scripts/vendor.js": "/scripts/vendor.js?id=694f5fa57aa40565c9fe", "/scripts/vendor.js.map": "/scripts/vendor.js.map?id=1ae8b008bab06bd159cb", "/scripts/flatpickr/flatpickr.min.js": "/scripts/flatpickr/flatpickr.min.js?id=da3c57326c30dcf6d59a", "/scripts/flatpickr/locale/ar.js": "/scripts/flatpickr/locale/ar.js?id=9d204b1b1270509bd8e5", diff --git a/wp-content/themes/CCV/dist/scripts/flatpickr/trigger.js b/wp-content/themes/CCV/dist/scripts/flatpickr/trigger.js index 07477304..ea3cc750 100644 --- a/wp-content/themes/CCV/dist/scripts/flatpickr/trigger.js +++ b/wp-content/themes/CCV/dist/scripts/flatpickr/trigger.js @@ -7,7 +7,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -throw new Error("Module build failed (from ./node_modules/babel-loader/lib/index.js):\nError: error:0308010C:digital envelope routines::unsupported\n at new Hash (node:internal/crypto/hash:71:19)\n at Object.createHash (node:crypto:133:10)\n at filename (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:94:23)\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:122:39\n at Generator.next ()\n at asyncGeneratorStep (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:3:103)\n at _next (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:5:194)\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:5:364\n at new Promise ()\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:5:97\n at handleCache (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:161:18)\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:216:18\n at Generator.next ()\n at asyncGeneratorStep (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:3:103)\n at _next (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:5:194)\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:5:364\n at new Promise ()\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:5:97\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:220:18\n at Object. (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:180:24)\n at Generator.next ()\n at asyncGeneratorStep (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:3:103)\n at _next (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:5:194)\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:5:364\n at new Promise ()\n at Object. (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:5:97)\n at Object.loader (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:60:18)\n at Object. (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:55:12)"); +throw new Error("Module build failed (from ./node_modules/babel-loader/lib/index.js):\nError: error:0308010C:digital envelope routines::unsupported\n at new Hash (node:internal/crypto/hash:71:19)\n at Object.createHash (node:crypto:133:10)\n at filename (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:94:23)\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:122:39\n at Generator.next ()\n at asyncGeneratorStep (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:3:103)\n at _next (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:5:194)\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:5:364\n at new Promise ()\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:5:97\n at handleCache (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:161:18)\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:216:18\n at Generator.next ()\n at asyncGeneratorStep (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:3:103)\n at _next (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:5:194)\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:5:364\n at new Promise ()\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:5:97\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\cache.js:220:18\n at Object. (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:180:24)\n at Generator.next ()\n at asyncGeneratorStep (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:3:103)\n at _next (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:5:194)\n at D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:5:364\n at new Promise ()\n at Object. (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:5:97)\n at Object._loader (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:224:18)\n at Object.loader (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:60:18)\n at Object. (D:\\projets\\spinepro\\wp-content\\themes\\CCV\\node_modules\\babel-loader\\lib\\index.js:55:12)"); /***/ }), @@ -71,5 +71,5 @@ module.exports = __webpack_require__(/*! D:\projets\spinepro\wp-content\themes\C /***/ }) -},[[0,"/scripts/manifest"]]]); +},[[0,"/scripts/manifest","/scripts/vendor"]]]); //# sourceMappingURL=trigger.js.map \ No newline at end of file diff --git a/wp-content/themes/CCV/dist/scripts/vendor.js b/wp-content/themes/CCV/dist/scripts/vendor.js index 5328b8e2..21c10f5f 100644 --- a/wp-content/themes/CCV/dist/scripts/vendor.js +++ b/wp-content/themes/CCV/dist/scripts/vendor.js @@ -589,5 +589,5 @@ module.exports = __webpack_require__(/*! mmenu-light */"./node_modules/mmenu-lig /***/ }) -},[[10,"/scripts/manifest"]]]); +}]); //# sourceMappingURL=vendor.js.map \ No newline at end of file diff --git a/wp-content/themes/CCV/dist/styles/app.css b/wp-content/themes/CCV/dist/styles/app.css index a07e9471..cc8c51dc 100644 --- a/wp-content/themes/CCV/dist/styles/app.css +++ b/wp-content/themes/CCV/dist/styles/app.css @@ -1169,6 +1169,10 @@ body { padding: 0; } +.swiper-container { + overflow-x: hidden; +} + .elementor-widget-wrap { height: 100%; align-content: center; @@ -2176,11 +2180,11 @@ h4, } #mobile-menu .menu-item:hover { - color: #FF078B; + color: #1D7AEA; } #mobile-menu .menu-item:hover:before { - border-color: #FF078B; + border-color: #FFBF29; } #mobile-menu .menu-item:after { @@ -2213,11 +2217,11 @@ h4, } #mobile-menu .cta-button:nth-of-type(odd) { - background-color: #FF078B; + background-color: #1D7AEA; } #mobile-menu .cta-button:nth-of-type(even) { - background-color: #2CC4CF; + background-color: #1D42BC; } #mobile-menu .cta-button:before, @@ -2249,10 +2253,11 @@ h4, } #mobile-menu .locales a:hover { - color: #FF078B; + color: #1D7AEA; } .mobile-menu-trigger { + color: #1D7AEA; position: fixed; width: 30px; height: 30px; @@ -2805,17 +2810,20 @@ h4, } .header-slideshow .header-slideshow-content { - color: #031236; + color: #FFF; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - background: rgba(255,255,255,0.88); + background: rgba(3,18,54,0.84); text-transform: none; - padding: 0.75em 1em; - margin-bottom: 0; + padding: 3.75em 2em 0.75em 3.9em; + margin: 0 !important; z-index: 10; position: absolute; bottom: 9.2vw; - left: 6.4vw; + left: 0; + top: 0; + width: 50%; + height: 100%; font-size: 2.1875vw; } @@ -2835,7 +2843,6 @@ h4, .header-slideshow .header-slideshow-content { font-size: 42px; font-size: 1.909090909090909rem; - left: 126px; } } @@ -2848,37 +2855,61 @@ h4, @media only screen and (max-width: 599px) { .header-slideshow .header-slideshow-content { font-size: 3.75vw; + padding: 0.75em 1em; } } .header-slideshow .header-slideshow-content:before { - top: 1.2em; - left: -0.6em; + content: none; +} + +.elementor-editor-active .header-slideshow .header-slideshow-content, +.elementor-editor-preview .header-slideshow .header-slideshow-content { + visibility: visible; +} + +.header-slideshow-title { + display: block; + font-size: 1em; + margin-bottom: 1em; + position: relative; +} + +@media only screen and (max-width: 599px) { + .header-slideshow-title { + padding-left: 20px; + } +} + +.header-slideshow-title:before { + content: ''; + top: 0.5em; + left: -17px; width: 1.2em; height: 5px; + position: absolute; + transform: translateX(-100%); + background-color: #FFBF29; } @media only screen and (max-width: 1199px) { - .header-slideshow .header-slideshow-content:before { + .header-slideshow-title:before { height: 4px; } } @media only screen and (max-width: 899px) { - .header-slideshow .header-slideshow-content:before { + .header-slideshow-title:before { height: 3px; } } -.elementor-editor-active .header-slideshow .header-slideshow-content, -.elementor-editor-preview .header-slideshow .header-slideshow-content { - visibility: visible; -} - -.header-slideshow-title { - display: block; - font-size: 1em; - margin-bottom: 0.5em; +@media only screen and (max-width: 599px) { + .header-slideshow-title:before { + width: 1em; + left: 0; + transform: none; + } } .header-slideshow-body { @@ -2886,6 +2917,26 @@ h4, white-space: pre-line; } +.header-slideshow-buttons { + margin-top: 57px; + flex-wrap: wrap; + gap: 17px; +} + +.header-slideshow-buttons .btn { + padding: 1em 1.8em; +} + +.header-slideshow-buttons .btn img { + margin-right: 0.9rem; +} + +@media only screen and (max-width: 1199px) { + .header-slideshow-buttons { + margin-top: 37px; + } +} + .elementor-widget-image-box .elementor-image-box-wrapper { text-align: left; } diff --git a/wp-content/themes/CCV/resources/assets/images/logo_footer.svg b/wp-content/themes/CCV/resources/assets/images/logo_footer.svg new file mode 100644 index 00000000..f86cdb4c --- /dev/null +++ b/wp-content/themes/CCV/resources/assets/images/logo_footer.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wp-content/themes/CCV/resources/assets/styles/common/global.styl b/wp-content/themes/CCV/resources/assets/styles/common/global.styl index 105f857d..0ea63396 100644 --- a/wp-content/themes/CCV/resources/assets/styles/common/global.styl +++ b/wp-content/themes/CCV/resources/assets/styles/common/global.styl @@ -28,3 +28,6 @@ body .elementor-column-gap-default>.elementor-column>.elementor-element-populated padding: 0 + +.swiper-container + overflow-x: hidden diff --git a/wp-content/themes/CCV/resources/assets/styles/components/mmenu.styl b/wp-content/themes/CCV/resources/assets/styles/components/mmenu.styl index c9be6962..74d8d263 100644 --- a/wp-content/themes/CCV/resources/assets/styles/components/mmenu.styl +++ b/wp-content/themes/CCV/resources/assets/styles/components/mmenu.styl @@ -38,10 +38,10 @@ $menu-header-height = 90px @apply bg-purple-dark text-white font-display uppercase &:hover - @apply text-pink + @apply text-blue &:before // Submenu arrow - @apply border-pink + @apply border-yellow // Menu item divider &:after @@ -71,9 +71,9 @@ $menu-header-height = 90px margin-top: 1em &:nth-of-type(odd) - @apply bg-pink + @apply bg-blue &:nth-of-type(even) - @apply bg-teal + @apply bg-darkblue &:before, &:after display: none @@ -94,13 +94,14 @@ $menu-header-height = 90px margin-right: 1.125em &:hover - @apply text-pink + @apply text-blue //================== // Burger menu icon + animation .mobile-menu-trigger + @apply text-blue position: fixed width: 30px height: @width diff --git a/wp-content/themes/CCV/resources/assets/styles/widgets/header-slideshow.styl b/wp-content/themes/CCV/resources/assets/styles/widgets/header-slideshow.styl index 405fea21..6e54926b 100644 --- a/wp-content/themes/CCV/resources/assets/styles/widgets/header-slideshow.styl +++ b/wp-content/themes/CCV/resources/assets/styles/widgets/header-slideshow.styl @@ -1,5 +1,5 @@ $breakpoint-slideshow-images = 600px -$title_bg = rgba(#fff, 0.88) +$title_bg = rgba(#031236, 0.84) .header-slideshow position: relative @@ -79,40 +79,33 @@ $title_bg = rgba(#fff, 0.88) &-content .header-slideshow & // Need some extra specificity to override H1 CSS - @apply text-purple-dark + @apply text-white font-smoothing() background: $title_bg text-transform: none - padding: 0.75em 1em - margin-bottom: 0 + padding: 3.75em 2em .75em 3.9em + margin: 0 !important z-index: 10 position: absolute constrain(bottom, 9.2vw) - left: 6.4vw // Not using constrain because this shouldn't be capped on lower limits + left: 0 // Not using constrain because this shouldn't be capped on lower limits + top: 0 + width: 50% + height: 100% font-size: 2.1875vw // 42px in vw based on 1920px width +above($content-max-width) font-size: 42px // Base font size - left: 126px // From mockup +below($breakpoint-slideshow) bottom: 4em +below($breakpoint-slideshow-images) font-size: 3.75vw + padding: 0.75em 1em - - // Pink dash &:before - top: 1.2em - left: -0.6em - width: 1.2em - height: 5px - - +below(1200px) - height: 4px - +below(900px) - height: 3px + content: none .elementor-editor-active &, .elementor-editor-preview & visibility: visible // Animation doesn't trigger in the editor for some reason so just show it @@ -120,8 +113,44 @@ $title_bg = rgba(#fff, 0.88) &-title display: block font-size: 1em // Inherits from parent element so both bits of text can be scaled together - margin-bottom: 0.5em + margin-bottom: 1em + position relative + + +below(600px) + padding-left: 20px + + // Pink dash + &:before + content: '' + top: .5em; + left: -17px; + width: 1.2em + height: 5px + position: absolute; + transform: translateX(-100%); + @apply bg-yellow + + +below(1200px) + height: 4px + +below(900px) + height: 3px + +below(600px) + width: 1em + left: 0 + transform: none &-body font-size: 1.333em white-space: pre-line + + &-buttons + margin-top 57px + flex-wrap: wrap + gap: 17px + .btn + padding: 1em 1.8em + img + margin-right: .9rem + + +below(1200px) + margin-top 37px -- 2.39.5