diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..fa68f7f9 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,13 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. + // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp + + // List of extensions which should be recommended for users of this workspace. + "recommendations": [ + + ], + // List of extensions recommended by VS Code that should not be recommended for users of this workspace. + "unwantedRecommendations": [ + + ] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..2e67e845 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,22 @@ +{ + // Utilisez IntelliSense pour en savoir plus sur les attributs possibles. + // Pointez pour afficher la description des attributs existants. + // Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Listen for XDebug", + "type": "php", + "request": "launch", + "port": 9000 + }, + { + "name": "Launch currently open script", + "type": "php", + "request": "launch", + "program": "${file}", + "cwd": "${fileDirname}", + "port": 9000 + } + ] +} \ No newline at end of file diff --git a/core/core.php b/core/core.php index efc0de79..3eb3d5e0 100644 --- a/core/core.php +++ b/core/core.php @@ -32,7 +32,7 @@ class common { const TEMP_DIR = 'site/tmp/'; // Numéro de version - const ZWII_VERSION = '9.1.13'; + const ZWII_VERSION = '9.1.14.dev'; public static $actions = []; public static $coreModuleIds = [ @@ -921,6 +921,12 @@ class common { $this->setData(['core', 'dataVersion', 9100]); $this->SaveData(); } + // Version 9.1.13 + if($this->getData(['core', 'dataVersion']) < 9113) { + $this->setData(['theme','footer','template', 3 ]); + $this->setData(['core', 'dataVersion', 9113]); + $this->SaveData(); + } } } @@ -1077,13 +1083,15 @@ class core extends common { // Pied de page $colors = helper::colorVariants($this->getData(['theme', 'footer', 'backgroundColor'])); if($this->getData(['theme', 'footer', 'margin'])) { - $css .= 'footer{margin:0 20px 20px}'; + $css .= 'footer{margin:0 10px 10px;padding: 1px 10px;}'; + } else { + $css .= 'footer{margin:0;padding:0}'; } $css .= 'footer span{color:' . $this->getData(['theme', 'footer', 'textColor']) . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'footer', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'footer', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'footer', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'footer', 'textTransform']) . '}'; $css .= 'footer{background-color:' . $colors['normal'] . ';color:' . $this->getData(['theme', 'footer', 'textColor']) . '}'; $css .= 'footer a{color:' . $this->getData(['theme', 'footer', 'textColor']) . '}'; - $css .= 'footer .container > div{margin:' . $this->getData(['theme', 'footer', 'height']) . ' 0}'; - $css .= 'footer .container-large > div{margin:' . $this->getData(['theme', 'footer', 'height']) . ' 0}'; + //$css .= 'footer .container > div {padding:' . $this->getData(['theme', 'footer', 'height']) . ' 0}'; + $css .= '#footersiteLeft, #footersiteCenter, #footersiteRight {padding:' . $this->getData(['theme', 'footer', 'height']) . ' 0}'; $css .= '#footerSocials{text-align:' . $this->getData(['theme', 'footer', 'socialsAlign']) . '}'; $css .= '#footerText{text-align:' . $this->getData(['theme', 'footer', 'textAlign']) . '}'; $css .= '#footerCopyright{text-align:' . $this->getData(['theme', 'footer', 'copyrightAlign']) . '}'; @@ -1918,6 +1926,15 @@ class layout extends common { } } + /** + * Affiche le texte du footer + */ + public function showFooterText() { + if($footerText = $this->getData(['theme', 'footer', 'text']) OR $this->getUrl(0) === 'theme') { + echo '
' . nl2br($footerText) . '
'; + } + } + /** * Affiche le copyright */ @@ -1938,12 +1955,20 @@ class layout extends common { $items .= $this->getData(['theme','footer','displayVersion']) === false ? ' class="displayNone"' : ''; $items .= '> '. common::ZWII_VERSION ; $items .= ''; - // Affichage du lien de connexion + // Affichage du sitemap $items .= 'getData(['theme','footer','displaySiteMap']) === false? ' class="displayNone"' : ''; $items .= '> | Plan du site'; $items .= ''; - if( + // Affichage des mentions légales + $items .= 'getData(['theme','footer','legalPageId']) === '' ? ' class="displayNone" >' : '>'; + if ($this->getData(['theme','footer','legalPageId']) !== '') { + $items .= ' | Mentions légales'; + } + $items .= ''; + // Affichage du lien de connexion + if( ( $this->getData(['theme', 'footer', 'loginLink']) AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') @@ -1959,7 +1984,57 @@ class layout extends common { // Fermeture du bloc copyright $items .= ''; echo $items; - } + } + + + /** + * Affiche les réseaux sociaux + */ + public function showSocials() { + $socials = ''; + foreach($this->getData(['config', 'social']) as $socialName => $socialId) { + switch($socialName) { + case 'facebookId': + $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'; + break; + case 'pinterestId': + $socialUrl = 'https://pinterest.com/'; + $title = 'Pinterest'; + break; + case 'twitterId': + $socialUrl = 'https://twitter.com/'; + $title = 'Twitter'; + break; + case 'youtubeId': + $socialUrl = 'https://www.youtube.com/channel/'; + $title = 'YouTube'; + break; + case 'githubId': + $socialUrl = 'https://www.github.com/'; + $title = 'Github'; + break; + default: + $socialUrl = ''; + } + if($socialId !== '') { + $socials .= '' . template::ico(substr($socialName, 0, -2)) . ''; + } + } + if($socials !== '') { + echo '
' . $socials . '
'; + } + } + + /** * Affiche le favicon @@ -1975,14 +2050,6 @@ class layout extends common { } } - /** - * Affiche le texte du footer - */ - public function showFooterText() { - if($footerText = $this->getData(['theme', 'footer', 'text']) OR $this->getUrl(0) === 'theme') { - echo '
' . nl2br($footerText) . '
'; - } - } /** * Affiche le menu @@ -2383,53 +2450,6 @@ class layout extends common { } } - /** - * Affiche les réseaux sociaux - */ - public function showSocials() { - $socials = ''; - foreach($this->getData(['config', 'social']) as $socialName => $socialId) { - switch($socialName) { - case 'facebookId': - $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'; - break; - case 'pinterestId': - $socialUrl = 'https://pinterest.com/'; - $title = 'Pinterest'; - break; - case 'twitterId': - $socialUrl = 'https://twitter.com/'; - $title = 'Twitter'; - break; - case 'youtubeId': - $socialUrl = 'https://www.youtube.com/channel/'; - $title = 'YouTube'; - break; - case 'githubId': - $socialUrl = 'https://www.github.com/'; - $title = 'Github'; - break; - default: - $socialUrl = ''; - } - if($socialId !== '') { - $socials .= '' . template::ico(substr($socialName, 0, -2)) . ''; - } - } - if($socials !== '') { - echo '
' . $socials . '
'; - } - } - /** * Affiche l'import des librairies */ diff --git a/core/layout/common.css b/core/layout/common.css index 7d5bf275..a42eca8c 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -570,13 +570,21 @@ body > footer { } footer { padding: 1px 20px; +} + +#footersiteRight, #footersiteLeft, #footersiteCenter { vertical-align: middle; } +#footersite { + margin: 0; +} + #footerLoginLink, #footerDisplayCopyright, #footerDisplayVersion, #footerDisplaySiteMap, +#footerDisplayLegal, #footerZwiiCMS { font-size: inherit; } diff --git a/core/layout/main.php b/core/layout/main.php index 8955d3b1..fd861806 100755 --- a/core/layout/main.php +++ b/core/layout/main.php @@ -196,117 +196,70 @@ ?> - 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' ) - ): ?> - - -