forked from ZwiiCMS-Team/ZwiiCMS
[9.1.13] nouveau footer à tester
This commit is contained in:
parent
c164d819e9
commit
b1aa2df3d7
114
core/core.php
114
core/core.php
@ -1922,6 +1922,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 '<div id="footerText"><span id="footerFontText">' . nl2br($footerText) . '</span></div>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le copyright
|
||||
*/
|
||||
@ -1965,6 +1974,56 @@ class layout extends common {
|
||||
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 .= '<a href="' . $socialUrl . $socialId . '" onclick="window.open(this.href);return false" data-tippy-content="' . $title . '">' . template::ico(substr($socialName, 0, -2)) . '</a>';
|
||||
}
|
||||
}
|
||||
if($socials !== '') {
|
||||
echo '<div id="footerSocials">' . $socials . '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Affiche le favicon
|
||||
*/
|
||||
@ -1979,14 +2038,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 '<div id="footerText"><span id="footerFontText">' . nl2br($footerText) . '</span></div>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le menu
|
||||
@ -2387,53 +2438,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 .= '<a href="' . $socialUrl . $socialId . '" onclick="window.open(this.href);return false" data-tippy-content="' . $title . '">' . template::ico(substr($socialName, 0, -2)) . '</a>';
|
||||
}
|
||||
}
|
||||
if($socials !== '') {
|
||||
echo '<div id="footerSocials">' . $socials . '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche l'import des librairies
|
||||
*/
|
||||
|
@ -565,14 +565,17 @@ section:after {
|
||||
}
|
||||
|
||||
/* Pied de page */
|
||||
footer {
|
||||
padding: 1px 20px;
|
||||
}
|
||||
body > footer {
|
||||
margin: 0 -10px;
|
||||
}
|
||||
footer {
|
||||
padding: 1px 20px;
|
||||
#footersiteLeft, #footersiteCenter, #footersiteRight {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
#footerLoginLink,
|
||||
#footerDisplayCopyright,
|
||||
#footerDisplayVersion,
|
||||
|
@ -196,117 +196,70 @@
|
||||
?>
|
||||
</section>
|
||||
<!-- footer -->
|
||||
<?php if(
|
||||
|
||||
<?php
|
||||
|
||||
// Déterminer la position
|
||||
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 -->
|
||||
|
||||
) { $position = 'site'; } else {
|
||||
$position = 'body';
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
<!-- Pied de page -->
|
||||
<footer <?php if($this->getData(['theme', 'footer', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
|
||||
<?php
|
||||
if ($position === 'site'): ?>
|
||||
<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>
|
||||
<?php else: ?>
|
||||
<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(); }
|
||||
<?php endif?>
|
||||
<!-- Mise en page -->
|
||||
<?php switch($this->getData(['theme', 'footer', 'template'])) {
|
||||
case '1' :
|
||||
$class['left'] = "displayNone";
|
||||
$class['center'] = "col12";
|
||||
$class['right'] = "displayNone";
|
||||
break;
|
||||
case '2' :
|
||||
$class['left'] = "col6";
|
||||
$class['center'] = "displayNone";
|
||||
$class['right'] = "col6";
|
||||
break;
|
||||
case '3' :
|
||||
$class['left'] = "col4";
|
||||
$class['center'] = "col4";
|
||||
$class['right'] = "col4";
|
||||
break;
|
||||
}?>
|
||||
<div class="row" id="footer<?php echo $position; ?>">
|
||||
<div class="<?php echo $class['left'];?>" id="footer<?php echo $position; ?>Left"> <!-- bloc gauche -->
|
||||
<?php if($this->getData(['theme', 'footer', 'textPosition']) === 'left') { $layout->showFooterText(); }
|
||||
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'left') { $layout->showSocials(); }
|
||||
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 class="<?php echo $class['center'];?>" id="footer<?php echo $position; ?>Center"> <!-- bloc central -->
|
||||
<?php if($this->getData(['theme', 'footer', 'textPosition']) === 'center') { $layout->showFooterText(); }
|
||||
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'center') { $layout->showSocials(); }
|
||||
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(); }
|
||||
<div class="<?php echo $class['right'];?>" id="footer<?php echo $position; ?>Right"> <!-- bloc droite -->
|
||||
<?php if($this->getData(['theme', 'footer', 'textPosition']) === 'right') { $layout->showFooterText(); }
|
||||
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'right') { $layout->showSocials(); }
|
||||
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'right') { $layout->showCopyright(); }
|
||||
?>
|
||||
<?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>
|
||||
<!-- Lien remonter en haut -->
|
||||
<div id="backToTop"><?php echo template::ico('up'); ?></div>
|
||||
<?php $layout->showScript();?>
|
||||
|
@ -295,7 +295,8 @@ class theme extends common {
|
||||
'fontWeight' => $this->getInput('themeFooterFontWeight'),
|
||||
'displayVersion' => $this->getInput('themefooterDisplayVersion', helper::FILTER_BOOLEAN),
|
||||
'displaySiteMap' => $this->getInput('themefooterDisplaySiteMap', helper::FILTER_BOOLEAN),
|
||||
'displayCopyright' => $this->getInput('themefooterDisplayCopyright', helper::FILTER_BOOLEAN)
|
||||
'displayCopyright' => $this->getInput('themefooterDisplayCopyright', helper::FILTER_BOOLEAN),
|
||||
'template' => $this->getInput('themeFooterTemplate',helper::FILTER_INT)
|
||||
]]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
|
@ -97,6 +97,8 @@
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Mise en page</h4>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::select('themeFooterTemplate', $module::$footerTemplate, [
|
||||
'label' => 'Nombre de colonnes',
|
||||
'selected' => $this->getData(['theme', 'footer', 'template']),
|
||||
@ -104,68 +106,62 @@
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Contenu personnalisé</h4>
|
||||
<?php echo template::textarea('themeFooterText', [
|
||||
//'label' => 'Contenu (texte ou HTML)',
|
||||
'value' => $this->getData(['theme', 'footer', 'text']),
|
||||
'class' => 'editorWysiwyg'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Contenu personnalisé</h4>
|
||||
<div class="col4">
|
||||
<p><strong>Contenu personnalisé texte ou HTML :</strong></p>
|
||||
<?php echo template::select('themeFooterTextPosition', $module::$footerblocks, [
|
||||
'label' => 'Emplacement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'textPosition']),
|
||||
'class' => 'themeFooterPosition'
|
||||
]); ?>
|
||||
<?php echo template::select('themeFooterTextAlign', $module::$aligns, [
|
||||
'label' => 'Alignement horizontal',
|
||||
'label' => 'Alignement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'textAlign'])
|
||||
]); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Contenu réseaux sociaux</h4>
|
||||
<div class="col4">
|
||||
<p><strong>Réseaux sociaux :</strong></p>
|
||||
<?php echo template::select('themeFooterSocialsPosition', $module::$footerblocks, [
|
||||
'label' => 'Emplacement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'socialsPosition']),
|
||||
'class' => 'themeFooterPosition'
|
||||
]); ?>
|
||||
<?php echo template::select('themeFooterSocialsAlign', $module::$aligns, [
|
||||
'label' => 'Alignement horizontal',
|
||||
'label' => 'Alignement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'socialsAlign'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Contenu copyright</h4>
|
||||
<div class="row">
|
||||
<div class="col5">
|
||||
<div class="col4">
|
||||
<p><strong>Info et copyright :</strong></p>
|
||||
<?php echo template::select('themeFooterCopyrightPosition', $module::$footerblocks, [
|
||||
'label' => 'Emplacement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'copyrightPosition']),
|
||||
'class' => 'themeFooterPosition'
|
||||
]); ?>
|
||||
<?php echo template::select('themeFooterCopyrightAlign', $module::$aligns, [
|
||||
'label' => 'Alignement horizontal',
|
||||
'label' => 'Alignement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'copyrightAlign'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6 offset1">
|
||||
<p>Insérer les éléments suivants :</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Contenu des blocs</h4>
|
||||
<?php echo template::textarea('themeFooterText', [
|
||||
'label' => '<strong>Texte ou HTML personnalisé :</strong>',
|
||||
'value' => $this->getData(['theme', 'footer', 'text']),
|
||||
'class' => 'editorWysiwyg'
|
||||
]); ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Contenu du bloc "Info et copyright" :</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('themefooterDisplayCopyright', true, 'Mention "Motorisé par"', [
|
||||
'checked' => $this->getData(['theme', 'footer','displayCopyright'])
|
||||
@ -176,6 +172,8 @@
|
||||
'checked' => $this->getData(['theme', 'footer','displayVersion'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('themefooterDisplaySiteMap', true, 'Plan du site', [
|
||||
'checked' => $this->getData(['theme', 'footer', 'displaySiteMap']),
|
||||
@ -189,8 +187,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<p><em>La personnalisation des réseaux sociaux s'effectue dans la configuration du site.</em></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<?php echo template::formClose(); ?>
|
||||
|
Loading…
Reference in New Issue
Block a user