diff --git a/core/module/theme/view/site/site.css b/core/module/theme/view/site/site.css index 94be3bfa..3a9ba1db 100644 --- a/core/module/theme/view/site/site.css +++ b/core/module/theme/view/site/site.css @@ -29,4 +29,11 @@ textarea, .button.buttonGrey, .button.buttonGrey:hover { color: rgba(33, 34, 35, 1); +} + +div.preview { + border-radius: 2%; + -webkit-box-shadow: 5px 5px 5px 2px rgba(0,0,0,0.75); + -moz-box-shadow: 5px 5px 5px 2px rgba(0,0,0,0.75); + box-shadow: 5px 5px 5px 2px rgba(0,0,0,0.75); } \ No newline at end of file diff --git a/core/module/theme/view/site/site.js.php b/core/module/theme/view/site/site.js.php index 21c0daf9..a1f3ec6b 100755 --- a/core/module/theme/view/site/site.js.php +++ b/core/module/theme/view/site/site.js.php @@ -10,6 +10,37 @@ * @link http://zwiicms.com/ */ + /* + * Chargement de l'aperçu + */ +$( document ).ready(function() { + + + // Import des polices de caractères + var titleFont = $("#themeTitleFont").val(); + var textFont = $("#themeTextFont").val(); + var css = "@import url('https://fonts.googleapis.com/css?family=" + titleFont + "|" + textFont + "');"; + var colors = core.colorVariants($("#themeButtonBackgroundColor").val()); + + + css += "h1.preview,h3.preview{color:" + $("#themeTitleTextColor").val() + ";font-family:'" + titleFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeTitleFontWeight").val() + ";text-transform:" + $("#themeTitleTextTransform").val() + "}"; + css += "p.preview{color:" + $("#themeTextTextColor").val() + "}"; + css += "div.preview{background-color:" + $("#themeSiteBackgroundColor").val() + ";}"; + + // Couleurs des liens + colors = core.colorVariants($("#themeLinkTextColor").val()); + css += "a.preview{color:" + colors.normal + "}"; + css += "a.preview:hover{color:" + colors.darken + "}"; + + // Paramètrage du DOM + $("#themePreview").remove(); + $("