[9.2.25] css site

This commit is contained in:
Fred Tempez 2020-03-16 18:36:04 +01:00
parent 90a84b7084
commit bfb93cddd1

View File

@ -24,7 +24,7 @@ $( document ).ready(function() {
var colors = core.colorVariants($("#themeButtonBackgroundColor").val()); var colors = core.colorVariants($("#themeButtonBackgroundColor").val());
// Texte // Texte
css += "p.preview{color:" + $("#themeTextTextColor").val() + ";font-family:'" + textFont.replace(/\+/g, " ") + "',sans-serif}"; css += "p.preview {color:" + $("#themeTextTextColor").val() + ";font-family:'" + textFont.replace(/\+/g, " ") + "',sans-serif}";
// Titres // Titres
css += "h1.preview,h3.preview{color:" + $("#themeTitleTextColor").val() + ";font-family:'" + titleFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeTitleFontWeight").val() + ";text-transform:" + $("#themeTitleTextTransform").val() + "}"; css += "h1.preview,h3.preview{color:" + $("#themeTitleTextColor").val() + ";font-family:'" + titleFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeTitleFontWeight").val() + ";text-transform:" + $("#themeTitleTextTransform").val() + "}";
// Fond // Fond
@ -32,8 +32,9 @@ $( document ).ready(function() {
// Couleurs des liens // Couleurs des liens
colors = core.colorVariants($("#themeLinkTextColor").val()); colors = core.colorVariants($("#themeLinkTextColor").val());
css += "a.preview{color:" + colors.normal + "}"; css += "a.preview,.buttonPreview{color:" + colors.normal + "}";
css += "a.preview:hover{color:" + colors.darken + "}"; css += "a.preview:hover,.buttonPreview{color:" + colors.darken + "}";
css += "a.preview,.buttonPreview {font-family:'" + textFont.replace(/\+/g, " ") + "',sans-serif}";
// Paramètrage du DOM // Paramètrage du DOM
$("#themePreview").remove(); $("#themePreview").remove();
@ -54,13 +55,13 @@ $("input, select").on("change", function() {
var css = "@import url('https://fonts.googleapis.com/css?family=" + titleFont + "|" + textFont + "');"; var css = "@import url('https://fonts.googleapis.com/css?family=" + titleFont + "|" + textFont + "');";
// Couleurs des boutons // Couleurs des boutons
var colors = core.colorVariants($("#themeButtonBackgroundColor").val()); var colors = core.colorVariants($("#themeButtonBackgroundColor").val());
css += ".speechBubble,.button,.button:hover,button[type='submit'],.pagination a,.pagination a:hover,input[type='checkbox']:checked + label:before,.helpContent{background-color:" + colors.normal + ";color:" + colors.text + "}"; css += ".speechBubble,.button,.button:hover,.pagination a,.pagination a:hover,input[type='checkbox']:checked + label:before,.helpContent{background-color:" + colors.normal + ";color:" + colors.text + "}";
css += ".helpButton span{color:" + colors.normal + "}"; //css += ".helpButton span{color:" + colors.normal + "}";
//css += "input[type='text']:hover,input[type='password']:hover,.inputFile:hover,select:hover,textarea:hover{border-color:" + colors.normal + "}"; //css += "input[type='text']:hover,input[type='password']:hover,.inputFile:hover,select:hover,textarea:hover{border-color:" + colors.normal + "}";
css += ".speechBubble:before{border-color:" + colors.normal + " transparent transparent transparent}"; //css += ".speechBubble:before{border-color:" + colors.normal + " transparent transparent transparent}";
css += ".button:hover,button[type='submit']:hover,.pagination a:hover,input[type='checkbox']:not(:active):checked:hover + label:before,input[type='checkbox']:active + label:before{background-color:" + colors.darken + "}"; //css += ".button:hover,button[type='submit']:hover,.pagination a:hover,input[type='checkbox']:not(:active):checked:hover + label:before,input[type='checkbox']:active + label:before{background-color:" + colors.darken + "}";
css += ".helpButton span:hover{color:" + colors.darken + "}"; //css += ".helpButton span:hover{color:" + colors.darken + "}";
css += ".button:active,button[type='submit']:active,.pagination a:active{background-color:" + colors.veryDarken + "}"; //css += ".button:active,button[type='submit']:active,.pagination a:active{background-color:" + colors.veryDarken + "}";
if ($("#themeSiteWidth").val() === "750px") { if ($("#themeSiteWidth").val() === "750px") {
css += ".button, button{font-size:0.8em;}"; css += ".button, button{font-size:0.8em;}";
} else { } else {
@ -70,8 +71,8 @@ $("input, select").on("change", function() {
colors = core.colorVariants($("#themeLinkTextColor").val()); colors = core.colorVariants($("#themeLinkTextColor").val());
//css += "a{color:" + colors.normal + "}"; //css += "a{color:" + colors.normal + "}";
//css += "a:hover{color:" + colors.darken + "}"; //css += "a:hover{color:" + colors.darken + "}";
css += "a.preview{color:" + colors.normal + "}"; css += "a.preview,.buttonPreview{color:" + colors.normal + "}";
css += "a.preview:hover{color:" + colors.darken + "}"; css += "a.preview:hover,.buttonPreview{color:" + colors.darken + "}";
// Couleur, polices, épaisseur et capitalisation de caractères des titres // Couleur, polices, épaisseur et capitalisation de caractères des titres
//css += "h1,h2,h3,h4,h5,h6{color:" + $("#themeTitleTextColor").val() + ";font-family:'" + titleFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeTitleFontWeight").val() + ";text-transform:" + $("#themeTitleTextTransform").val() + "}"; //css += "h1,h2,h3,h4,h5,h6{color:" + $("#themeTitleTextColor").val() + ";font-family:'" + titleFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeTitleFontWeight").val() + ";text-transform:" + $("#themeTitleTextTransform").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 += "h1.preview,h3.preview{color:" + $("#themeTitleTextColor").val() + ";font-family:'" + titleFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeTitleFontWeight").val() + ";text-transform:" + $("#themeTitleTextTransform").val() + "}";
@ -79,11 +80,12 @@ $("input, select").on("change", function() {
//css += "body{font-family:'" + textFont.replace(/\+/g, " ") + "',sans-serif}"; //css += "body{font-family:'" + textFont.replace(/\+/g, " ") + "',sans-serif}";
// Police + couleur // Police + couleur
css += "p.preview{color:" + $("#themeTextTextColor").val() + ";font-family:'" + textFont.replace(/\+/g, " ") + "',sans-serif}"; css += "p.preview{color:" + $("#themeTextTextColor").val() + ";font-family:'" + textFont.replace(/\+/g, " ") + "',sans-serif}";
css += "a.preview,.buttonPreview{font-family:'" + textFont.replace(/\+/g, " ") + "',sans-serif}";
// Taille du texte // Taille du texte
//css += "body,.row > div{font-size:" + $("#themeTextFontSize").val() + "}"; //css += "body,.row > div{font-size:" + $("#themeTextFontSize").val() + "}";
// Couleur du texte // Couleur du texte
//css += "body,.block h4,input[type='email'],input[type='text'],input[type='password'],.inputFile,select,textarea,.inputFile,.button.buttonGrey,.button.buttonGrey:hover{color:" + $("#themeTextTextColor").val() + "}"; //css += "body,.block h4,input[type='email'],input[type='text'],input[type='password'],.inputFile,select,textarea,.inputFile,.button.buttonGrey,.button.buttonGrey:hover{color:" + $("#themeTextTextColor").val() + "}";
css += "p.preview{color:" + $("#themeTextTextColor").val() + "}"; css += "p.preview,.buttonPreview{color:" + $("#themeTextTextColor").val() + "}";
// Largeur du site // Largeur du site
css += ".container{max-width:" + $("#themeSiteWidth").val() + "}"; css += ".container{max-width:" + $("#themeSiteWidth").val() + "}";
if ($("#themeSiteWidth").val() === "100%") { if ($("#themeSiteWidth").val() === "100%") {