From 79ffa5df0c13e928928f6187872fa05c4250dce5 Mon Sep 17 00:00:00 2001 From: soufiane Date: Thu, 3 Jul 2025 15:12:32 +0200 Subject: [PATCH] wait #7626 @8:00 --- wp-content/themes/c6/app/setup.php | 4 +- .../c6/resources/assets/scripts/main.js | 2 + .../c6/resources/assets/scripts/navigation.js | 5 +-- .../assets/styles/common/global.styl | 11 +++-- .../components/navigation-offcanvas.styl | 22 +++++---- .../assets/styles/layouts/header.styl | 45 ++++++------------- .../assets/styles/widgets/feature-block.styl | 3 -- 7 files changed, 38 insertions(+), 54 deletions(-) diff --git a/wp-content/themes/c6/app/setup.php b/wp-content/themes/c6/app/setup.php index 7a45271..d5c2797 100644 --- a/wp-content/themes/c6/app/setup.php +++ b/wp-content/themes/c6/app/setup.php @@ -69,9 +69,9 @@ add_action('wp_enqueue_scripts', function () { // NOTE: 'elementor-frontend' and 'elementor-animations' are added as dependencies for the main stylesheet to // ensure that our stylesheet is always loaded afterwards, allowing us to override the default styles. // On 404 pages, this wasn't happening. - wp_enqueue_style('sage/main.css', asset_path('styles/main.css'), ['elementor-frontend', 'elementor-animations'], null); + wp_enqueue_style('sage/main.css', asset_path('styles/main.css'), ['elementor-frontend']); wp_enqueue_script('sage/main.js', asset_path('scripts/main.js'), ['jquery'], null, true); - wp_enqueue_script('sage/navigation.js', asset_path('scripts/navigation.js'), ['jquery'], null, true); + //wp_enqueue_script('sage/navigation.js', asset_path('scripts/navigation.js'), ['jquery'], false, null); if (is_single() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); diff --git a/wp-content/themes/c6/resources/assets/scripts/main.js b/wp-content/themes/c6/resources/assets/scripts/main.js index 4f35376..cad3818 100644 --- a/wp-content/themes/c6/resources/assets/scripts/main.js +++ b/wp-content/themes/c6/resources/assets/scripts/main.js @@ -10,6 +10,8 @@ import common from './routes/common'; import home from './routes/home'; import aboutUs from './routes/about'; +import './navigation' + /** Populate Router instance with DOM routes */ const routes = new Router({ // All pages diff --git a/wp-content/themes/c6/resources/assets/scripts/navigation.js b/wp-content/themes/c6/resources/assets/scripts/navigation.js index 3e3a1ea..fe9999f 100644 --- a/wp-content/themes/c6/resources/assets/scripts/navigation.js +++ b/wp-content/themes/c6/resources/assets/scripts/navigation.js @@ -10,8 +10,7 @@ jQuery(document).ready(function($){ scrollDelta = 10, scrollOffset = 500; - $(window).on('scroll', function(){ - + $(window).on('scroll', function(e){ if( !scrolling ) { scrolling = true; mainHeader.addClass('scrolling'); @@ -39,4 +38,4 @@ jQuery(document).ready(function($){ previousTop = currentTop; scrolling = false; } -}); \ No newline at end of file +}); diff --git a/wp-content/themes/c6/resources/assets/styles/common/global.styl b/wp-content/themes/c6/resources/assets/styles/common/global.styl index 7d65771..4c4ae89 100644 --- a/wp-content/themes/c6/resources/assets/styles/common/global.styl +++ b/wp-content/themes/c6/resources/assets/styles/common/global.styl @@ -64,7 +64,7 @@ $divider-height = 5vw $section-vertical-padding = 7.5vw // Must be vw or % units $max-bottom-padding = unit($section-vertical-padding / 100, '') * $content-max-width // Get the constrained padding amount -.elementor-section-wrap > .elementor-section +.elementor > .elementor-section vertical-spacing($section-vertical-padding) // Only apply extra padding if there is a shape divider on the section @@ -82,8 +82,8 @@ $max-bottom-padding = unit($section-vertical-padding / 100, '') * $content-max-w constrain(margin-bottom, $vertical-gutter) // Set margin bottom to standard gutter // Get rid of default 10px padding around elements -.elementor-column-gap-default > .elementor-row > .elementor-column > .elementor-element-populated - padding: 0 +.elementor-column-gap-default > .elementor-column > .elementor-element-populated + padding: 0 !important .elementor-column-gap-wide > .elementor-row > .elementor-column > .elementor-element-populated +below(450px) @@ -142,3 +142,8 @@ $translateDistance = -2.32em // Width of arrow (1.32em) + margin from text (1em) polygon, path fill: currentColor + +.elementor-widget-image-box .elementor-image-box-description { + font-size: 16px + max-width: 325px +} diff --git a/wp-content/themes/c6/resources/assets/styles/components/navigation-offcanvas.styl b/wp-content/themes/c6/resources/assets/styles/components/navigation-offcanvas.styl index 74848a3..163fc4c 100644 --- a/wp-content/themes/c6/resources/assets/styles/components/navigation-offcanvas.styl +++ b/wp-content/themes/c6/resources/assets/styles/components/navigation-offcanvas.styl @@ -1,3 +1,5 @@ +$sidebar-width = 260px + #offcanvas-menu background-color: #000 color: #fff @@ -6,16 +8,16 @@ top: 0 height: 100% z-index: 999999 - width: $offcanvas-menu-width + width: $sidebar-width overflow-x: hidden overflow-y: auto &.right left: auto - right: - $offcanvas-menu-width + right: - $sidebar-width &.left - left: - $offcanvas-menu-width + left: - $sidebar-width right: auto .header-logo @@ -42,15 +44,11 @@ // Otherwise the gap above the submenu looks a bit too big margin-top: -0.25em - ul - a // Second level links - padding-left: 40px - color: #bbb - font-weight: normal - text-transform: none - ul - a - padding-left: 70px + ul a // Second level links + padding-left: 40px + color: #bbb + font-weight: normal + text-transform: none a font-smoothing() diff --git a/wp-content/themes/c6/resources/assets/styles/layouts/header.styl b/wp-content/themes/c6/resources/assets/styles/layouts/header.styl index 55b4495..4f98a93 100644 --- a/wp-content/themes/c6/resources/assets/styles/layouts/header.styl +++ b/wp-content/themes/c6/resources/assets/styles/layouts/header.styl @@ -6,10 +6,16 @@ // padding-top: 65px header.site - position: relative z-index: 10 min-width: 320px font-size: 16px + position: fixed !important + top: 0 + left: 0 + width: 100% + transform: translateZ(0) + will-change: transform + transition: all .5s ease // Disable the header when editing with Elementor so it // doesn't block the home hero blcok section controls @@ -34,30 +40,24 @@ header.site // Hero block header overrides .hero-header &, .home & // Also applied for home since .hero-header class seems to be added to body too late for Elementor editor + position: absolute width: 100% color: #fff .inner background-color: transparent + .menu-icon + fill: #fff + // Main logo .header-logo flex: 0 1 auto padding-right: 50px // Ensure some breathing space between logo and burger menu icon - transition: opacity 0.3s ease-out &-svg max-width: 84px height: auto - // When the menu is open, the logo doesn't move because it is fixed position - // So we hide it... - .offcanvas-menu-open & - opacity: 0 - transition: none - - #offcanvas-menu & - opacity: 1 - .locales flex: 0 1 auto @@ -81,6 +81,7 @@ header.site height: 0.6em // Needed for IE 11 overflow: hidden // Also needed for IE 11 + path stroke: currentColor @@ -126,23 +127,5 @@ header.site display: block .menu-icon - height: 52px - width: 52px - fill: currentColor - -header.site - position: fixed - top: 0 - left: 0 - width: 100% - transform: translateZ(0) - will-change: transform - transition: all .5s ease - -header.site.is-hidden - transform: translateY(-100%) - -header.site.scrolling - background: white - color: #000 - transition: all .5s ease \ No newline at end of file + width: r(60px) + height: @width diff --git a/wp-content/themes/c6/resources/assets/styles/widgets/feature-block.styl b/wp-content/themes/c6/resources/assets/styles/widgets/feature-block.styl index cbc7726..6c19284 100644 --- a/wp-content/themes/c6/resources/assets/styles/widgets/feature-block.styl +++ b/wp-content/themes/c6/resources/assets/styles/widgets/feature-block.styl @@ -44,9 +44,6 @@ $breakpoint-circles = 1200px // Below this, circles aren't shown because content text-align: center border-radius: 4px - +below($breakpoint-columns) - border-radius: 0 - // Make a circle within the square wrapper .feature-block-circle & +above($breakpoint-circles) -- 2.39.5