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>
|
<span id="themeHeaderTitle"> </span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
<div id="featureContent">
|
||||||
<?php echo $this->getData(['theme','header','featureContent']);?>
|
<?php echo $this->getData(['theme','header','featureContent']);?>
|
||||||
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div> <!--fin container -->
|
</div> <!--fin container -->
|
||||||
</header>
|
</header>
|
||||||
@ -128,7 +130,9 @@
|
|||||||
<span id="themeHeaderTitle"> </span>
|
<span id="themeHeaderTitle"> </span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
<div id="featureContent">
|
||||||
<?php echo $this->getData(['theme','header','featureContent']);?>
|
<?php echo $this->getData(['theme','header','featureContent']);?>
|
||||||
|
</diV>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div> <!--fin container -->
|
</div> <!--fin container -->
|
||||||
</header>
|
</header>
|
||||||
|
@ -22,67 +22,22 @@
|
|||||||
*/
|
*/
|
||||||
$("input, select").on("change", function() {
|
$("input, select").on("change", function() {
|
||||||
|
|
||||||
// Affiche / Cache les options de l'image du fond
|
// Contenu perso
|
||||||
$("#themeHeaderImage").on("change", function() {
|
if ($("#themeHeaderFeature").val() == "feature") {
|
||||||
if($(this).val()) {
|
css += "header{height:" + $("#themeHeaderHeight").val() + ";}";
|
||||||
$("#themeHeaderImageOptions").slideDown();
|
$("#featureContent").appendTo("#headerContainer").show();
|
||||||
}
|
$("#themeHeaderTitle").hide();
|
||||||
else {
|
$("header").css("background-color", "");
|
||||||
$("#themeHeaderImageOptions").slideUp(function() {
|
$("header").css("background-image", "none");
|
||||||
$("#themeHeaderTextHide").prop("checked", false).trigger("change");
|
$("header").css("height", "");
|
||||||
});
|
$("header").css("line-height", "1.5");
|
||||||
}
|
$("header").css("text-align", "");
|
||||||
}).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");
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Couleurs, image, alignement et hauteur de la bannière
|
||||||
|
if ($("#themeHeaderFeature").val() == "wallpaper") {
|
||||||
|
|
||||||
// Récupérer la taille de l'image
|
// Récupérer la taille de l'image
|
||||||
var tmpImg = new Image();
|
var tmpImg = new Image();
|
||||||
@ -124,9 +79,6 @@ $("input, select").on("change", function() {
|
|||||||
var headerFont = $("#themeHeaderFont").val();
|
var headerFont = $("#themeHeaderFont").val();
|
||||||
var css = "@import url('https://fonts.googleapis.com/css?family=" + headerFont + "');";
|
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() + ";";
|
css += "header{background-color:" + $("#themeHeaderBackgroundColor").val() + ";text-align:" + $("#themeHeaderTextAlign").val() + ";";
|
||||||
if ($("#themeHeaderImage").val()) {
|
if ($("#themeHeaderImage").val()) {
|
||||||
// Une image est sélectionnée
|
// Une image est sélectionnée
|
||||||
@ -138,10 +90,7 @@ $("input, select").on("change", function() {
|
|||||||
css += "background-image:none;";
|
css += "background-image:none;";
|
||||||
}
|
}
|
||||||
css += "line-height:" + $("#themeHeaderHeight").val() + ";height:" + $("#themeHeaderHeight").val() + "}";
|
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
|
// 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() + "}";
|
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($("#themeHeaderMargin").is(":checked")) {
|
||||||
if(<?php echo json_encode($this->getData(['theme', 'menu', 'position']) === 'site-first'); ?>) {
|
if(<?php echo json_encode($this->getData(['theme', 'menu', 'position']) === 'site-first'); ?>) {
|
||||||
css += 'header{margin:0 20px}';
|
css += 'header{margin:0 20px}';
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
css += 'header{margin:20px 20px 0 20px}';
|
css += 'header{margin:20px 20px 0 20px}';
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
css += 'header{margin:0}';
|
css += 'header{margin:0}';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Position de la bannière
|
// Position de la bannière
|
||||||
var positionNav = <?php echo json_encode($this->getData(['theme', 'menu', 'position'])); ?>;
|
var positionNav = <?php echo json_encode($this->getData(['theme', 'menu', 'position'])); ?>;
|
||||||
@ -239,3 +187,60 @@ $("input, select").on("change", function() {
|
|||||||
.appendTo("head");
|
.appendTo("head");
|
||||||
}).trigger("change");
|
}).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>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="featureContent" class="displayNone">
|
||||||
|
<?php echo $this->getData(['theme','header','featureContent']);?>
|
||||||
|
</div>
|
||||||
<?php echo template::formClose(); ?>
|
<?php echo template::formClose(); ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user