Browse Source

[9.2.17] Fixed Body footer option

pull/5/head
Fred Tempez 2 years ago
parent
commit
3bb3f992ae
  1. 12
      core/layout/common.css
  2. 7
      core/layout/main.php
  3. 1
      core/module/theme/theme.php
  4. 12
      core/module/theme/view/footer/footer.js.php
  5. 9
      core/module/theme/view/footer/footer.php
  6. 4
      core/module/theme/view/index/index.css

12
core/layout/common.css

@ -563,9 +563,11 @@ ul .menuSideChild, li .menuSideChild {
section {
min-height: 450px;
}
section #sectionTitle {
margin-top: 0;
}
.userLogin, .updateForm {
min-height: 0px;
}
@ -598,6 +600,16 @@ footer {
margin: 0;
}
.footerbodyFixed {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index:50;
background-color: inherit;
padding: inherit;
}
#footersiteRight, #footersiteLeft, #footersiteCenter,
#footerbodyRight, #footerbodyLeft, #footerbodyCenter {
vertical-align: middle;

7
core/layout/main.php

@ -212,7 +212,10 @@
)
) { $position = 'site'; } else {
$position = 'body';
echo '</div>';
if ( $this->getData(['theme', 'footer', 'fixed']) === true) {
$positionFixed = 'footerbodyFixed';
}
echo '</div>';
}
?>
<!-- Pied de page -->
@ -221,7 +224,7 @@
if ($position === 'site'): ?>
<div class="container"><div class="row" id="footersite">
<?php else: ?>
<div class="container-large"><div class="row" id="footerbody">
<div class="container-large <?php echo $positionFixed; ?>"><div class="row" id="footerbody">
<?php endif?>
<!-- Mise en page -->
<?php switch($this->getData(['theme', 'footer', 'template'])) {

1
core/module/theme/theme.php

@ -317,6 +317,7 @@ class theme extends common {
'loginLink' => $this->getInput('themeFooterLoginLink'),
'margin' => $this->getInput('themeFooterMargin', helper::FILTER_BOOLEAN),
'position' => $this->getInput('themeFooterPosition'),
'fixed' => $this->getInput('themeFooterFixed', helper::FILTER_BOOLEAN),
'socialsAlign' => $this->getInput('themeFooterSocialsAlign'),
'text' => $this->getInput('themeFooterText', null),
'textAlign' => $this->getInput('themeFooterTextAlign'),

12
core/module/theme/view/footer/footer.js.php

@ -207,7 +207,17 @@ $("#themeFooterCopyrightPosition").on("change", function() {
}
}
}).trigger("change");
// Affiche / Cache les options du footer fixe
$("#themeFooterPosition").on("change", function() {
if($(this).val() === 'body') {
$("#themeFooterPositionFixed").slideDown();
}
else {
$("#themeFooterPositionFixed").slideUp(function() {
$("#themeFooterPositionFixed").prop("checked", false).trigger("change");
});
}
}).trigger("change");
// Lien de connexion
$("#themeFooterLoginLink").on("change", function() {

9
core/module/theme/view/footer/footer.php

@ -196,7 +196,14 @@
'checked' => $this->getData(['theme', 'footer', 'margin'])
]); ?>
</div>
</div>
</div>
<div class="col6">
<div id="themeFooterPositionFixed" class="displayNone">
<?php echo template::checkbox('themeFooterFixed', true, 'Pied de page fixe', [
'checked' => $this->getData(['theme', 'footer', 'fixed'])
]); ?>
</div>
</div>
</div>
</div>
</div>

4
core/module/theme/view/index/index.css

@ -19,6 +19,10 @@ footer {
position: relative;
z-index: 10;
}
.footerbodyFixed {
position: relative;
z-index: 5;
}
nav li ul {
display: none;
}

Loading…
Cancel
Save