forked from ZwiiCMS-Team/ZwiiCMS
10.1 aperçu thème du site
This commit is contained in:
parent
902d70a663
commit
d9359a60e2
@ -13,7 +13,8 @@
|
|||||||
/*
|
/*
|
||||||
* Chargement de l'aperçu
|
* Chargement de l'aperçu
|
||||||
*/
|
*/
|
||||||
$( document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Option de marge si la taille n'est pas fluide
|
* Option de marge si la taille n'est pas fluide
|
||||||
*/
|
*/
|
||||||
@ -23,22 +24,21 @@ $( document).ready(function() {
|
|||||||
} else {
|
} else {
|
||||||
$("#themeSiteMargin").addClass("enabled");
|
$("#themeSiteMargin").addClass("enabled");
|
||||||
}
|
}
|
||||||
var backgroundImage = <?php echo json_encode(helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme','body','image'])); ?>;
|
|
||||||
var backgroundcolor = <?php echo json_encode($this->getdata(['theme','body','backgroundColor'])); ?>;
|
// Charger l'aperçu initial
|
||||||
css = "div.bodybackground{background-color:" + backgroundcolor + "; background-image: url(" + backgroundImage + ");background-size:cover;}";
|
previewDOM();
|
||||||
css += "div.bgPreview{padding: 5px;background-color:" + $("#themeSiteBackgroundColor").val() + ";}";
|
|
||||||
$("#themePreview").remove();
|
|
||||||
$("<style>")
|
|
||||||
.attr("type", "text/css")
|
|
||||||
.attr("id", "themePreview")
|
|
||||||
.text(css)
|
|
||||||
.appendTo("head");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Aperçu en direct
|
* Aperçu en direct
|
||||||
*/
|
*/
|
||||||
$("input, select").on("change",function() {
|
$("input, select").on("change",function() {
|
||||||
|
previewDOM();
|
||||||
|
});
|
||||||
|
|
||||||
|
function previewDOM() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Aperçu dans la boîte
|
* Aperçu dans la boîte
|
||||||
@ -113,4 +113,4 @@ $("input, select").on("change",function() {
|
|||||||
.text(css)
|
.text(css)
|
||||||
.appendTo("head");
|
.appendTo("head");
|
||||||
|
|
||||||
});
|
};
|
||||||
|
@ -87,8 +87,8 @@
|
|||||||
<div class="bgPreview">
|
<div class="bgPreview">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col8">
|
<div class="col8">
|
||||||
<h1 class="headerPreview">Aperçu </h1>
|
<h1 class="headerPreview">Titre</h1>
|
||||||
<h3 class="headerPreview">Sous-Titre </h3>
|
<h1 class="headerPreview">Sous-Titre </h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php echo template::button('themeSiteSubmitButtonPreview', [
|
<?php echo template::button('themeSiteSubmitButtonPreview', [
|
||||||
|
Loading…
Reference in New Issue
Block a user