diff --git a/core/core.php b/core/core.php index bc51b31..cd81aac 100644 --- a/core/core.php +++ b/core/core.php @@ -2112,15 +2112,7 @@ class common { public function showScript() { // Lexique include('./core/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_core.php'); - ?>getInput('themeHeaderFeature') === 'swiper' ){ $swiperContent = $this->swiperContent('header'); + $headerHeight = 'unset'; + } else { + $headerHeight = $this->getInput('themeHeaderHeight'); } // $featureContent = str_replace(helper::baseUrl(false,false), './', $featureContent); // Si une image est positionnée, l'arrière en transparent. @@ -448,7 +451,7 @@ class theme extends common { 'font' => $this->getInput('themeHeaderFont'), 'fontSize' => $this->getInput('themeHeaderFontSize'), 'fontWeight' => $this->getInput('themeHeaderFontWeight'), - 'heightSelect' => $this->getInput('themeHeaderHeight'), + 'heightSelect' => $headerHeight, 'wide' => $this->getInput('themeHeaderWide'), 'image' => $this->getInput('themeHeaderImage'), 'imagePosition' => $this->getInput('themeHeaderImagePosition'), @@ -965,42 +968,9 @@ class theme extends common { // Adaptation du css au client pour l'option de défilement vertical if( $effect === 'vertical'){ $size = getimagesize($imageFile[0]); - $swiperContent .= ''; - } + $swiperContent .= ''; + $swiperContent .= ''; + } $swiperContent .= '
'; foreach($imageFile as $value ) { $swiperContent .= '
'; diff --git a/core/vendor/swiper/swiperEffectVertical.js b/core/vendor/swiper/swiperEffectVertical.js new file mode 100644 index 0000000..a668f44 --- /dev/null +++ b/core/vendor/swiper/swiperEffectVertical.js @@ -0,0 +1,33 @@ +/* Script pour bannière animée avec effet de défilement vertical */ +/* Adapte la largeur et la hauteur des images de la bannière à la taille de la fenêtre client */ + +$(document).ready(function(){ + $.wrapper = function(){ + var heightMod , + widthMod, + wclient; + wclient = document.body.clientWidth; + switch ( verticalBannerWidthSite ) + { + case "750px": + widthMod = 750; + break; + case "960px": + widthMod = 960; + break; + case "1170px": + widthMod = 1170; + break; + default: + widthMod = wclient; + } + if( wclient < widthMod) widthMod = wclient; + heightMod = verticalBannerHeightImg * ( widthMod / verticalBannerWidthImg ); + $("#headerSwiper .swiper-wrapper").css("width", widthMod); + $("#headerSwiper .swiper-wrapper").css("height", heightMod); + } + $.wrapper(); + $(window).resize(function(){ + $.wrapper(); + }); +}); \ No newline at end of file