This commit is contained in:
Prof Langues 2019-05-02 13:21:48 +02:00
parent 7975568021
commit 3013b1b6b1
51 changed files with 2561 additions and 733 deletions

View File

@ -1,14 +1,30 @@
# ChangeLog
# Changelog
## Version 9.1.0
- Modifications :
- Amélioration de l'algorithme de gestion des barres
- Script Google Analytics
- Menu : effet de surimpression pages filles
- Réorganisation de l'écran d'édition des pages
- Blog : notification hiérarchique lors de la rédaction d'un commentaire
- Form : notification hiérarchique de la récepton d'un message
- Ajouts :
- Menu dans une barre latérale : intégral ou sous-menu de la page parente
- Option d'apparition des pages dans le menu latéral ou le menu principal
- Option de chargement d'un modèle de site à l'installation
- Option de masquage des pages enfants dans le menu principal
- Petits écrans, ordre des blocs : Page - Barre Gauche - Barre Droite
- Intégration de la classe Swiper http://idangero.us/swiper/
- Intégration de l'URL canonical
- Icône de suppression des pages dans la barre d'administration
- Gestion du sitemap.xml et du robots.txt
## Version 9.0.21
- Mise à jour :
- Code Mirror v5.46
- Corrections :
- Liens de l'éditeur de page : impossibilité de sélectionner un lien vers une page parente
- Export des données du site, problème lors de la création de l'arborescence
- Titre de l'icône Youtube erroné
- Translittératon activée et multi-sélection dans le gestionnaire de fichiers
- Export des données du site, problème lors de la création de l'arborescence.
## Version 9.0.20
- Correction :
@ -16,11 +32,11 @@
## Version 9.0.19
- Correction :
- Alignement du menu
- Alignement du menu
## Version 9.0.18
- Correction :
- Etat par défaut du numéro de version mal récupéré
- Etat par défaut du numéro de version mal récupéré
## Version 9.0.17
- Mises à jour :
@ -31,10 +47,10 @@
- Harmonisation du contenu des bulles d'aide
- Modifications :
- Ajout du numéro de version dans le pied de page activable dans la configuration du thème
- Désactivation Aviary dans Responsive FileManager
- Désactivation Aviary dans Responsive FileManager
## Version 9.0.16
- Corrections :
- Correction :
- Nom de page constitué de caractères filtrés empếchant la création d'un Id valide.
- Module Gallery : bouton de fermeture sous Edge
@ -46,11 +62,11 @@
- Masquage de l'icône de gestion du compte
## Version 9.0.14
- Modifications :
- Tippy, lity et TinyMCE, simpleLightbox :
- légende et titre, nouveaux paramètres
- SimpleLightbox : bug d'affichage sous Edge, autre méthode
- Meilleure intégration
- Corrections :
- Débordement dans le pied de page quand le copyright est à droite
- Modifications :
- Petits écrans, menu d'administration plus icônes plus grandes
- Masquage de l'icône de gestion du compte
## Version 9.0.13
- Modifications :

View File

@ -328,9 +328,29 @@ core.start = function() {
});
}).trigger("resize");
// Ajouter l'attribut data-lity afin de faire la liaison avec lity
//$("a[rel='data-lity']").attr("data-lity","");
// Ajouter la classe Gallery afin de faire la liaison avec simplelightbox
//$("a[rel='gallery']").addClass("gallery","");
// Appel dans init.js
// $('.gallery').simpleLightbox();
};
core.start();
/**
* Confirmation de suppression
*/
$("#pageDelete").on("click", function() {
var _this = $(this);
return core.confirm("Êtes-vous sûr de vouloir supprimer cette page ?", function() {
$(location).attr("href", _this.attr("href"));
});
});
/**
* Calcul de la luminance relative d'une couleur
*/

View File

