forked from ZwiiCMS-Team/ZwiiCMS
Aperçu à finir
This commit is contained in:
parent
8fdac9753e
commit
f5ea37e3b5
@ -74,7 +74,9 @@
|
||||
<span id="themeHeaderTitle"> </span>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<div id="featureContent">
|
||||
<?php echo $this->getData(['theme','header','featureContent']);?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div> <!--fin container -->
|
||||
</header>
|
||||
@ -128,7 +130,9 @@
|
||||
<span id="themeHeaderTitle"> </span>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<div id="featureContent">
|
||||
<?php echo $this->getData(['theme','header','featureContent']);?>
|
||||
</diV>
|
||||
<?php endif; ?>
|
||||
</div> <!--fin container -->
|
||||
</header>
|
||||
|
@ -22,67 +22,22 @@
|
||||
*/
|
||||
$("input, select").on("change", function() {
|
||||
|
||||
// Affiche / Cache les options de l'image du fond
|
||||
$("#themeHeaderImage").on("change", function() {
|
||||
if($(this).val()) {
|
||||
$("#themeHeaderImageOptions").slideDown();
|
||||
}
|
||||
else {
|
||||
$("#themeHeaderImageOptions").slideUp(function() {
|
||||
$("#themeHeaderTextHide").prop("checked", false).trigger("change");
|
||||
});
|
||||
}
|
||||
}).trigger("change");
|
||||
|
||||
// Affiche / Cache les options de la position
|
||||
$("#themeHeaderPosition").on("change", function() {
|
||||
if($(this).val() === 'site') {
|
||||
$("#themeHeaderPositionOptions").slideDown();
|
||||
}
|
||||
else {
|
||||
$("#themeHeaderPositionOptions").slideUp(function() {
|
||||
$("#themeHeaderMargin").prop("checked", false).trigger("change");
|
||||
});
|
||||
}
|
||||
}).trigger("change");
|
||||
|
||||
// Affiche / Cache les options de la bannière cliquable si pas masquée
|
||||
$("#themeHeaderPosition").on("change", function() {
|
||||
if($(this).val() === 'hide') {
|
||||
$("#themeHeaderShow").slideUp(function() {
|
||||
$("#themeHeaderlinkHome").prop("checked", false).trigger("change");
|
||||
});
|
||||
}
|
||||
else {
|
||||
$("#themeHeaderShow").slideDown();
|
||||
}
|
||||
}).trigger("change");
|
||||
|
||||
// Affiche / Cache l'option bannière masquée en écran réduit
|
||||
$("#themeHeaderPosition").on("change", function() {
|
||||
if($(this).val() === 'hide') {
|
||||
$("#themeHeaderSmallDisplay").slideUp();
|
||||
}
|
||||
else {
|
||||
$("#themeHeaderSmallDisplay").slideDown();
|
||||
}
|
||||
}).trigger("change");
|
||||
|
||||
// Affiche les blocs selon le type bannière
|
||||
$("#themeHeaderFeature").on("change", function() {
|
||||
if($(this).val() === 'wallpaper') {
|
||||
$(".wallpaperContainer").show();
|
||||
$(".featureContainer").hide();
|
||||
}
|
||||
if($(this).val() === 'feature') {
|
||||
$(".featureContainer").show();
|
||||
$(".wallpaperContainer").hide();
|
||||
|
||||
}
|
||||
}).trigger("change");
|
||||
// Contenu perso
|
||||
if ($("#themeHeaderFeature").val() == "feature") {
|
||||
css += "header{height:" + $("#themeHeaderHeight").val() + ";}";
|
||||
$("#featureContent").appendTo("#headerContainer").show();
|
||||
$("#themeHeaderTitle").hide();
|
||||
$("header").css("background-color", "");
|
||||
$("header").css("background-image", "none");
|
||||
$("header").css("height", "");
|
||||
$("header").css("line-height", "1.5");
|
||||
$("header").css("text-align", "");
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Couleurs, image, alignement et hauteur de la bannière
|
||||
if ($("#themeHeaderFeature").val() == "wallpaper") {
|
||||
|
||||
// Récupérer la taille de l'image
|
||||
var tmpImg = new Image();
|
||||
@ -124,9 +79,6 @@ $("input, select").on("change", function() {
|
||||
var headerFont = $("#themeHeaderFont").val();
|
||||
var css = "@import url('https://fonts.googleapis.com/css?family=" + headerFont + "');";
|
||||
|
||||
// Couleurs, image, alignement et hauteur de la bannière
|
||||
console.log ($("#themeHeaderFeature").val());
|
||||
if ($("#themeHeaderFeature").val() == "wallpaper") {
|
||||
css += "header{background-color:" + $("#themeHeaderBackgroundColor").val() + ";text-align:" + $("#themeHeaderTextAlign").val() + ";";
|
||||
if ($("#themeHeaderImage").val()) {
|
||||
// Une image est sélectionnée
|
||||
@ -138,10 +90,7 @@ $("input, select").on("change", function() {
|
||||
css += "background-image:none;";
|
||||
}
|
||||
css += "line-height:" + $("#themeHeaderHeight").val() + ";height:" + $("#themeHeaderHeight").val() + "}";
|
||||
}
|
||||
if ($("#themeHeaderFeature").val() == "feature") {
|
||||
css += "header{height:" + $("#themeHeaderHeight").val() + ";}";
|
||||
}
|
||||
|
||||
|
||||
// Taille, couleur, épaisseur et capitalisation du titre de la bannière
|
||||
css += "header span{color:" + $("#themeHeaderTextColor").val() + ";font-family:'" + headerFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeHeaderFontWeight").val() + ";font-size:" + $("#themeHeaderFontSize").val() + ";text-transform:" + $("#themeHeaderTextTransform").val() + "}";
|
||||
@ -158,14 +107,13 @@ $("input, select").on("change", function() {
|
||||
if($("#themeHeaderMargin").is(":checked")) {
|
||||
if(<?php echo json_encode($this->getData(['theme', 'menu', 'position']) === 'site-first'); ?>) {
|
||||
css += 'header{margin:0 20px}';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
css += 'header{margin:20px 20px 0 20px}';
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
css += 'header{margin:0}';
|
||||
}
|
||||
}
|
||||
|
||||
// Position de la bannière
|
||||
var positionNav = <?php echo json_encode($this->getData(['theme', 'menu', 'position'])); ?>;
|
||||
@ -239,3 +187,60 @@ $("input, select").on("change", function() {
|
||||
.appendTo("head");
|
||||
}).trigger("change");
|
||||
|
||||
// Affiche / Cache les options de l'image du fond
|
||||
$("#themeHeaderImage").on("change", function() {
|
||||
if($(this).val()) {
|
||||
$("#themeHeaderImageOptions").slideDown();
|
||||
}
|
||||
else {
|
||||
$("#themeHeaderImageOptions").slideUp(function() {
|
||||
$("#themeHeaderTextHide").prop("checked", false).trigger("change");
|
||||
});
|
||||
}
|
||||
}).trigger("change");
|
||||
|
||||
// Affiche / Cache les options de la position
|
||||
$("#themeHeaderPosition").on("change", function() {
|
||||
if($(this).val() === 'site') {
|
||||
$("#themeHeaderPositionOptions").slideDown();
|
||||
}
|
||||
else {
|
||||
$("#themeHeaderPositionOptions").slideUp(function() {
|
||||
$("#themeHeaderMargin").prop("checked", false).trigger("change");
|
||||
});
|
||||
}
|
||||
}).trigger("change");
|
||||
|
||||
// Affiche / Cache les options de la bannière cliquable si pas masquée
|
||||
$("#themeHeaderPosition").on("change", function() {
|
||||
if($(this).val() === 'hide') {
|
||||
$("#themeHeaderShow").slideUp(function() {
|
||||
$("#themeHeaderlinkHome").prop("checked", false).trigger("change");
|
||||
});
|
||||
}
|
||||
else {
|
||||
$("#themeHeaderShow").slideDown();
|
||||
}
|
||||
}).trigger("change");
|
||||
|
||||
// Affiche / Cache l'option bannière masquée en écran réduit
|
||||
$("#themeHeaderPosition").on("change", function() {
|
||||
if($(this).val() === 'hide') {
|
||||
$("#themeHeaderSmallDisplay").slideUp();
|
||||
}
|
||||
else {
|
||||
$("#themeHeaderSmallDisplay").slideDown();
|
||||
}
|
||||
}).trigger("change");
|
||||
|
||||
// Affiche les blocs selon le type bannière
|
||||
$("#themeHeaderFeature").on("change", function() {
|
||||
if($(this).val() === 'wallpaper') {
|
||||
$(".wallpaperContainer").show();
|
||||
$(".featureContainer").hide();
|
||||
}
|
||||
if($(this).val() === 'feature') {
|
||||
$(".featureContainer").show();
|
||||
$(".wallpaperContainer").hide();
|
||||
}
|
||||
}).trigger("change");
|
@ -201,4 +201,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="featureContent" class="displayNone">
|
||||
<?php echo $this->getData(['theme','header','featureContent']);?>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user