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

View File

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

View File

@ -32,12 +32,7 @@
'selected' => $this->getData(['theme', 'header', 'feature'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('themeHeaderPosition', $module::$headerPositions, [
'label' => 'Position',
'selected' => $this->getData(['theme', 'header', 'position'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('themeHeaderHeight', $module::$headerHeights, [
'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.'
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::select('themeHeaderContainer', $module::$containers, [
'label' => 'Largeur',
'selected' => $this->getData(['theme', 'header', 'container'])
<?php echo template::select('themeHeaderPosition', $module::$headerPositions, [
'label' => 'Position',
'selected' => $this->getData(['theme', 'header', 'position'])
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<div id="themeHeaderSmallDisplay" class="displayNone">
<?php echo template::checkbox('themeHeaderTinyHidden', true, 'Masquer la bannière en écran réduit', [
@ -67,6 +62,12 @@
]); ?>
</div>
</div>
<div class="col4">
<?php echo template::select('themeHeaderContainer', $module::$containers, [
'label' => 'Largeur',
'selected' => $this->getData(['theme', 'header', 'container'])
]); ?>
</div>
</div>
</div>
</div>
@ -101,32 +102,40 @@
<div class="block">
<h4>Mise en forme du titre</h4>
<div class="row">
<div class="col3">
<div class="col4">
<?php echo template::select('themeHeaderFont', $module::$fonts, [
'label' => 'Police',
'selected' => $this->getData(['theme', 'header', 'font']),
'fonts' => true
]); ?>
</div>
<div class="col3">
<div class="col4">
<?php echo template::select('themeHeaderFontSize', $module::$headerFontSizes, [
'label' => 'Taille',
'help' => 'Proportionnelle à celle définie dans le site.',
'selected' => $this->getData(['theme', 'header', 'fontSize'])
]); ?>
</div>
<div class="col3">
<div class="col4">
<?php echo template::select('themeHeaderFontWeight', $module::$fontWeights, [
'label' => 'Style',
'selected' => $this->getData(['theme', 'header', 'fontWeight'])
]); ?>
</div>
<div class="col3">
</div>
<div class="row">
<div class="col4 offset2">
<?php echo template::select('themeHeaderTextTransform', $module::$textTransforms, [
'label' => 'Casse',
'selected' => $this->getData(['theme', 'header', 'textTransform'])
]); ?>
</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>