[9.0.08] Thèmes : libellés et aide

This commit is contained in:
fredtempez 2019-03-20 18:25:17 +01:00
parent 2ed23f4cd2
commit 45914d3f7c
6 changed files with 54 additions and 43 deletions

View File

@ -90,19 +90,19 @@ class theme extends common {
'body' => 'En dessous du site' 'body' => 'En dessous du site'
]; ];
public static $footerFontSizes = [ public static $footerFontSizes = [
'.8em' => 'Très petite', '.5em' => 'Microscopique (50%)',
'.9em' => 'Petite', '.6em' => 'Minuscule (60%)',
'1em' => 'Normale', '.7em' => 'Infime (70%)',
'1.1em' => 'Moyenne', '.8em' => 'Très petite (80%)',
'1.2em' => 'Grande', '.9em' => 'Petite (90%)',
'1.3em' => 'Très grande' '1em' => 'Normale (100%)',
]; ];
public static $headerFontSizes = [ public static $headerFontSizes = [
'1.6em' => 'Très petite', '1.6em' => 'Très petite (160%)',
'1.8em' => 'Petite', '1.8em' => 'Petite (180%)',
'2em' => 'Moyenne', '2em' => 'Moyenne (200%)',
'2.2em' => 'Grande', '2.2em' => 'Grande (220%)',
'2.4vmax' => 'Très grande' '2.4vmax' => 'Très grande (240%)'
]; ];
public static $headerHeights = [ public static $headerHeights = [
'100px' => 'Très petite (100 pixels)', '100px' => 'Très petite (100 pixels)',
@ -128,12 +128,12 @@ class theme extends common {
'bottom right' => 'En bas à droite' 'bottom right' => 'En bas à droite'
]; ];
public static $menuFontSizes = [ public static $menuFontSizes = [
'.8em' => 'Très petite', '.8em' => 'Très petite (80%)',
'.9em' => 'Petite', '.9em' => 'Petite (90%)',
'1em' => 'Normale', '1em' => 'Normale (100%)',
'1.1em' => 'Moyenne', '1.1em' => 'Moyenne (110%)',
'1.2em' => 'Grande', '1.2em' => 'Grande (120%)',
'1.3em' => 'Très grande' '1.3em' => 'Très grande (130%)'
]; ];
public static $menuHeights = [ public static $menuHeights = [
'5px 10px' => 'Très petite', '5px 10px' => 'Très petite',
@ -178,11 +178,11 @@ class theme extends common {
'1px 1px 50px' => 'Très importante' '1px 1px 50px' => 'Très importante'
]; ];
public static $siteFontSizes = [ public static $siteFontSizes = [
'12px' => '12', '12px' => '12 pixels',
'13px' => '13', '13px' => '13 pixels',
'14px' => '14', '14px' => '14 pixels',
'15px' => '15', '15px' => '15 pixels',
'16px' => '16' '16px' => '16 pixels'
]; ];
public static $sizes = [ public static $sizes = [
'auto' => 'Automatique', 'auto' => 'Automatique',

View File

@ -18,6 +18,7 @@
<h4>Couleur</h4> <h4>Couleur</h4>
<?php echo template::text('themeBodyBackgroundColor', [ <?php echo template::text('themeBodyBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence',
'label' => 'Fond', 'label' => 'Fond',
'value' => $this->getData(['theme', 'body', 'backgroundColor']) 'value' => $this->getData(['theme', 'body', 'backgroundColor'])
]); ?> ]); ?>

View File

@ -79,6 +79,7 @@
<div class="col3"> <div class="col3">
<?php echo template::select('themeFooterFontSize', $module::$footerFontSizes, [ <?php echo template::select('themeFooterFontSize', $module::$footerFontSizes, [
'label' => 'Taille', 'label' => 'Taille',
'help' => 'Proportionnelle à celle définie dans le site',
'selected' => $this->getData(['theme', 'footer', 'fontSize']) 'selected' => $this->getData(['theme', 'footer', 'fontSize'])
]); ?> ]); ?>
</div> </div>

View File

@ -20,6 +20,7 @@
<div class="col6"> <div class="col6">
<?php echo template::text('themeHeaderBackgroundColor', [ <?php echo template::text('themeHeaderBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence',
'label' => 'Fond', 'label' => 'Fond',
'value' => $this->getData(['theme', 'header', 'backgroundColor']) 'value' => $this->getData(['theme', 'header', 'backgroundColor'])
]); ?> ]); ?>
@ -27,6 +28,7 @@
<div class="col6"> <div class="col6">
<?php echo template::text('themeHeaderTextColor', [ <?php echo template::text('themeHeaderTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence',
'label' => 'Texte', 'label' => 'Texte',
'value' => $this->getData(['theme', 'header', 'textColor']) 'value' => $this->getData(['theme', 'header', 'textColor'])
]); ?> ]); ?>
@ -96,6 +98,7 @@
<div class="col3"> <div class="col3">
<?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',
'selected' => $this->getData(['theme', 'header', 'fontSize']) 'selected' => $this->getData(['theme', 'header', 'fontSize'])
]); ?> ]); ?>
</div> </div>
@ -104,8 +107,7 @@
'label' => 'Police', 'label' => 'Police',
'selected' => $this->getData(['theme', 'header', 'font']) 'selected' => $this->getData(['theme', 'header', 'font'])
]); ?> ]); ?>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -20,6 +20,7 @@
<div class="col6"> <div class="col6">
<?php echo template::text('themeMenuBackgroundColor', [ <?php echo template::text('themeMenuBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence',
'label' => 'Fond', 'label' => 'Fond',
'value' => $this->getData(['theme', 'menu', 'backgroundColor']) 'value' => $this->getData(['theme', 'menu', 'backgroundColor'])
]); ?> ]); ?>
@ -27,6 +28,7 @@
<div class="col6"> <div class="col6">
<?php echo template::text('themeMenuTextColor', [ <?php echo template::text('themeMenuTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence',
'label' => 'Texte', 'label' => 'Texte',
'value' => $this->getData(['theme', 'menu', 'textColor']) 'value' => $this->getData(['theme', 'menu', 'textColor'])
]); ?> ]); ?>
@ -35,37 +37,47 @@
</div> </div>
</div> </div>
<div class="col6"> <div class="col6">
<div class="block">
<h4>Contenu</h4>
<?php echo template::checkbox('themeMenuLoginLink', true, 'Lien de connexion', [
'checked' => $this->getData(['theme', 'menu', 'loginLink']),
'help' => 'Visible seulement sur cette page et lorsque vous n\'êtes pas connecté (non recommandé).'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block"> <div class="block">
<h4>Mise en forme du texte</h4> <h4>Mise en forme du texte</h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col3">
<?php echo template::select('themeMenuTextTransform', $module::$textTransforms, [ <?php echo template::select('themeMenuTextTransform', $module::$textTransforms, [
'label' => 'Caractères', 'label' => 'Caractères',
'selected' => $this->getData(['theme', 'menu', 'textTransform']) 'selected' => $this->getData(['theme', 'menu', 'textTransform'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col3">
<?php echo template::select('themeMenuFontWeight', $module::$fontWeights, [ <?php echo template::select('themeMenuFontWeight', $module::$fontWeights, [
'label' => 'Style', 'label' => 'Style',
'selected' => $this->getData(['theme', 'menu', 'fontWeight']) 'selected' => $this->getData(['theme', 'menu', 'fontWeight'])
]); ?> ]); ?>
</div> </div>
</div> <div class="col3">
<div class='row'>
<div class="col6">
<?php echo template::select('themeMenuFont', $module::$fonts, [ <?php echo template::select('themeMenuFont', $module::$fonts, [
'label' => 'Police', 'label' => 'Police',
'selected' => $this->getData(['theme', 'menu', 'font']) 'selected' => $this->getData(['theme', 'menu', 'font'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col3">
<?php echo template::select('themeMenuFontSize', $module::$menuFontSizes, [ <?php echo template::select('themeMenuFontSize', $module::$menuFontSizes, [
'label' => 'Taille', 'label' => 'Taille',
'help' => 'Proportionnelle à celle définie dans le site',
'selected' => $this->getData(['theme', 'menu', 'fontSize']) 'selected' => $this->getData(['theme', 'menu', 'fontSize'])
]); ?> ]); ?>
</div> </div>
</div> </div>
</div> </div>
<div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@ -114,15 +126,4 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="col6">
<div class="block">
<h4>Contenu</h4>
<?php echo template::checkbox('themeMenuLoginLink', true, 'Lien de connexion', [
'checked' => $this->getData(['theme', 'menu', 'loginLink']),
'help' => 'Visible seulement sur cette page et lorsque vous n\'êtes pas connecté.'
]); ?>
</div>
</div>
</div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>

View File

@ -20,6 +20,7 @@
<div class="col4"> <div class="col4">
<?php echo template::text('themeSiteBackgroundColor', [ <?php echo template::text('themeSiteBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence',
'label' => 'Fond', 'label' => 'Fond',
'value' => $this->getData(['theme', 'site', 'backgroundColor']) 'value' => $this->getData(['theme', 'site', 'backgroundColor'])
]); ?> ]); ?>
@ -27,6 +28,7 @@
<div class="col4"> <div class="col4">
<?php echo template::text('themeTextTextColor', [ <?php echo template::text('themeTextTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence',
'label' => 'Texte', 'label' => 'Texte',
'value' => $this->getData(['theme', 'text', 'textColor']) 'value' => $this->getData(['theme', 'text', 'textColor'])
]); ?> ]); ?>
@ -34,6 +36,7 @@
<div class="col4"> <div class="col4">
<?php echo template::text('themeTitleTextColor', [ <?php echo template::text('themeTitleTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence',
'label' => 'Titres', 'label' => 'Titres',
'value' => $this->getData(['theme', 'title', 'textColor']) 'value' => $this->getData(['theme', 'title', 'textColor'])
]); ?> ]); ?>
@ -43,6 +46,7 @@
<div class="col4 offset2"> <div class="col4 offset2">
<?php echo template::text('themeButtonBackgroundColor', [ <?php echo template::text('themeButtonBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence',
'label' => 'Boutons', 'label' => 'Boutons',
'value' => $this->getData(['theme', 'button', 'backgroundColor']) 'value' => $this->getData(['theme', 'button', 'backgroundColor'])
]); ?> ]); ?>
@ -50,6 +54,7 @@
<div class="col4"> <div class="col4">
<?php echo template::text('themeLinkTextColor', [ <?php echo template::text('themeLinkTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence',
'label' => 'Liens', 'label' => 'Liens',
'value' => $this->getData(['theme', 'link', 'textColor']) 'value' => $this->getData(['theme', 'link', 'textColor'])
]); ?> ]); ?>
@ -92,7 +97,8 @@
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::select('themeTextFontSize', $module::$siteFontSizes, [ <?php echo template::select('themeTextFontSize', $module::$siteFontSizes, [
'label' => 'Taille', 'label' => 'Taille du site',
'help' => 'Correspond au libellé de taille \'Normale\' du menu, de la bannière et du pied de page',
'selected' => $this->getData(['theme', 'text', 'fontSize']) 'selected' => $this->getData(['theme', 'text', 'fontSize'])
]); ?> ]); ?>
</div> </div>