From c3795a70897972d30713ea99567b5030a057a1d9 Mon Sep 17 00:00:00 2001 From: soufiane Date: Thu, 10 Oct 2024 18:06:51 +0200 Subject: [PATCH] wait #7070 @1:00 --- wp-content/themes/CCV/dist/images/calendar.svg | 2 +- wp-content/themes/CCV/dist/styles/app.css | 16 +++++++++------- .../CCV/resources/assets/images/calendar.svg | 2 +- .../assets/scripts/header-slideshow.js | 17 +++++++++++++++++ .../assets/styles/widgets/header-slideshow.styl | 10 +++++----- 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/wp-content/themes/CCV/dist/images/calendar.svg b/wp-content/themes/CCV/dist/images/calendar.svg index dbdbf429..8bac9411 100644 --- a/wp-content/themes/CCV/dist/images/calendar.svg +++ b/wp-content/themes/CCV/dist/images/calendar.svg @@ -1,5 +1,5 @@ - + diff --git a/wp-content/themes/CCV/dist/styles/app.css b/wp-content/themes/CCV/dist/styles/app.css index 447d6409..ddec2a14 100644 --- a/wp-content/themes/CCV/dist/styles/app.css +++ b/wp-content/themes/CCV/dist/styles/app.css @@ -2930,11 +2930,6 @@ h4, opacity: 1; } -.header-slideshow .header-slideshow-content.showing .header-slideshow-title, -.header-slideshow .header-slideshow-content.showing .header-slideshow-body { - opacity: 1; -} - .header-slideshow .header-slideshow-content:before { content: none; } @@ -2974,9 +2969,16 @@ h4, } .header-slideshow-title, -.header-slideshow-body { +.header-slideshow-body p, +.header-slideshow-body li { opacity: 0; - transition: opacity 1s; + transition: opacity 1.5s; +} + +.header-slideshow-title.showing, +.header-slideshow-body p.showing, +.header-slideshow-body li.showing { + opacity: 1; } .header-slideshow-title { diff --git a/wp-content/themes/CCV/resources/assets/images/calendar.svg b/wp-content/themes/CCV/resources/assets/images/calendar.svg index dbdbf429..8bac9411 100644 --- a/wp-content/themes/CCV/resources/assets/images/calendar.svg +++ b/wp-content/themes/CCV/resources/assets/images/calendar.svg @@ -1,5 +1,5 @@ - + diff --git a/wp-content/themes/CCV/resources/assets/scripts/header-slideshow.js b/wp-content/themes/CCV/resources/assets/scripts/header-slideshow.js index ccb9642d..41b3c1a1 100644 --- a/wp-content/themes/CCV/resources/assets/scripts/header-slideshow.js +++ b/wp-content/themes/CCV/resources/assets/scripts/header-slideshow.js @@ -34,6 +34,9 @@ import debounce from 'lodash.debounce'; let index = $(this).data('slide') showSlide(index); }); + setTimeout(function() { + revealText(slidesText) + }, 1000) } function showSlide(index) { @@ -42,11 +45,14 @@ import debounce from 'lodash.debounce'; currentSlide = (index + slides.length) % slides.length; addBySlides(slides) addBySlides(slidesText) + revealText(slidesText) } function removeBySlide(slides) { $(slides[currentSlide]).removeClass('showing'); $scope.find(`[data-slide="${currentSlide}"]`).removeClass('active'); + + $(slides[currentSlide]).find(".header-slideshow-title, .header-slideshow-body p,.header-slideshow-body li").removeClass("showing") } function addBySlides(slides) { @@ -61,7 +67,18 @@ import debounce from 'lodash.debounce'; showSlide(currentSlide - 1); } + function revealText(slides) { + let delay = 200 + $(slides[currentSlide]).find(".header-slideshow-title").addClass('showing') + $(slides[currentSlide]).find(".header-slideshow-body p,.header-slideshow-body li").each(function(i, el) { + + window.setTimeout(function(){ + $(el).addClass("showing") + }, delay) + delay += 200 + }) + } }); }); 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 a897aea3..70551dc0 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 @@ -99,9 +99,6 @@ $title_bg = rgba(#031236, 0.84) &.showing z-index: 10 opacity: 1 - .header-slideshow-title, - .header-slideshow-body - opacity: 1 &:before content: none @@ -127,9 +124,12 @@ $title_bg = rgba(#031236, 0.84) visibility: visible // Animation doesn't trigger in the editor for some reason so just show it &-title, - &-body + &-body p, + &-body li opacity: 0 - transition: opacity 1s + transition: opacity 1.5s + &.showing + opacity: 1 &-title display: block -- 2.39.5