textAlign Manquant + jquery en cours

This commit is contained in:
Fred Tempez 2021-11-11 15:54:57 +01:00
parent ac3f74581e
commit 4572612051
3 changed files with 65 additions and 59 deletions

View File

@ -58,27 +58,29 @@
<?php endif; ?> <?php endif; ?>
<!-- Bannière dans le fond du site --> <!-- Bannière dans le fond du site -->
<?php if($this->getData(['theme', 'header', 'position']) === 'body'): ?> <?php if($this->getData(['theme', 'header', 'position']) === 'body'): ?>
<header <?php if($this->getData(['theme', 'header', 'tinyHidden']) === true): ?>class="bannerDisplay"<?php endif;?>> <?php
<?php ?> $headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : ' ';
<?php echo ($this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?> $headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : ' ';
<div id="headerContainer" class="container"> $headerClass .= $this->getData(['theme', 'header', 'container']);
<?php if ($this->getData(['theme','header','feature']) === 'wallpaper' ): ?> ?>
<?php if( <header class="<?php echo $headerClass;?>">
$this->getData(['theme', 'header', 'textHide']) === false <?php echo ($this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
// Affiche toujours le titre de la bannière pour l'édition du thème <?php if ($this->getData(['theme','header','feature']) === 'wallpaper' ): ?>
OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header') <?php if(
): ?> $this->getData(['theme', 'header', 'textHide']) === false
<span class="notranslate" id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span> // Affiche toujours le titre de la bannière pour l'édition du thème
<?php else: ?> OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header')
<span id="themeHeaderTitle">&nbsp;</span> ): ?>
<?php endif; ?> <span class="notranslate" id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
<?php else: ?> <?php else: ?>
<div id="featureContent"> <span id="themeHeaderTitle">&nbsp;</span>
<?php echo $this->getData(['theme','header','featureContent']);?> <?php endif; ?>
</div> <?php else: ?>
<?php endif; ?> <div id="featureContent">
</div> <!--fin container --> <?php echo $this->getData(['theme','header','featureContent']);?>
</div>
<?php endif; ?>
</header> </header>
<?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '</a>' : ''; ?> <?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '</a>' : ''; ?>
<?php endif; ?> <?php endif; ?>
@ -118,23 +120,21 @@
<!-- Bannière dans le site --> <!-- Bannière dans le site -->
<?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?> <?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
<header class="<?php echo $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : ($this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay' : ''); ?>"> <header class="<?php echo $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : ($this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay' : ''); ?>">
<div id="headerContainer" class="container"> <?php if ($this->getData(['theme','header','feature']) === 'wallpaper' ): ?>
<?php if ($this->getData(['theme','header','feature']) === 'wallpaper' ): ?> <?php if(
<?php if( $this->getData(['theme', 'header', 'textHide']) === false
$this->getData(['theme', 'header', 'textHide']) === false // Affiche toujours le titre de la bannière pour l'édition du thème
// Affiche toujours le titre de la bannière pour l'édition du thème OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header')
OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header') ): ?>
): ?> <span class="notranslate" id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
<span class="notranslate" id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
<?php else: ?>
<span id="themeHeaderTitle">&nbsp;</span>
<?php endif; ?>
<?php else: ?> <?php else: ?>
<div id="featureContent"> <span id="themeHeaderTitle">&nbsp;</span>
<?php echo $this->getData(['theme','header','featureContent']);?>
</diV>
<?php endif; ?> <?php endif; ?>
</div> <!--fin container --> <?php else: ?>
<div id="featureContent">
<?php echo $this->getData(['theme','header','featureContent']);?>
</diV>
<?php endif; ?>
</header> </header>
<?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '</a>' : ''; ?> <?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '</a>' : ''; ?>
<?php endif; ?> <?php endif; ?>

View File

@ -21,19 +21,16 @@
* Aperçu en direct * Aperçu en direct
*/ */
$("input, select").on("change", function() { $("input, select").on("change", function() {
var css = "";
// Contenu perso // Contenu perso
if ($("#themeHeaderFeature").val() == "feature") { if ($("#themeHeaderFeature").val() == "feature") {
css += "header{height:" + $("#themeHeaderHeight").val() + ";}"; css = "header{height:" + $("#themeHeaderHeight").val() + ";line-height:1.3;background-color:'';background-image:'none'!important;}";
$("#featureContent").appendTo("#headerContainer").show(); $("#featureContent").append("header").show();
$("#themeHeaderTitle").hide(); $("#themeHeaderTitle").hide();
//$("header").css("background-color", ""); $("header").css("background-image", "none");
//$("header").css("background-image", "none"); $("header").css("background-color", "");
$("header").removeAttr("style");
//$("header").css("line-height", "1.5");
//$("header").css("text-align", "");
} }
// Couleurs, image, alignement et hauteur de la bannière // Couleurs, image, alignement et hauteur de la bannière

View File

@ -32,12 +32,7 @@
'selected' => $this->getData(['theme', 'header', 'feature']) 'selected' => $this->getData(['theme', 'header', 'feature'])
]); ?> ]); ?>
</div> </div>
<div class="col4">
<?php echo template::select('themeHeaderPosition', $module::$headerPositions, [
'label' => 'Position',
'selected' => $this->getData(['theme', 'header', 'position'])
]); ?>
</div>
<div class="col4"> <div class="col4">
<?php echo template::select('themeHeaderHeight', $module::$headerHeights, [ <?php echo template::select('themeHeaderHeight', $module::$headerHeights, [
'label' => 'Hauteur maximale', 'label' => 'Hauteur maximale',
@ -45,14 +40,14 @@
'help' => 'La hauteur maximale est de 600 pixels, même si les dimensions de l\'image sélectionnée sont supérieures. <br />Lorsque l\'adaptation est positionnée sur Responsive, la hauteur diminue proportionnellement à la largeur.' 'help' => 'La hauteur maximale est de 600 pixels, même si les dimensions de l\'image sélectionnée sont supérieures. <br />Lorsque l\'adaptation est positionnée sur Responsive, la hauteur diminue proportionnellement à la largeur.'
]); ?> ]); ?>
</div> </div>
</div>
<div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('themeHeaderContainer', $module::$containers, [ <?php echo template::select('themeHeaderPosition', $module::$headerPositions, [
'label' => 'Largeur', 'label' => 'Position',
'selected' => $this->getData(['theme', 'header', 'container']) 'selected' => $this->getData(['theme', 'header', 'position'])
]); ?> ]); ?>
</div> </div>
</div>
<div class="row">
<div class="col4"> <div class="col4">
<div id="themeHeaderSmallDisplay" class="displayNone"> <div id="themeHeaderSmallDisplay" class="displayNone">
<?php echo template::checkbox('themeHeaderTinyHidden', true, 'Masquer la bannière en écran réduit', [ <?php echo template::checkbox('themeHeaderTinyHidden', true, 'Masquer la bannière en écran réduit', [
@ -67,6 +62,12 @@
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="col4">
<?php echo template::select('themeHeaderContainer', $module::$containers, [
'label' => 'Largeur',
'selected' => $this->getData(['theme', 'header', 'container'])
]); ?>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -101,32 +102,40 @@
<div class="block"> <div class="block">
<h4>Mise en forme du titre</h4> <h4>Mise en forme du titre</h4>
<div class="row"> <div class="row">
<div class="col3"> <div class="col4">
<?php echo template::select('themeHeaderFont', $module::$fonts, [ <?php echo template::select('themeHeaderFont', $module::$fonts, [
'label' => 'Police', 'label' => 'Police',
'selected' => $this->getData(['theme', 'header', 'font']), 'selected' => $this->getData(['theme', 'header', 'font']),
'fonts' => true 'fonts' => true
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col4">
<?php echo template::select('themeHeaderFontSize', $module::$headerFontSizes, [ <?php echo template::select('themeHeaderFontSize', $module::$headerFontSizes, [
'label' => 'Taille', 'label' => 'Taille',
'help' => 'Proportionnelle à celle définie dans le site.', 'help' => 'Proportionnelle à celle définie dans le site.',
'selected' => $this->getData(['theme', 'header', 'fontSize']) 'selected' => $this->getData(['theme', 'header', 'fontSize'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col4">
<?php echo template::select('themeHeaderFontWeight', $module::$fontWeights, [ <?php echo template::select('themeHeaderFontWeight', $module::$fontWeights, [
'label' => 'Style', 'label' => 'Style',
'selected' => $this->getData(['theme', 'header', 'fontWeight']) 'selected' => $this->getData(['theme', 'header', 'fontWeight'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> </div>
<div class="row">
<div class="col4 offset2">
<?php echo template::select('themeHeaderTextTransform', $module::$textTransforms, [ <?php echo template::select('themeHeaderTextTransform', $module::$textTransforms, [
'label' => 'Casse', 'label' => 'Casse',
'selected' => $this->getData(['theme', 'header', 'textTransform']) 'selected' => $this->getData(['theme', 'header', 'textTransform'])
]); ?> ]); ?>
</div> </div>
<div class="col4">
<?php echo template::select('themeHeaderTextAlign', $module::$aligns, [
'label' => 'Alignement du contenu',
'selected' => $this->getData(['theme', 'header', 'textAlign'])
]); ?>
</div>
</div> </div>
</div> </div>
</div> </div>