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
|
||||
*/
|
||||
$( document).ready(function() {
|
||||
$(document).ready(function() {
|
||||
|
||||
/**
|
||||
* Option de marge si la taille n'est pas fluide
|
||||
*/
|
||||
@ -23,22 +24,21 @@ $( document).ready(function() {
|
||||
} else {
|
||||
$("#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'])); ?>;
|
||||
css = "div.bodybackground{background-color:" + backgroundcolor + "; background-image: url(" + backgroundImage + ");background-size:cover;}";
|
||||
css += "div.bgPreview{padding: 5px;background-color:" + $("#themeSiteBackgroundColor").val() + ";}";
|
||||
$("#themePreview").remove();
|
||||
$("<style>")
|
||||
.attr("type", "text/css")
|
||||
.attr("id", "themePreview")
|
||||
.text(css)
|
||||
.appendTo("head");
|
||||
|
||||
// Charger l'aperçu initial
|
||||
previewDOM();
|
||||
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Aperçu en direct
|
||||
*/
|
||||
$("input, select").on("change",function() {
|
||||
previewDOM();
|
||||
});
|
||||
|
||||
function previewDOM() {
|
||||
|
||||
/**
|
||||
* Aperçu dans la boîte
|
||||
@ -113,4 +113,4 @@ $("input, select").on("change",function() {
|
||||
.text(css)
|
||||
.appendTo("head");
|
||||
|
||||
});
|
||||
};
|
||||
|
@ -87,8 +87,8 @@
|
||||
<div class="bgPreview">
|
||||
<div class="row">
|
||||
<div class="col8">
|
||||
<h1 class="headerPreview">Aperçu </h1>
|
||||
<h3 class="headerPreview">Sous-Titre </h3>
|
||||
<h1 class="headerPreview">Titre</h1>
|
||||
<h1 class="headerPreview">Sous-Titre </h1>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::button('themeSiteSubmitButtonPreview', [
|
||||
|
Loading…
Reference in New Issue
Block a user