@ -27,8 +27,8 @@ class common {
const GROUP_MODERATOR = 2;
const GROUP_ADMIN = 3;
// Numéro de version stable
const ZWII_VERSION = '9.0.21';
// Numéro de version
const ZWII_VERSION = '9.1.00.dev63';
public static $actions = [];
public static $coreModuleIds = [
@ -55,6 +55,8 @@ class common {
public $output = [
'access' => true,
'content' => '',
'contentLeft' => '',
'contentRight' => '',
'display' => self::DISPLAY_LAYOUT_MAIN,
'metaDescription' => '',
'metaTitle' => '',
@ -79,7 +81,8 @@ class common {
'tippy',
'zwiico',
'imagemap',
'simplelightbox'
'simplelightbox',
'swiper'
],
'view' => ''
];
@ -142,8 +145,6 @@ class common {
}
// Mise à jour des données core
// Fonction désactivée en dev
// if (stripos(common::ZWII_VERSION, 'dev') === 0 )
$this->update();
// Utilisateur connecté
@ -213,9 +214,6 @@ class common {
$this->url = $this->getData(['config', 'homePageId']);
}
}
// Mise à jour de la liste des pages pour TinyMCE
$this->linkList();
}
/**
@ -519,7 +517,6 @@ class common {
* Enregistre les données dans deux fichiers séparés
*/
public function saveData() {
// Save config core page module et user
// 5 premières clés principales
// Trois tentatives
@ -543,9 +540,10 @@ class common {
}
/**
* Génére un fichier json avec la liste des
* Génére un fichier json avec la liste des pages
*
*/
public function linkList() {
public function pages2Json() {
// Sauve la liste des pages pour TinyMCE
$parents = [];
$rewrite = (helper::checkRewrite()) ? '' : '?';
@ -590,6 +588,89 @@ class common {
}
}
/**
* Génére un fichier robots.txt à l'installation
* Si le fichier exite déjà les commandes sont ajoutées
*/
public function createRobots() {
$robotValue =
PHP_EOL .
'# ZWII CONFIG ---------' . PHP_EOL .
'User-agent: *' . PHP_EOL .
'Disallow: /core/' . PHP_EOL .
'Disallow: /module/' .PHP_EOL .
'Disallow: /site/data' .PHP_EOL .
'Disallow: /site/tmp' .PHP_EOL .
'Disallow: /site/backup' .PHP_EOL .
'Allow: /site/file/' .PHP_EOL .
'Sitemap: ' . helper::baseUrl() . 'sitemap.xml' . PHP_EOL .
'Sitemap: ' . helper::baseUrl() . 'sitemap.xml.gz' . PHP_EOL .
'# ZWII CONFIG ---------' . PHP_EOL ;
if (file_exists('robots.txt')) {
return(file_put_contents(
'robots.txt',
$robotValue,
FILE_APPEND
));
} else {
// Sinon on crée un fichier
return(file_put_contents(
'robots.txt',
$robotValue
));
}
}
/**
* Génére un fichier un fchier sitemap.xml
* https://github.com/icamys/php-sitemap-generator
* $command valeurs possible
* all : génére un site map complet
* Sinon contient id de la page à créer
*/
public function createSitemap($command = "all") {
require_once "core/vendor/sitemap/SitemapGenerator.php";
$sitemap = new \Icamys\SitemapGenerator\SitemapGenerator(helper::baseurl());
// will create also compressed (gzipped) sitemap
$sitemap->createGZipFile = true;
// determine how many urls should be put into one file
// according to standard protocol 50000 is maximum value (see http://www.sitemaps.org/protocol.html)
$sitemap->maxURLsPerSitemap = 50000;
// sitemap file name
$sitemap->sitemapFileName = "sitemap.xml";
$datetime = new DateTime(date('c'));
$datetime->format(DateTime::ATOM); // Updated ISO8601
// sitemap index file name
$sitemap->sitemapIndexFileName = "sitemap-index.xml";
foreach($this->getHierarchy(null, false, false) as $parentPageId => $childrenPageIds) {
$sitemap->addUrl ($parentPageId,$datetime);
foreach($childrenPageIds as $childKey) {
$sitemap->addUrl($childKey,$datetime);
}
}
// generating internally a sitemap
$sitemap->createSitemap();
// writing early generated sitemap to file
$sitemap->writeSitemap();
return(file_exists('sitemap.xml'));
}
/**
* Envoi un mail
@ -790,6 +871,14 @@ class common {
$this->setData(['core', 'dataVersion', 9017]);
$this->SaveData();
}
// Version 9.1.0
if($this->getData(['core', 'dataVersion']) < 9100) {
$this->setData(['theme','footer','displayVersion', true ]);
$this->setData(['theme','footer','displaySiteMap', true ]);
$this->setData(['theme','footer','displayCopyright', true ]);
$this->setData(['core', 'dataVersion', 9100]);
$this->SaveData();
}
}
}
@ -1025,6 +1114,7 @@ class core extends common {
}
// Breadcrumb
$title = $this->getData(['page', $this->getUrl(0), 'title']);
if (!empty($this->getData(['page', $this->getUrl(0), 'parentPageId'])) &&
$this->getData(['page', $this->getUrl(0), 'breadCrumb'])) {
@ -1048,12 +1138,15 @@ class core extends common {
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),
'disable' => $this->getData(['page', $this->getUrl(0), 'disable'])
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
'contentRight' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'content']),
'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content'])
]);
}
// Importe le module
else {
// Id du module, et valeurs en sortie de la page si il s'agit d'un module de page
if($access AND $this->getData(['page', $this->getUrl(0), 'moduleId'])) {
$moduleId = $this->getData(['page', $this->getUrl(0), 'moduleId']);
$this->addOutput([
@ -1062,7 +1155,9 @@ class core extends common {
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),
'disable' => $this->getData(['page', $this->getUrl(0), 'disable'])
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
'contentRight' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'content']),
'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content'])
]);
$pageContent = $this->getData(['page', $this->getUrl(0), 'content']);
}
@ -1460,7 +1555,7 @@ class helper {
// Cas où un identifiant est vide
if (empty($text)) {
$text = uniqid('page-');
}
}
// Un ID ne peut pas être un entier, pour éviter les conflits avec le système de pagination
if(intval($text) !== 0) {
$text = 'i' . $text;
@ -1690,14 +1785,14 @@ class layout extends common {
*/
public function showAnalytics() {
if($code = $this->getData(['config', 'analyticsId'])) {
echo '<script>
(function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,"script","https://www.google-analytics.com/analytics.js","ga");
ga("create", "' . $code . '", "auto");
ga("send", "pageview");
</script>';
echo '<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id='. $code .'"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag("js", new Date());
gtag("config","'. $code .'");
</script>';
}
}
@ -1716,22 +1811,48 @@ class layout extends common {
echo '<h2 id="sectionTitle">' . $this->core->output['title'] . '</h2>';
}
echo $this->core->output['content'];
}
/**
* Affiche le contenu de la barre gauche
* @param page chargée
*/
public function showBarContentLeft() {
echo $this->core->output['contentLeft'];
}
/**
/**
* Affiche le contenu de la barre droite
* @param page chargée
*/
public function showBarContentRight() {
echo $this->core->output['contentRight'];
}
/**
* Affiche le copyright
*/
public function showCopyright() {
$items = '<div id="footerCopyright">';
$items .= '<span id="footerFont">Motorisé&nbsp;par&nbsp;<a href="http://zwiicms.com/" onclick="window.open(this.href);return false" data-tippy-content="Zwii CMS sans base de données, très léger et performant">Zwii';
$items .= ' <span id="footerDisplayVersion" ' .
($this->getData(['theme','footer','displayVersion']) === true ? '>': 'class="displayNone" >' ) .
common::ZWII_VERSION .
"</span>" ;
$items .= '</a>';
$items .= '&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'sitemap" data-tippy-content="Plan du site" >Plan&nbsp;du&nbsp;site</a></span>';
$items = '<div id="footerCopyright">';
$items .= '<span id="footerFont">';
$items .= '<span id="footerDisplayCopyright">';
if ($this->getData(['theme','footer','displayCopyright']) === true) {
$items .= 'Motorisé&nbsp;par&nbsp</span>';
}
$items .= '<a href="http://zwiicms.com/" onclic="window.open(this.href);return false" data-tippy-content="Zwii CMS sans base de données, très léger et performant">ZwiiCMS</a>';
//$items .= '</span>';
$items .= '<span id="footerDisplayVersion">';
if ($this->getData(['theme','footer','displayVersion']) === true ) {
$items .= '<wbr>&nbsp;'. common::ZWII_VERSION ;
}
$items .= '</span>';
$items .= '<span id="footerDisplaySiteMap">';
if ($this->getData(['theme','footer','displaySiteMap']) === true ) {
$items .= '<wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() .
'sitemap" data-tippy-content="Plan du site" >Plan&nbsp;du&nbsp;site</a>';
}
if(
(
$this->getData(['theme', 'footer', 'loginLink'])
@ -1741,11 +1862,11 @@ class layout extends common {
) {
$items .= '<span id="footerLoginLink" ' .
($this->getUrl(0) === 'theme' ? 'class="displayNone"' : '') .
'>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'user/login/' .
'><wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'user/login/' .
strip_tags(str_replace('/', '_', $this->getUrl())) .
'" data-tippy-content="Connexion à l\'administration" >Connexion</a></span>';
}
$items .= '</div>';
$items .= '</span></div>';
echo $items;
}
@ -1775,9 +1896,13 @@ class layout extends common {
$items = '';
$currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2);
foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) {
// Passer les entrées masquées
if ($this->getData(['page',$parentPageId,'hideMenuHead']) === true ) {
continue;
}
// Propriétés de l'item
$active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? ' class="active"' : '';
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : '';
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page de l'item
$items .= '<li>';
@ -1789,7 +1914,6 @@ class layout extends common {
$items .= '<a href="' . helper::baseUrl() . $parentPageId . '"' . $active . $targetBlank . '>';
}
switch ($this->getData(['page', $parentPageId, 'typeMenu'])) {
case '' :
$items .= $this->getData(['page', $parentPageId, 'title']);
@ -1813,18 +1937,31 @@ class layout extends common {
}
break;
}
if($childrenPageIds) {
// Cas où les pages enfants enfant sont toutes masquées dans le menu
// ne pas afficher de symbole lorsqu'il n'y a rien à afficher
$totalChild = 0;
$disableChild = 0;
foreach($childrenPageIds as $childKey) {
$totalChild += 1;
if ($this->getData(['page',$childKey,'hideMenuHead']) === true ) {
$disableChild += 1;
}
}
if($childrenPageIds && $disableChild !== $totalChild &&
$this->getdata(['page',$parentPageId,'hideMenuChildren']) === false) {
$items .= template::ico('down', 'left');
}
// ------------------------------------------------
$items .= '</a>';
if ($this->getdata(['page',$parentPageId,'hideMenuChildren']) === true) {
continue;
}
$items .= '<ul>';
foreach($childrenPageIds as $childKey) {
// Passer les entrées masquées
if ($this->getData(['page',$childKey,'hideMenuHead']) === true ) {
continue;
}
// Propriétés de l'item
$active = ($childKey === $currentPageId) ? ' class="active"' : '';
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
@ -1894,12 +2031,116 @@ class layout extends common {
echo '<ul>' . $items . '</ul>';
}
/**
* Générer un menu pour la barre latérale
* Uniquement texte
* @param onlyChildren n'affiche les sous-pages de la page actuelle
*/
public function showMenuSide($onlyChildren = null) {
// Met en forme les items du menu
$items = '';
// Nom de la page courante
$currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2);
// Nom de la page parente
$currentParentPageId = $this->getData(['page',$currentPageId,'parentPageId']);
// Détermine si on affiche uniquement le parent et les enfants
// Filtre contient le nom de la page parente
if ($onlyChildren === true) {
if (empty($currentParentPageId)) {
$filterCurrentPageId = $currentPageId;
} else {
$filterCurrentPageId = $currentParentPageId;
}
//if ($this->getData(['page',$filterCurrentPageId,'hideTitle']) == false) {
// echo '<h3 id="menuSideTitle"><a href="' . helper::baseUrl() . $currentPageId . '">' . $this->getData(['page',$filterCurrentPageId,'title']) . '</a></h3>';
//}
}
foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) {
// Ne pas afficher les entrées masquées
if ($this->getData(['page',$parentPageId,'hideMenuSide']) === true ) {
continue;
}
// Filtre actif et nom de la page parente courante différente, on sort de la boucle
if ($onlyChildren === true && $parentPageId !== $filterCurrentPageId) {
continue;
}
// Propriétés de l'item
$active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? ' class="active"' : '';
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page de l'item;
// Ne pas afficher le parent d'une sous-page quand l'option est sélectionnée.
if ($onlyChildren === false) {
$items .= '<li id="menuSide">';
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 . '"' . $active . $targetBlank . '>';
}
$items .= $this->getData(['page', $parentPageId, 'title']);
// Cas où les pages enfants enfant sont toutes masquées dans le menu
// ne pas afficher de symbole lorsqu'il n'y a rien à afficher
//$totalChild = 0;
//$disableChild = 0;
//foreach($childrenPageIds as $childKey) {
// $totalChild += 1;
// if ($this->getData(['page',$childKey,'hideMenuSide']) === true ) {
// $disableChild += 1;
// }
//}
//if($childrenPageIds && $disableChild !== $totalChild ) {
// $items .= template::ico('down', 'left');
//}
// ------------------------------------------------
// A garder mais désactivé avec la suppresion du thème
$items .= '</a>';
} else {
$items .= '</ul>';
}
$items .= '<ul id="menuSideChild">';
foreach($childrenPageIds as $childKey) {
// Passer les entrées masquées
if ($this->getData(['page',$childKey,'hideMenuSide']) === true ) {
continue;
}
// Propriétés de l'item
$active = ($childKey === $currentPageId) ? ' class="active"' : '';
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page du sous-item
$items .= '<li id="menuSideChild">';
if ( $this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') )
{$items .= '<a href="'.$this->getUrl(1).'">';}
else {
$items .= '<a href="' . helper::baseUrl() . $childKey . '"' . $active . $targetBlank . '>'; }
$items .= $this->getData(['page', $childKey, 'title']);
$items .= '</a></li>';
}
$items .= '</ul>';
$items .= '</li>';
}
// Retourne les items du menu
echo '<ul id="menuSide">' . $items . '</ul>';
}
/**
* Affiche le meta titre
*/
public function showMetaTitle() {
echo '<title>' . $this->core->output['metaTitle'] . '</title>';
echo '<meta property="og:title" content="' . $this->core->output['metaTitle'] . '" />';
$canonical = ($this->getUrl(0) == "accueil") ? "" : "?".$this->getUrl(0) ;
echo '<link rel="canonical" href="'. helper::baseUrl(false) . $canonical .'" />';
}
/**
@ -2014,6 +2255,7 @@ class layout extends common {
OR $this->getUrl(0) === ''
) {
$leftItems .= '<li><a href="' . helper::baseUrl() . 'page/edit/' . $this->getUrl(0) . '" data-tippy-content="Modifier la page">' . template::ico('pencil') . '</a></li>';
$leftItems .= '<li><a id="pageDelete" href="' . helper::baseUrl() . 'page/delete/' . $this->getUrl(0) . '&csrf=' . $_SESSION['csrf'] . '" data-tippy-content="Effacer la page">' . template::ico('trash') . '</a></li>';
}
}
// Items de droite
@ -2069,6 +2311,10 @@ class layout extends common {
$socialUrl = 'https://www.facebook.com/';
$title = 'Facebook';
break;
case 'linkedinId':
$socialUrl = 'https://fr.linkedin.com/in/';
$title = 'Linkedin';
break;
case 'instagramId':
$socialUrl = 'https://www.instagram.com/';
$title = 'Instagram';

View File

@ -31,10 +31,30 @@ body {
*/
@media (max-width: 768px) {
body {
margin:2px 2px !important;
margin:2px 2px !important;
}
#site {
margin:2px auto !important;
margin:0px auto !important;
}
header {
margin:0px 0px !important;
background-size: cover !important;
}
}
@media (max-width: 992px) {
.siteContainer {
display: flex;
flex-direction: column;
}
.siteContainer > #contentLeft {
order: 2;
}
.siteContainer > #contentRight {
order: 3;
}
.siteContainer > #contentSite {
order: 1;
}
}
@ -320,13 +340,14 @@ td > .col12 {
width: 70% !important;
}
#bar #barRight {
font-size: 1.2em;
font-size: 1.2em;
}
#bar #barSelectPage {
width: 80%;
font-size: 120%;
}
}
@media (max-width: 992px) {
#bar .zwiico-user {
display: none;
@ -380,6 +401,7 @@ nav #toggle span {
nav #menu {
display: block;
}
nav ul {
padding: 0;
margin: 0;
@ -389,6 +411,7 @@ nav li {
display: inline-block;
position: relative;
}
nav li ul {
display: block;
position: absolute;
@ -397,13 +420,15 @@ nav li ul {
opacity: 0;
-webkit-transition: .3s ease-out;
transition: .3s ease-out;
padding-left: 10px;
}
nav li ul li {
display: block;
text-align: left;
}
nav li:hover ul {
z-index: 1;
z-index: 2;
opacity: 1;
}
nav a {
@ -439,6 +464,8 @@ nav a:hover {
padding-left: 40px !important;
}
}
/* Barre de navigation fixe quand le menu est en-dehors du site */
#navfixedlogout {
position: -webkit-sticky; /* Safari */
@ -460,6 +487,19 @@ nav .zwiico-menu {
}
/* Menu vertical */
#menuSide, #menuSideChild {
padding-left: 10px;
margin: 0px;
list-style: none;
}
ul #menuSideChild, li #menuSideChild {
padding-left:10px;
}
/* Corps */
section {
padding: 20px;
@ -487,12 +527,17 @@ body > footer {
footer {
text-align: center;
padding: 1px 20px;
vertical-align:middle;
}
footer .col4 {
vertical-align: middle;
}
#footerLoginLink,
#footerDisplayCopyright,
#footerDisplayVersion,
#footerDisplaySiteMap {
font-size: inherit;
}
/* Conserve le pied de page sur une ligne */
@media (max-width: 992px) {
footer .col4 {
@ -503,10 +548,6 @@ footer .col4 {
}
}
#footerDisplayVersion {
font-size: inherit;
}
footer #footerSocials span {
color: #FFF;
padding: 9px;
@ -522,11 +563,11 @@ footer #footerSocials .zwiico-facebook {
footer #footerSocials .zwiico-facebook:hover {
background: #324B80;
}
footer #footerSocials .zwiico-googleplus {
background: #DD4B39;
footer #footerSocials .zwiico-linkedin {
background: #007BB6;
}
footer #footerSocials .zwiico-googleplus:hover {
background: #D03724;
footer #footerSocials .zwiico-linkedin:hover {
background: #006881;
}
footer #footerSocials .zwiico-instagram {
background: #E4405F;

View File

@ -1,294 +1,325 @@
<?php $layout = new layout($this); ?>
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php $layout->showMetaTitle(); ?>
<?php $layout->showMetaDescription(); ?>
<?php $layout->showMetaType(); ?>
<?php $layout->showMetaImage(); ?>
<?php $layout->showFavicon(); ?>
<?php $layout->showVendor(); ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>site/data/theme.css?<?php echo md5_file('site/data/theme.css'); ?>">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>site/data/custom.css?<?php echo md5_file('site/data/custom.css'); ?>">
</head>
<body>
<?php $layout->showStyle(); ?>
<?php $layout->showBar(); ?>
<?php $layout->showNotification(); ?>
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top' ): ?>
<!-- Menu dans le fond du site avant la bannière -->
<nav
<?php
// Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté
//
if($this->getData(['theme', 'menu', 'position']) === 'top' &&
$this->getData(['theme', 'menu', 'fixed']) === true) {
if ($this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD'))
{echo 'id="navfixedlogout"';}
elseif ($this->getUrl(0) !== 'theme')
{echo 'id="navfixedconnected"';}
}
?>
>
<div id="toggle"><?php echo template::ico('menu'); ?></div>
<div id="menu" class="
<?php if($this->getData(['theme', 'menu', 'position']) === 'top'){echo 'container-large';}else{echo'container';}
?>">
<?php $layout->showMenu(); ?>
</div>
</nav>
<?php endif; ?>
<?php if($this->getData(['theme', 'header', 'position']) === 'body'): ?>
<!-- Bannière dans le fond du site -->
<header>
<?php
if ($this->getData(['theme','header','linkHome'])){
echo "<a href='" . helper::baseUrl(false) . "'>" ;} ?>
<?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')
): ?>
<div class="container">
<span><?php echo $this->getData(['config', 'title']); ?></span>
</div>
<?php endif; ?>
<?php
if ($this->getData(['theme','header','linkHome'])){echo "</a>";}
?>
</header>
<?php endif; ?>
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-second'): ?>
<!-- Menu dans le fond du site après la bannière -->
<nav>
<div id="toggle"><?php echo template::ico('menu'); ?></div>
<div id="menu" class="container">
<?php $layout->showMenu(); ?>
</div>
</nav>
<?php endif; ?>
<!-- Site -->
<div id="site" class="container">
<?php if($this->getData(['theme', 'menu', 'position']) === 'site-first'): ?>
<!-- Menu dans le site avant la bannière -->
<nav>
<div id="toggle"><?php echo template::ico('menu'); ?></div>
<div id="menu" class="container">
<?php $layout->showMenu(); ?>
</div>
</nav>
<?php endif; ?>
<?php if(
$this->getData(['theme', 'header', 'position']) === 'site'
// Affiche toujours la bannière pour l'édition du thème
OR (
$this->getData(['theme', 'header', 'position']) === 'hide'
AND $this->getUrl(0) === 'theme'
)
): ?>
<!-- Bannière dans le site -->
<?php
if ($this->getData(['theme','header','linkHome'])){
echo "<a href='" . helper::baseUrl(false) . "'>" ;} ?>
<header <?php if($this->getData(['theme', 'header', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
<?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')
): ?>
<div class="container">
<span><?php echo $this->getData(['config', 'title']); ?></span>
</div>
<?php endif; ?>
</header>
<?php
if ($this->getData(['theme','header','linkHome'])){echo "</a>";} ?>
<?php endif; ?>
<?php if(
$this->getData(['theme', 'menu', 'position']) === 'site-second' ||
$this->getData(['theme', 'menu', 'position']) === 'site'
// Affiche toujours le menu pour l'édition du thème
OR (
$this->getData(['theme', 'menu', 'position']) === 'hide'
AND $this->getUrl(0) === 'theme'
)
): ?>
<!-- Menu dans le site après la bannière -->
<nav <?php if($this->getData(['theme', 'menu', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
<div id="toggle"><?php echo template::ico('menu'); ?></div>
<div id="menu" class="container">
<?php $layout->showMenu(); ?>
</div>
</nav>
<?php endif; ?>
<!-- Corps de page -->
<section>
<?php
// Gabarit :
// Récupérer la config de la page courante
$blocks = explode('-',$this->getData(['page',$this->getUrl(0),'block']));
// Initialiser
$blockleft=$blockright="";
switch (sizeof($blocks)) {
case 1 : // une colonne
$content = 'col'. $blocks[0] ;
break;
case 2 : // 2 blocks
if ($blocks[0] < $blocks[1]) { // détermine la position de la colonne
$blockleft = 'col'. $blocks[0];
$content = 'col'. $blocks[1] ;
} else {
$content = 'col' . $blocks[0];
$blockright = 'col' . $blocks[1];
}
break;
case 3 : // 3 blocks
$blockleft = 'col' . $blocks[0];
$content = 'col' . $blocks[1];
$blockright = 'col' . $blocks[2];
}
// Page pleine pour la configuration des modules et l'édition des pages
// ($this->getData(['page', $this->getUrl(2), 'moduleId']) == '' &&
// $this->getUrl(1) == 'config' || // Configuration d'un module en page pleine
// $this->getUrl(1) == 'data' || // données de formulaire en page pleine
// $this->getUrl(1) == 'comment' // données des commentaires en page pleine
if (sizeof($blocks) === 1 ||
!empty($this->getUrl(1)) ) { // Pleine page en mode configuration
$layout->showContent();
} else {
?>
<div class="row">
<?php if ($blockleft !== "") :?> <div class="<?php echo $blockleft; ?>" id="contentleft">
<?php
echo $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content']);
?></div> <?php endif; ?>
<div class="<?php echo $content; ?>" id="contentsite"><?php $layout->showContent(); ?></div>
<?php if ($blockright !== "") :?> <div class="<?php echo $blockright; ?>" id="contentright">
<?php echo $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'content']);
?></div> <?php endif; ?>
</div>
<?php } ?>
</section>
<!-- footer -->
<?php if(
$this->getData(['theme', 'footer', 'position']) === 'site'
// Affiche toujours le pied de page pour l'édition du thème
OR (
$this->getData(['theme', 'footer', 'position']) === 'hide'
AND $this->getUrl(0) === 'theme'
)
): ?>
<!-- Pied de page dans le site -->
<footer <?php if($this->getData(['theme', 'footer', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
<div class="container">
<div class="row" id="footersite">
<div class="col4" id="footersiteLeft"> <!-- bloc gauche -->
<?php
if($this->getData(['theme', 'footer', 'textPosition']) === 'left') {
$layout->showFooterText();}
?>
<?php
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'left') {
$layout->showSocials(); }
?>
<?php
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'left') {
$layout->showCopyright(); }
?>
</div>
<div class="col4" id="footersiteCenter"> <!-- bloc central -->
<?php
if($this->getData(['theme', 'footer', 'textPosition']) === 'center') {
$layout->showFooterText(); }
?>
<?php
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'center') {
$layout->showSocials(); }
?>
<?php
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'center') {
$layout->showCopyright(); }
?>
</div>
<div class="col4" id="footersiteRight"> <!-- bloc droite -->
<?php
if($this->getData(['theme', 'footer', 'textPosition']) === 'right') {
$layout->showFooterText(); }
?>
<?php
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'right') {
$layout->showSocials(); }
?>
<?php
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'right') {
$layout->showCopyright(); }
?>
</div>
</div>
</div>
</footer>
<?php endif; ?>
</div>
<?php if($this->getData(['theme', 'footer', 'position']) === 'body'): ?>
<!-- Pied de page dans le fond du site -->
<footer>
<div class="container-large">
<div class="row" id="footerbody">
<div class="col4" id="footerbodyLeft"> <!-- bloc gauche -->
<?php
if($this->getData(['theme', 'footer', 'textPosition']) === 'left') {
$layout->showFooterText(); }
?>
<?php
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'left') {
$layout->showSocials(); }
?>
<?php
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'left') {
$layout->showCopyright(); }
?>
</div>
<div class="col4" id="footerbodyCenter"> <!-- bloc central -->
<?php
if($this->getData(['theme', 'footer', 'textPosition']) === 'center') {
$layout->showFooterText(); }
?>
<?php
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'center') {
$layout->showSocials(); }
?>
<?php
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'center') {
$layout->showCopyright(); }
?>
</div>
<div class="col4" id="footerbodyRight"> <!-- bloc droite -->
<?php
if($this->getData(['theme', 'footer', 'textPosition']) === 'right') {
$layout->showFooterText(); }
?>
<?php
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'right') {
$layout->showSocials(); }
?>
<?php
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'right') {
$layout->showCopyright();}
?>
</div>
</div>
</div>
</footer>
<?php endif; ?>
<!-- Lien remonter en haut -->
<div id="backToTop"><?php echo template::ico('up'); ?></div>
<?php $layout->showAnalytics(); ?>
<?php $layout->showScript(); ?>
</body>
<?php $layout = new layout($this); ?>
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php $layout->showMetaTitle(); ?>
<?php $layout->showMetaDescription(); ?>
<?php $layout->showMetaType(); ?>
<?php $layout->showMetaImage(); ?>
<?php $layout->showFavicon(); ?>
<?php $layout->showVendor(); ?>
<?php $layout->showAnalytics(); ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>site/data/theme.css?<?php echo md5_file('site/data/theme.css'); ?>">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>site/data/custom.css?<?php echo md5_file('site/data/custom.css'); ?>">
</head>
<body>
<?php $layout->showStyle(); ?>
<?php $layout->showBar(); ?>
<?php $layout->showNotification(); ?>
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top' ): ?>
<!-- Menu dans le fond du site avant la bannière -->
<nav
<?php
// Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté
//
if($this->getData(['theme', 'menu', 'position']) === 'top' &&
$this->getData(['theme', 'menu', 'fixed']) === true) {
if ($this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD'))
{echo 'id="navfixedlogout"';}
elseif ($this->getUrl(0) !== 'theme')
{echo 'id="navfixedconnected"';}
}
?>
>
<div id="toggle"><?php echo template::ico('menu'); ?></div>
<div id="menu" class="
<?php if($this->getData(['theme', 'menu', 'position']) === 'top'){echo 'container-large';}else{echo'container';}
?>">
<?php $layout->showMenu(); ?>
</div>
</nav>
<?php endif; ?>
<?php if($this->getData(['theme', 'header', 'position']) === 'body'): ?>
<!-- Bannière dans le fond du site -->
<header>
<?php
if ($this->getData(['theme','header','linkHome'])){
echo "<a href='" . helper::baseUrl(false) . "'>" ;} ?>
<?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')
): ?>
<div class="container">
<span><?php echo $this->getData(['config', 'title']); ?></span>
</div>
<?php endif; ?>
<?php
if ($this->getData(['theme','header','linkHome'])){echo "</a>";}
?>
</header>
<?php endif; ?>
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-second'): ?>
<!-- Menu dans le fond du site après la bannière -->
<nav>
<div id="toggle"><?php echo template::ico('menu'); ?></div>
<div id="menu" class="container">
<?php $layout->showMenu(); ?>
</div>
</nav>
<?php endif; ?>
<!-- Site -->
<div id="site" class="container">
<?php if($this->getData(['theme', 'menu', 'position']) === 'site-first'): ?>
<!-- Menu dans le site avant la bannière -->
<nav>
<div id="toggle"><?php echo template::ico('menu'); ?></div>
<div id="menu" class="container">
<?php $layout->showMenu(); ?>
</div>
</nav>
<?php endif; ?>
<?php if(
$this->getData(['theme', 'header', 'position']) === 'site'
// Affiche toujours la bannière pour l'édition du thème
OR (
$this->getData(['theme', 'header', 'position']) === 'hide'
AND $this->getUrl(0) === 'theme'
)
): ?>
<!-- Bannière dans le site -->
<?php
if ($this->getData(['theme','header','linkHome'])){
echo "<a href='" . helper::baseUrl(false) . "'>" ;} ?>
<header <?php if($this->getData(['theme', 'header', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
<?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')
): ?>
<div class="container">
<span><?php echo $this->getData(['config', 'title']); ?></span>
</div>
<?php endif; ?>
</header>
<?php
if ($this->getData(['theme','header','linkHome'])){echo "</a>";} ?>
<?php endif; ?>
<?php if(
$this->getData(['theme', 'menu', 'position']) === 'site-second' ||
$this->getData(['theme', 'menu', 'position']) === 'site'
// Affiche toujours le menu pour l'édition du thème
OR (
$this->getData(['theme', 'menu', 'position']) === 'hide'
AND $this->getUrl(0) === 'theme'
)
): ?>
<!-- Menu dans le site après la bannière -->
<nav <?php if($this->getData(['theme', 'menu', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
<div id="toggle"><?php echo template::ico('menu'); ?></div>
<div id="menu" class="container">
<?php $layout->showMenu(); ?>
</div>
</nav>
<?php endif; ?>
<!-- Corps de page -->
<section>
<?php
// Gabarit :
// Récupérer la config de la page courante
$blocks = explode('-',$this->getData(['page',$this->getUrl(0),'block']));
// Initialiser
$blockleft=$blockright="";
switch (sizeof($blocks)) {
case 1 : // une colonne
$content = 'col'. $blocks[0] ;
break;
case 2 : // 2 blocks
if ($blocks[0] < $blocks[1]) { // détermine la position de la colonne
$blockleft = 'col'. $blocks[0];
$content = 'col'. $blocks[1] ;
} else {
$content = 'col' . $blocks[0];
$blockright = 'col' . $blocks[1];
}
break;
case 3 : // 3 blocks
$blockleft = 'col' . $blocks[0];
$content = 'col' . $blocks[1];
$blockright = 'col' . $blocks[2];
}
// Page pleine pour la configuration des modules et l'édition des pages
// ($this->getData(['page', $this->getUrl(2), 'moduleId']) == '' &&
// $this->getUrl(1) == 'config' || // Configuration d'un module en page pleine
// $this->getUrl(1) == 'data' || // données de formulaire en page pleine
// $this->getUrl(1) == 'comment' // données des commentaires en page pleine
if (sizeof($blocks) === 1 ||
!empty($this->getUrl(1)) ) { // Pleine page en mode configuration
$layout->showContent();
} else {
?>
<div class="row siteContainer">
<?php
if ($blockleft !== "") :?>
<div class="<?php echo $blockleft; ?>" id="contentLeft">
<?php
// Détermine si le bloc a un menu à inclure
$layout->showBarContentLeft();
// Type de menu affiché
// 0 : aucun
// 1 : menu complet
// 2 : sous-menu de la page parente
if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'displayMenu']) !== 'none') {
?> <div id="menuSideLeft"><?php
$layout->showMenuSide($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'displayMenu']) === 'parents' ? false : true);
?></div><?php
}
?>
</div>
<?php endif; ?>
<div class="<?php echo $content; ?>
" id="contentSite"><?php $layout->showContent(); ?>
</div>
<?php
if ($blockright !== "") :?>
<div class="<?php echo $blockright; ?>" id="contentRight">
<?php
// Détermine si le bloc a un menu à inclure
$layout->showBarContentRight();
// Type de menu affiché
// 0 : aucun
// 1 : menu complet
// 2 : sous-menu de la page parente
if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'displayMenu']) !== 'none') {
?> <div id="menuSideRight"><?php
$layout->showMenuSide($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'displayMenu']) === 'parents' ? false : true);
?></div><?php
}
?>
</div>
<?php endif; ?>
</div>
<?php } ?>
</section>
<!-- footer -->
<?php if(
$this->getData(['theme', 'footer', 'position']) === 'site'
// Affiche toujours le pied de page pour l'édition du thème
OR (
$this->getData(['theme', 'footer', 'position']) === 'hide'
AND $this->getUrl(0) === 'theme'
)
): ?>
<!-- Pied de page dans le site -->
<footer <?php if($this->getData(['theme', 'footer', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
<div class="container">
<div class="row" id="footersite">
<div class="col4" id="footersiteLeft"> <!-- bloc gauche -->
<?php
if($this->getData(['theme', 'footer', 'textPosition']) === 'left') {
$layout->showFooterText();}
?>
<?php
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'left') {
$layout->showSocials(); }
?>
<?php
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'left') {
$layout->showCopyright(); }
?>
</div>
<div class="col4" id="footersiteCenter"> <!-- bloc central -->
<?php
if($this->getData(['theme', 'footer', 'textPosition']) === 'center') {
$layout->showFooterText(); }
?>
<?php
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'center') {
$layout->showSocials(); }
?>
<?php
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'center') {
$layout->showCopyright(); }
?>
</div>
<div class="col4" id="footersiteRight"> <!-- bloc droite -->
<?php
if($this->getData(['theme', 'footer', 'textPosition']) === 'right') {
$layout->showFooterText(); }
?>
<?php
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'right') {
$layout->showSocials(); }
?>
<?php
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'right') {
$layout->showCopyright(); }
?>
</div>
</div>
</div>
</footer>
<?php endif; ?>
</div>
<?php if($this->getData(['theme', 'footer', 'position']) === 'body'): ?>
<!-- Pied de page dans le fond du site -->
<footer>
<div class="container-large">
<div class="row" id="footerbody">
<div class="col4" id="footerbodyLeft"> <!-- bloc gauche -->
<?php
if($this->getData(['theme', 'footer', 'textPosition']) === 'left') {
$layout->showFooterText(); } <