effet vertical
This commit is contained in:
parent
184eefaed2
commit
848e295c17
|
@ -2112,15 +2112,7 @@ class common {
|
||||||
public function showScript() {
|
public function showScript() {
|
||||||
// Lexique
|
// Lexique
|
||||||
include('./core/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_core.php');
|
include('./core/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_core.php');
|
||||||
?><script>
|
?><script>var textUpdating = <?php echo '"'.$text['core_js'][0].'"'; ?>; var textSelectFile = <?php echo '"'.$text['core_js'][1].'"'; ?>; var textLogout = <?php echo '"'.$text['core_js'][2].'"'; ?>; var textCheckMail = <?php echo '"'.$text['core_js'][3].'"'; ?>; var textPageDelete = <?php echo '"'.$text['core_js'][4].'"'; ?>; var textConfirmYes = <?php echo '"'.$text['core_js'][5].'"'; ?>; var textConfirmNo = <?php echo '"'.$text['core_js'][6].'"'; ?>; </script><?php
|
||||||
var textUpdating = <?php echo '"'.$text['core_js'][0].'"'; ?>;
|
|
||||||
var textSelectFile = <?php echo '"'.$text['core_js'][1].'"'; ?>;
|
|
||||||
var textLogout = <?php echo '"'.$text['core_js'][2].'"'; ?>;
|
|
||||||
var textCheckMail = <?php echo '"'.$text['core_js'][3].'"'; ?>;
|
|
||||||
var textPageDelete = <?php echo '"'.$text['core_js'][4].'"'; ?>;
|
|
||||||
var textConfirmYes = <?php echo '"'.$text['core_js'][5].'"'; ?>;
|
|
||||||
var textConfirmNo = <?php echo '"'.$text['core_js'][6].'"'; ?>;
|
|
||||||
</script><?php
|
|
||||||
ob_start();
|
ob_start();
|
||||||
require 'core/core.js.php';
|
require 'core/core.js.php';
|
||||||
$coreScript = ob_get_clean();
|
$coreScript = ob_get_clean();
|
||||||
|
|
|
@ -440,6 +440,9 @@ class theme extends common {
|
||||||
// Bannière animée avec swiper
|
// Bannière animée avec swiper
|
||||||
if( $this->getInput('themeHeaderFeature') === 'swiper' ){
|
if( $this->getInput('themeHeaderFeature') === 'swiper' ){
|
||||||
$swiperContent = $this->swiperContent('header');
|
$swiperContent = $this->swiperContent('header');
|
||||||
|
$headerHeight = 'unset';
|
||||||
|
} else {
|
||||||
|
$headerHeight = $this->getInput('themeHeaderHeight');
|
||||||
}
|
}
|
||||||
// $featureContent = str_replace(helper::baseUrl(false,false), './', $featureContent);
|
// $featureContent = str_replace(helper::baseUrl(false,false), './', $featureContent);
|
||||||
// Si une image est positionnée, l'arrière en transparent.
|
// Si une image est positionnée, l'arrière en transparent.
|
||||||
|
@ -448,7 +451,7 @@ class theme extends common {
|
||||||
'font' => $this->getInput('themeHeaderFont'),
|
'font' => $this->getInput('themeHeaderFont'),
|
||||||
'fontSize' => $this->getInput('themeHeaderFontSize'),
|
'fontSize' => $this->getInput('themeHeaderFontSize'),
|
||||||
'fontWeight' => $this->getInput('themeHeaderFontWeight'),
|
'fontWeight' => $this->getInput('themeHeaderFontWeight'),
|
||||||
'heightSelect' => $this->getInput('themeHeaderHeight'),
|
'heightSelect' => $headerHeight,
|
||||||
'wide' => $this->getInput('themeHeaderWide'),
|
'wide' => $this->getInput('themeHeaderWide'),
|
||||||
'image' => $this->getInput('themeHeaderImage'),
|
'image' => $this->getInput('themeHeaderImage'),
|
||||||
'imagePosition' => $this->getInput('themeHeaderImagePosition'),
|
'imagePosition' => $this->getInput('themeHeaderImagePosition'),
|
||||||
|
@ -965,42 +968,9 @@ class theme extends common {
|
||||||
// Adaptation du css au client pour l'option de défilement vertical
|
// Adaptation du css au client pour l'option de défilement vertical
|
||||||
if( $effect === 'vertical'){
|
if( $effect === 'vertical'){
|
||||||
$size = getimagesize($imageFile[0]);
|
$size = getimagesize($imageFile[0]);
|
||||||
$swiperContent .= '<script>
|
$swiperContent .= '<script>var verticalBannerHeightImg = '. $size[1]. '; var verticalBannerWidthImg = '.$size[0]. '; var verticalBannerWidthSite = "'. $this->getData(['theme', 'site', 'width' ]).'"; </script>';
|
||||||
$.wrapper = function(){
|
$swiperContent .= '<script src="'.helper::baseUrl(false).'core/vendor/swiper/swiperEffectVertical.js"></script>';
|
||||||
var heightImg = '. $size[1] . ',
|
}
|
||||||
widthImg = '. $size[0] .',
|
|
||||||
heightMod ,
|
|
||||||
widthMod,
|
|
||||||
widthSiteInt,
|
|
||||||
wclient,
|
|
||||||
widthSite;
|
|
||||||
widthSite = "'. $this->getData(['theme', 'site', 'width' ]) . '";
|
|
||||||
wclient = document.body.clientWidth;
|
|
||||||
switch ( widthSite )
|
|
||||||
{
|
|
||||||
case "750px":
|
|
||||||
widthMod = 750;
|
|
||||||
break;
|
|
||||||
case "960px":
|
|
||||||
widthMod = 960;
|
|
||||||
break;
|
|
||||||
case "1170px":
|
|
||||||
widthMod = 1170;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
widthMod = wclient;
|
|
||||||
}
|
|
||||||
if( wclient < widthMod) widthMod = wclient;
|
|
||||||
heightMod = heightImg * ( widthMod / widthImg );
|
|
||||||
$("#headerSwiper .swiper-wrapper").css("width", widthMod);
|
|
||||||
$("#headerSwiper .swiper-wrapper").css("height", heightMod);
|
|
||||||
}
|
|
||||||
$.wrapper();
|
|
||||||
$(window).resize(function(){
|
|
||||||
$.wrapper();
|
|
||||||
});
|
|
||||||
</script>';
|
|
||||||
}
|
|
||||||
$swiperContent .= '<div id="headerSwiper"><div class="swiper mySwiper"><div class="swiper-wrapper">';
|
$swiperContent .= '<div id="headerSwiper"><div class="swiper mySwiper"><div class="swiper-wrapper">';
|
||||||
foreach($imageFile as $value ) {
|
foreach($imageFile as $value ) {
|
||||||
$swiperContent .= '<div class="swiper-slide"><img src="'.$value.'" /></div>';
|
$swiperContent .= '<div class="swiper-slide"><img src="'.$value.'" /></div>';
|
||||||
|
|
|
@ -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();
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue