forked from ZwiiCMS-Team/ZwiiCMS
v8.5.0 : choix police theme menu - supp title dans menu - supp icontext
This commit is contained in:
parent
da4167c762
commit
02d25afc56
@ -1,5 +1,12 @@
|
||||
# ChangeLog
|
||||
|
||||
## Version 8.5.0
|
||||
* Correction :
|
||||
- Suppression popup active par défaut dans le menu
|
||||
- Suppression option de titre de page dans le menu Icone + Texte
|
||||
* Modification :
|
||||
- Thème du menu : sélection de la police de caractère
|
||||
|
||||
## Version 8.4.9
|
||||
* Correction :
|
||||
- Adresse d'une page inactive
|
||||
@ -17,7 +24,7 @@
|
||||
## Version 8.4.6
|
||||
* corrections :
|
||||
- Encodage des dates dans la liste des articles news et blog
|
||||
- Variable itemsperpage stockée dans le mauvais type
|
||||
- Variable itemsperPage stockée dans le mauvais type
|
||||
|
||||
## Version 8.4.5
|
||||
* corrections :
|
||||
|
@ -24,7 +24,7 @@ class common {
|
||||
const GROUP_MEMBER = 1;
|
||||
const GROUP_MODERATOR = 2;
|
||||
const GROUP_ADMIN = 3;
|
||||
const ZWII_VERSION = '8.4.9';
|
||||
const ZWII_VERSION = '8.5.0';
|
||||
|
||||
public static $actions = [];
|
||||
public static $coreModuleIds = [
|
||||
@ -56,7 +56,7 @@ class common {
|
||||
],
|
||||
'timezone' => 'Europe/Paris',
|
||||
'title' => 'Zwii, votre site en quelques clics !',
|
||||
'ItemsperPage' => 10
|
||||
'itemsperPage' => 10
|
||||
],
|
||||
'core' => [
|
||||
'dataVersion' => 0,
|
||||
@ -345,6 +345,7 @@ class common {
|
||||
],
|
||||
'menu' => [
|
||||
'backgroundColor' => 'rgba(74, 105, 189, 1)',
|
||||
'font' => 'Oswald',
|
||||
'fontSize' => '1em',
|
||||
'fontWeight' => 'normal',
|
||||
'height' => '15px 10px',
|
||||
@ -906,7 +907,7 @@ class common {
|
||||
$this->setData(['theme','footer','socialsPosition','1']);
|
||||
$this->setData(['theme','footer','textPosition','2']);
|
||||
$this->setData(['theme','footer','copyrightPosition','3']);
|
||||
$this->setData(['config','ItemsperPage',10]);
|
||||
$this->setData(['config','itemsperPage',10]);
|
||||
$this->setData(['core', 'dataVersion', 840]);
|
||||
$this->SaveData();
|
||||
}
|
||||
@ -918,13 +919,18 @@ class common {
|
||||
$this->setData(['core', 'dataVersion', 844]);
|
||||
$this->SaveData();
|
||||
}
|
||||
|
||||
// Version 8.4.6
|
||||
if($this->getData(['core', 'dataVersion']) < 846) {
|
||||
$this->setData(['config','ItemsperPage',10]);
|
||||
$this->setData(['config','iItemsperPage',10]);
|
||||
$this->setData(['core', 'dataVersion', 846]);
|
||||
$this->SaveData();
|
||||
}
|
||||
// Version 8.5.0
|
||||
if($this->getData(['core', 'dataVersion']) < 850) {
|
||||
$this->setData(['theme','menu','font',10]);
|
||||
$this->setData(['core', 'dataVersion', 850]);
|
||||
$this->SaveData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -997,7 +1003,7 @@ class core extends common {
|
||||
// Version
|
||||
$css = '/*' . md5(json_encode($this->getData(['theme']))) . '*/';
|
||||
// Import des polices de caractères
|
||||
$css .= '@import url("https://fonts.googleapis.com/css?family=' . $this->getData(['theme', 'text', 'font']) . '|' . $this->getData(['theme', 'title', 'font']) . '|' . $this->getData(['theme', 'header', 'font']) . '");';
|
||||
$css .= '@import url("https://fonts.googleapis.com/css?family=' . $this->getData(['theme', 'text', 'font']) . '|' . $this->getData(['theme', 'title', 'font']) . '|' . $this->getData(['theme', 'header', 'font']) . '|' . $this->getData(['theme', 'menu', 'font']) . '");';
|
||||
// Fond du site
|
||||
$colors = helper::colorVariants($this->getData(['theme', 'body', 'backgroundColor']));
|
||||
$css .= 'body{background-color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'text', 'font'])) . '",sans-serif}';
|
||||
@ -1058,7 +1064,7 @@ class core extends common {
|
||||
$css .= 'nav{margin:0 20px 0}';
|
||||
}
|
||||
}
|
||||
$css .= '#toggle span,#menu a{padding:' . $this->getData(['theme', 'menu', 'height']) . ';font-weight:' . $this->getData(['theme', 'menu', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'menu', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'menu', 'textTransform']) . '}';
|
||||
$css .= '#toggle span,#menu a{padding:' . $this->getData(['theme', 'menu', 'height']) .';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'menu', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'menu', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'menu', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'menu', 'textTransform']) . '}';
|
||||
// Pied de page
|
||||
$colors = helper::colorVariants($this->getData(['theme', 'footer', 'backgroundColor']));
|
||||
if($this->getData(['theme', 'footer', 'margin'])) {
|
||||
@ -1880,14 +1886,14 @@ class layout extends common {
|
||||
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : '';
|
||||
// Mise en page de l'item
|
||||
$items .= '<li>';
|
||||
// Menu image
|
||||
|
||||
if ( $this->getData(['page',$parentPageId,'disable']) === true
|
||||
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') )
|
||||
|
||||
{$items .= '<a href="'.$this->getUrl(1).'">';}
|
||||
else {
|
||||
$items .= '<a href="' . helper::baseUrl() . $parentPageId . '" title="'.$this->getData(['page', $parentPageId, 'title']).'" ' . $active . $targetBlank . '>'; }
|
||||
{$items .= '<a href="'.$this->getUrl(1).'">';
|
||||
} else {
|
||||
$items .= '<a href="' . helper::baseUrl() . $parentPageId . '"' . $active . $targetBlank . '>';
|
||||
}
|
||||
|
||||
|
||||
switch ($this->getData(['page', $parentPageId, 'typeMenu'])) {
|
||||
@ -1912,16 +1918,7 @@ class layout extends common {
|
||||
$items .= $this->getData(['page', $parentPageId, 'title']);
|
||||
}
|
||||
break;
|
||||
case 'icontext' :
|
||||
if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") {
|
||||
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .'site/file/source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" />';
|
||||
$items .= $this->getData(['page', $parentPageId, 'title']);
|
||||
} else {
|
||||
$items .= $this->getData(['page', $parentPageId, 'title']);
|
||||
}
|
||||
break;
|
||||
}
|
||||
// Menu Image
|
||||
|
||||
|
||||
|
||||
|
@ -222,7 +222,7 @@ class config extends common {
|
||||
],
|
||||
'timezone' => $this->getInput('configTimezone', helper::FILTER_STRING_SHORT, true),
|
||||
'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true),
|
||||
'ItemsperPage' => $this->getInput('ItemsperPage', helper::FILTER_INT,true)
|
||||
'itemsperPage' => $this->getInput('itemsperPage', helper::FILTER_INT,true)
|
||||
]
|
||||
]);
|
||||
if(self::$inputNotices === []) {
|
||||
|
@ -57,9 +57,9 @@
|
||||
]); ?>
|
||||
|
||||
|
||||
<?php echo template::select('ItemsperPage', $module::$ItemsList, [
|
||||
<?php echo template::select('itemsperPage', $module::$ItemsList, [
|
||||
'label' => 'Pagination Blog et News',
|
||||
'selected' => $this->getData(['config', 'ItemsperPage']),
|
||||
'selected' => $this->getData(['config', 'itemsperPage']),
|
||||
'help' => 'Nombre d\'articles de blog ou de news par page'
|
||||
]); ?>
|
||||
</div>
|
||||
|
@ -28,8 +28,7 @@ class page extends common {
|
||||
public static $typeMenu = [
|
||||
'text' => 'Texte',
|
||||
'icon' => 'Icône',
|
||||
'icontitle' => 'Icône et bulle',
|
||||
'icontext' => 'Icône et texte'
|
||||
'icontitle' => 'Icône et bulle'
|
||||
];
|
||||
// menu image
|
||||
// Position du module
|
||||
|
@ -356,6 +356,7 @@ class theme extends common {
|
||||
if($this->isPost()) {
|
||||
$this->setData(['theme', 'menu', [
|
||||
'backgroundColor' => $this->getInput('themeMenuBackgroundColor'),
|
||||
'font' => $this->getInput('themeMenuFont'),
|
||||
'fontSize' => $this->getInput('themeMenuFontSize'),
|
||||
'fontWeight' => $this->getInput('themeMenuFontWeight'),
|
||||
'height' => $this->getInput('themeMenuHeight'),
|
||||
|
@ -14,14 +14,17 @@
|
||||
* Aperçu en direct
|
||||
*/
|
||||
$("input, select").on("change", function() {
|
||||
// Couleurs du menu
|
||||
// Import des polices de caractères
|
||||
var menuFont = $("#themeMenuFont").val();
|
||||
var css = "@import url('https://fonts.googleapis.com/css?family=" + menuFont + "');";
|
||||
var colors = core.colorVariants($("#themeMenuBackgroundColor").val());
|
||||
var css = "nav,nav a{background-color:" + colors.normal + "}";
|
||||
// Couleurs du menu
|
||||
css += "nav,nav a{background-color:" + colors.normal + "}";
|
||||
css += "nav a,#toggle span,nav a:hover{color:" + $("#themeMenuTextColor").val() + "}";
|
||||
css += "nav a:hover{background-color:" + colors.darken + "}";
|
||||
css += "nav a.active{background-color:" + colors.veryDarken + "}";
|
||||
// Taille, hauteur, épaisseur et capitalisation de caractères du menu
|
||||
css += "#toggle span,#menu a{padding:" + $("#themeMenuHeight").val() + ";font-weight:" + $("#themeMenuFontWeight").val() + ";font-size:" + $("#themeMenuFontSize").val() + ";text-transform:" + $("#themeMenuTextTransform").val() + "}";
|
||||
css += "#toggle span,#menu a{padding:" + $("#themeMenuHeight").val() + ";font-family:'" + menuFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeMenuFontWeight").val() + ";font-size:" + $("#themeMenuFontSize").val() + ";text-transform:" + $("#themeMenuTextTransform").val() + "}";
|
||||
// Alignement du menu
|
||||
css += "#menu{text-align:" + $("#themeMenuTextAlign").val() + "}";
|
||||
// Marge
|
||||
|
@ -38,19 +38,27 @@
|
||||
<div class="block">
|
||||
<h4>Mise en forme du texte</h4>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<div class="col6">
|
||||
<?php echo template::select('themeMenuTextTransform', $module::$textTransforms, [
|
||||
'label' => 'Caractères',
|
||||
'selected' => $this->getData(['theme', 'menu', 'textTransform'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<div class="col6">
|
||||
<?php echo template::select('themeMenuFontWeight', $module::$fontWeights, [
|
||||
'label' => 'Style',
|
||||
'selected' => $this->getData(['theme', 'menu', 'fontWeight'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="col6">
|
||||
<?php echo template::select('themeMenuFont', $module::$fonts, [
|
||||
'label' => 'Police',
|
||||
'selected' => $this->getData(['theme', 'menu', 'font'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::select('themeMenuFontSize', $module::$menuFontSizes, [
|
||||
'label' => 'Taille',
|
||||
'selected' => $this->getData(['theme', 'menu', 'fontSize'])
|
||||
|
@ -99,7 +99,7 @@ class blog extends common {
|
||||
// Ids des commentaires par ordre de création
|
||||
$commentIds = array_keys(helper::arrayCollumn($comments, 'createdOn', 'SORT_DESC'));
|
||||
// Pagination
|
||||
$pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['config','ItemsperPage']));
|
||||
$pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['config','itemsperPage']));
|
||||
// Liste des pages
|
||||
self::$pages = $pagination['pages'];
|
||||
// Commentaires en fonction de la pagination
|
||||
@ -155,7 +155,7 @@ class blog extends common {
|
||||
// Ids des articles par ordre de publication
|
||||
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0)]), 'publishedOn', 'SORT_DESC'));
|
||||
// Pagination
|
||||
$pagination = helper::pagination($articleIds, $this->getUrl(),$this->getData(['config','ItemsperPage']));
|
||||
$pagination = helper::pagination($articleIds, $this->getUrl(),$this->getData(['config','itemsperPage']));
|
||||
// Liste des pages
|
||||
self::$pages = $pagination['pages'];
|
||||
// Articles en fonction de la pagination
|
||||
@ -318,7 +318,7 @@ class blog extends common {
|
||||
// Ids des commentaires par ordre de publication
|
||||
$commentIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'comment']), 'createdOn', 'SORT_DESC'));
|
||||
// Pagination
|
||||
$pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['config','ItemsperPage']),'#comment');
|
||||
$pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['config','itemsperPage']),'#comment');
|
||||
// Liste des pages
|
||||
self::$pages = $pagination['pages'];
|
||||
// Commentaires en fonction de la pagination
|
||||
@ -346,7 +346,7 @@ class blog extends common {
|
||||
}
|
||||
}
|
||||
// Pagination
|
||||
$pagination = helper::pagination($articleIds, $this->getUrl(),$this->getData(['config','ItemsperPage']));
|
||||
$pagination = helper::pagination($articleIds, $this->getUrl(),$this->getData(['config','itemsperPage']));
|
||||
// Liste des pages
|
||||
self::$pages = $pagination['pages'];
|
||||
// Articles en fonction de la pagination
|
||||
|
@ -104,7 +104,7 @@ class form extends common {
|
||||
$data = $this->getData(['module', $this->getUrl(0), 'data']);
|
||||
if($data) {
|
||||
// Pagination
|
||||
$pagination = helper::pagination($data, $this->getUrl(),$this->getData(['config','ItemsperPage']));
|
||||
$pagination = helper::pagination($data, $this->getUrl(),$this->getData(['config','itemsperPage']));
|
||||
// Liste des pages
|
||||
self::$pagination = $pagination['pages'];
|
||||
// Inverse l'ordre du tableau
|
||||
|
@ -82,7 +82,7 @@ class news extends common {
|
||||
// Ids des news par ordre de publication
|
||||
$newsIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0)]), 'publishedOn', 'SORT_DESC'));
|
||||
// Pagination
|
||||
$pagination = helper::pagination($newsIds, $this->getUrl(),$this->getData(['config','ItemsperPage']));
|
||||
$pagination = helper::pagination($newsIds, $this->getUrl(),$this->getData(['config','itemsperPage']));
|
||||
// Liste des pages
|
||||
self::$pages = $pagination['pages'];
|
||||
// News en fonction de la pagination
|
||||
@ -205,7 +205,7 @@ class news extends common {
|
||||
}
|
||||
}
|
||||
// Pagination
|
||||
$pagination = helper::pagination($newsIds, $this->getUrl(),$this->getData(['config','ItemsperPage']));
|
||||
$pagination = helper::pagination($newsIds, $this->getUrl(),$this->getData(['config','itemsperPage']));
|
||||
// Liste des pages
|
||||
self::$pages = $pagination['pages'];
|
||||
// News en fonction de la pagination
|
||||
|
Loading…
Reference in New Issue
Block a user