Changement des polices
This commit is contained in:
parent
73ff1c1d56
commit
b9a21a67dd
|
@ -6,6 +6,7 @@
|
||||||
## Version 3.1.01 de Deltacms
|
## Version 3.1.01 de Deltacms
|
||||||
- Modifications :
|
- Modifications :
|
||||||
- modification de la capture Open Graph, screenshot.jpg est maintenant générée en local sans recours à Google
|
- modification de la capture Open Graph, screenshot.jpg est maintenant générée en local sans recours à Google
|
||||||
|
- modification des polices proposées, choix de polices 'web safe', suppression des téléchargements de polices via Google
|
||||||
|
|
||||||
## Version 3.0.04 de Deltacms
|
## Version 3.0.04 de Deltacms
|
||||||
- Modifications :
|
- Modifications :
|
||||||
|
|
|
@ -621,7 +621,7 @@ class template {
|
||||||
// Liste des polices à intégrer
|
// Liste des polices à intégrer
|
||||||
if ($attributes['fonts'] === true) {
|
if ($attributes['fonts'] === true) {
|
||||||
foreach ($options as $fontId) {
|
foreach ($options as $fontId) {
|
||||||
echo "<link href='https://fonts.googleapis.com/css?family=".str_replace(" ", "+", $fontId)."' rel='stylesheet' type='text/css'>\n";
|
// echo "<link href='https://fonts.googleapis.com/css?family=".str_replace(" ", "+", $fontId)."' rel='stylesheet' type='text/css'>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Début du wrapper
|
// Début du wrapper
|
||||||
|
|
|
@ -2234,8 +2234,11 @@ class core extends common {
|
||||||
if(empty($cssVersion[1]) OR $cssVersion[1] !== md5(json_encode($this->getData(['theme'])))) {
|
if(empty($cssVersion[1]) OR $cssVersion[1] !== md5(json_encode($this->getData(['theme'])))) {
|
||||||
// Version
|
// Version
|
||||||
$css = '/*' . md5(json_encode($this->getData(['theme']))) . '*/';
|
$css = '/*' . md5(json_encode($this->getData(['theme']))) . '*/';
|
||||||
// Import des polices de caractères
|
// Import des polices de caractères version polices google
|
||||||
$css .= '@import url("https://fonts.googleapis.com/css?family=' . $this->getData(['theme', 'text', 'font']) . '|' . $this->getData(['theme', 'title', 'font']) . '|' . $this->getData(['theme', 'header', 'font']) . '|' . $this->getData(['theme', 'menu', 'font']) . '");';
|
// $css .= '@import url("https://fonts.googleapis.com/css?family=' . $this->getData(['theme', 'text', 'font']) . '|' . $this->getData(['theme', 'title', 'font']) . '|' . $this->getData(['theme', 'header', 'font']) . '|' . $this->getData(['theme', 'menu', 'font']) . '");';
|
||||||
|
|
||||||
|
// Import sur le poste de l'utilisateur des polices auto hébergées
|
||||||
|
|
||||||
// Fond du body
|
// Fond du body
|
||||||
$colors = helper::colorVariants($this->getData(['theme', 'body', 'backgroundColor']));
|
$colors = helper::colorVariants($this->getData(['theme', 'body', 'backgroundColor']));
|
||||||
// Body
|
// Body
|
||||||
|
@ -2431,7 +2434,7 @@ class core extends common {
|
||||||
$colors = helper::colorVariants($this->getData(['admin','backgroundColor']));
|
$colors = helper::colorVariants($this->getData(['admin','backgroundColor']));
|
||||||
$css .= '#site{background-color:' . $colors['normal']. ';}';
|
$css .= '#site{background-color:' . $colors['normal']. ';}';
|
||||||
$css .= '.row > div {font:' . $this->getData(['admin','fontSize']) . ' "' . $this->getData(['admin','fontText']) . '", sans-serif;}';
|
$css .= '.row > div {font:' . $this->getData(['admin','fontSize']) . ' "' . $this->getData(['admin','fontText']) . '", sans-serif;}';
|
||||||
$css .= 'body h1, h2, h3, h4 a, h5, h6 {font-family:' . $this->getData(['admin','fontTitle' ]) . ', sans-serif;color:' . $this->getData(['admin','colorTitle' ]) . ';}';
|
$css .= 'body h1, h2, h3, .block h4, h5, h6 {font-family:' . $this->getData(['admin','fontTitle' ]) . ', sans-serif;color:' . $this->getData(['admin','colorTitle' ]) . ';}';
|
||||||
|
|
||||||
// TinyMCE
|
// TinyMCE
|
||||||
$css .= 'body:not(.editorWysiwyg),span .zwiico-help {color:' . $this->getData(['admin','colorText']) . ';}';
|
$css .= 'body:not(.editorWysiwyg),span .zwiico-help {color:' . $this->getData(['admin','colorText']) . ';}';
|
||||||
|
|
|
@ -43,33 +43,36 @@ class theme extends common {
|
||||||
'fixed' => 'Fixe'
|
'fixed' => 'Fixe'
|
||||||
];
|
];
|
||||||
public static $fonts = [
|
public static $fonts = [
|
||||||
'Abril+Fatface' => 'Abril Fatface',
|
'Arial' => 'Arial',
|
||||||
'Arimo' => 'Arimo',
|
'Bodoni MT' => 'Bodoni MT',
|
||||||
'Arvo' => 'Arvo',
|
'Baskerville' => 'Baskerville',
|
||||||
'Berkshire+Swash' => 'Berkshire Swash',
|
'Calibri' => 'Calibri',
|
||||||
'Cabin' => 'Cabin',
|
'Calisto MT' => 'Calisto MT',
|
||||||
'Dancing+Script' => 'Dancing Script',
|
'Cambria' => 'Cambria',
|
||||||
'Droid+Sans' => 'Droid Sans',
|
'Candara' => 'Candara',
|
||||||
'Droid+Serif' => 'Droid Serif',
|
'Century Gothic' => 'Century Gothic',
|
||||||
'Fira+Sans' => 'Fira Sans',
|
'Consolas' => 'Consolas',
|
||||||
'Inconsolata' => 'Inconsolata',
|
'Copperplate Gothic' => 'Copperplate Gothic',
|
||||||
'Indie+Flower' => 'Indie Flower',
|
'Courrier New' => 'Courrier New',
|
||||||
'Josefin+Slab' => 'Josefin Slab',
|
'Dejavu Sans' => 'Dejavu Sans',
|
||||||
'Lobster' => 'Lobster',
|
'Didot' => 'Didot',
|
||||||
'Lora' => 'Lora',
|
'Franklin Gothic' => 'Franklin Gothic',
|
||||||
'Lato' => 'Lato',
|
'Garamond' => 'Garamond',
|
||||||
'Marvel' => 'Marvel',
|
'Georgia' => 'Georgia',
|
||||||
'Old+Standard+TT' => 'Old Standard TT',
|
'Goudy Old Style' => 'Goudy Old Style',
|
||||||
'Open+Sans' => 'Open Sans',
|
'Helvetica' => 'Helvetica',
|
||||||
'Oswald' => 'Oswald',
|
'Impact' => 'Impact',
|
||||||
'PT+Mono' => 'PT Mono',
|
'Lucida Bright' => 'Lucida Bright',
|
||||||
'PT+Serif' => 'PT Serif',
|
'Lucida Sans' => 'Lucida Sans',
|
||||||
'Raleway' => 'Raleway',
|
'Microsoft Sans Serif' => 'Microsoft Sans Serif',
|
||||||
'Rancho' => 'Rancho',
|
'Optima' => 'Optima',
|
||||||
'Roboto' => 'Roboto',
|
'Palatino' => 'Palatino',
|
||||||
'Signika' => 'Signika',
|
'Perpetua' => 'Perpetua',
|
||||||
'Ubuntu' => 'Ubuntu',
|
'Rockwell' => 'Rockwell',
|
||||||
'Vollkorn' => 'Vollkorn'
|
'Segoe UI' => 'Segoe UI',
|
||||||
|
'Tahoma' => 'Tahoma',
|
||||||
|
'Trebuchet MS' => 'Trebuchet MS',
|
||||||
|
'Verdana' => 'Verdana'
|
||||||
];
|
];
|
||||||
public static $containerWides = [
|
public static $containerWides = [
|
||||||
'container' => 'Limitée au site',
|
'container' => 'Limitée au site',
|
||||||
|
|
|
@ -21,7 +21,7 @@ $("input, select").on("change", function() {
|
||||||
|
|
||||||
var titleFont = $("#adminFontTitle").val();
|
var titleFont = $("#adminFontTitle").val();
|
||||||
var textFont = $("#adminFontText").val();
|
var textFont = $("#adminFontText").val();
|
||||||
var css = "@import url('https://fonts.googleapis.com/css?family=" + titleFont + "|" + textFont + "');";
|
//var css = "@import url('https://fonts.googleapis.com/css?family=" + titleFont + "|" + textFont + "');";
|
||||||
var colors = core.colorVariants($("#adminBackgroundColor").val());
|
var colors = core.colorVariants($("#adminBackgroundColor").val());
|
||||||
var css = "#site{background-color:" + colors.normal + ";}";
|
var css = "#site{background-color:" + colors.normal + ";}";
|
||||||
css += "body, .row > div {font:" + $("#adminFontTextSize").val() + " '" + textFont + "', sans-serif;}";
|
css += "body, .row > div {font:" + $("#adminFontTextSize").val() + " '" + textFont + "', sans-serif;}";
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
$("input, select").on("change", function() {
|
$("input, select").on("change", function() {
|
||||||
// Import des polices de caractères
|
// Import des polices de caractères
|
||||||
var footerFont = $("#themeFooterFont").val();
|
var footerFont = $("#themeFooterFont").val();
|
||||||
var css = "@import url('https://fonts.googleapis.com/css?family=" + footerFont + "');";
|
// var css = "@import url('https://fonts.googleapis.com/css?family=" + footerFont + "');";
|
||||||
// Couleurs du pied de page
|
// Couleurs du pied de page
|
||||||
var colors = core.colorVariants($("#themeFooterBackgroundColor").val());
|
var colors = core.colorVariants($("#themeFooterBackgroundColor").val());
|
||||||
var textColor = $("#themeFooterTextColor").val();
|
var textColor = $("#themeFooterTextColor").val();
|
||||||
|
|
|
@ -83,9 +83,9 @@ $("input, select").on("change", function() {
|
||||||
|
|
||||||
// Import des polices de caractères
|
// Import des polices de caractères
|
||||||
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 + "');";
|
||||||
|
|
||||||
css += "header{text-align:" + $("#themeHeaderTextAlign").val() + ";";
|
css = "header{text-align:" + $("#themeHeaderTextAlign").val() + ";";
|
||||||
if ($("#themeHeaderImage").val()) {
|
if ($("#themeHeaderImage").val()) {
|
||||||
// Une image est sélectionnée
|
// Une image est sélectionnée
|
||||||
css += "background-image:url('<?php echo helper::baseUrl(false); ?>site/file/source/" + $("#themeHeaderImage").val() + "');background-repeat:" + $("#themeHeaderImageRepeat").val() + ";background-position:" + $("#themeHeaderImagePosition").val() + ";";
|
css += "background-image:url('<?php echo helper::baseUrl(false); ?>site/file/source/" + $("#themeHeaderImage").val() + "');background-repeat:" + $("#themeHeaderImageRepeat").val() + ";background-position:" + $("#themeHeaderImagePosition").val() + ";";
|
||||||
|
|
|
@ -44,10 +44,10 @@ $(document).ready(function(){
|
||||||
$("input, select").on("change", function() {
|
$("input, select").on("change", function() {
|
||||||
// Import des polices de caractères
|
// Import des polices de caractères
|
||||||
var menuFont = $("#themeMenuFont").val();
|
var menuFont = $("#themeMenuFont").val();
|
||||||
var css = "@import url('https://fonts.googleapis.com/css?family=" + menuFont + "');";
|
// var css = "@import url('https://fonts.googleapis.com/css?family=" + menuFont + "');";
|
||||||
var colors = core.colorVariants($("#themeMenuBackgroundColor").val());
|
var colors = core.colorVariants($("#themeMenuBackgroundColor").val());
|
||||||
// Couleurs du menu
|
// Couleurs du menu
|
||||||
css += "nav,nav.navLevel1 a{background-color:" + colors.normal + "}";
|
css = "nav,nav.navLevel1 a{background-color:" + colors.normal + "}";
|
||||||
css += "nav a,#toggle span,nav a:hover{color:" + $("#themeMenuTextColor").val() + "}";
|
css += "nav a,#toggle span,nav a:hover{color:" + $("#themeMenuTextColor").val() + "}";
|
||||||
css += "nav a:hover{background-color:" + colors.darken + "}";
|
css += "nav a:hover{background-color:" + colors.darken + "}";
|
||||||
if ($("#themeMenuActiveColorAuto").is(':checked')) {
|
if ($("#themeMenuActiveColorAuto").is(':checked')) {
|
||||||
|
|
|
@ -38,10 +38,10 @@ $("input, select").on("change",function() {
|
||||||
// Import des polices de caractères
|
// Import des polices de caractères
|
||||||
var titleFont = $("#themeTitleFont").val();
|
var titleFont = $("#themeTitleFont").val();
|
||||||
var textFont = $("#themeTextFont").val();
|
var textFont = $("#themeTextFont").val();
|
||||||
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 += ".button.buttonSubmitPreview{background-color:" + colors.normal + ";}";
|
css = ".button.buttonSubmitPreview{background-color:" + colors.normal + ";}";
|
||||||
css += ".button.buttonSubmitPreview:hover{background-color:" + colors.darken + "}";
|
css += ".button.buttonSubmitPreview:hover{background-color:" + colors.darken + "}";
|
||||||
css += ".button.buttonSubmitPreview{color:" + colors.text + ";}";
|
css += ".button.buttonSubmitPreview{color:" + colors.text + ";}";
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ $("input, select").on("change",function() {
|
||||||
css += "#site{border-radius:" + $("#themeSiteRadius").val() + ";box-shadow:" + $("#themeSiteShadow").val() + " #212223}";
|
css += "#site{border-radius:" + $("#themeSiteRadius").val() + ";box-shadow:" + $("#themeSiteShadow").val() + " #212223}";
|
||||||
|
|
||||||
// Couleur ou image de fond
|
// Couleur ou image de fond
|
||||||
var backgroundImage = <?php echo json_encode(helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme','body','image'])); ?>;
|
var backgroundImage = <?php if( $this->getData(['theme','body','image']) !== '') { echo json_encode(helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme','body','image']));} else { echo 'null';} ?> ;
|
||||||
var backgroundcolor = <?php echo json_encode($this->getdata(['theme','body','backgroundColor'])); ?>;
|
var backgroundcolor = <?php echo json_encode($this->getdata(['theme','body','backgroundColor'])); ?>;
|
||||||
if(backgroundImage) {
|
if(backgroundImage) {
|
||||||
css += "div.bodybackground{background-image:url(" + backgroundImage + ");background-repeat:" + $("#themeBodyImageRepeat").val() + ";background-position:" + $("#themeBodyImagePosition").val() + ";background-attachment:" + $("#themeBodyImageAttachment").val() + ";background-size:" + $("#themeBodyImageSize").val() + "}";
|
css += "div.bodybackground{background-image:url(" + backgroundImage + ");background-repeat:" + $("#themeBodyImageRepeat").val() + ";background-position:" + $("#themeBodyImagePosition").val() + ";background-attachment:" + $("#themeBodyImageAttachment").val() + ";background-size:" + $("#themeBodyImageSize").val() + "}";
|
||||||
|
@ -94,14 +94,14 @@ $("input, select").on("change",function() {
|
||||||
else {
|
else {
|
||||||
css += "div.bodybackground{background-image:none}";
|
css += "div.bodybackground{background-image:none}";
|
||||||
}
|
}
|
||||||
css += '#backToTop {background-color:' + backgroundcolor + ';color:' + $("#themeBodyToTopColor").val() + ';}';
|
// css += '#backToTop {background-color:' + backgroundcolor + ';color:' + $("#themeBodyToTopColor").val() + ';}';
|
||||||
|
css += '#backToTop {color:' + $("#themeBodyToTopColor").val() + ';}';
|
||||||
css += "div.bgPreview{padding: 5px;background-color:" + $("#themeSiteBackgroundColor").val() + ";}";
|
css += "div.bgPreview{padding: 5px;background-color:" + $("#themeSiteBackgroundColor").val() + ";}";
|
||||||
|
|
||||||
// Les blocs
|
// Les blocs
|
||||||
|
|
||||||
var colors = core.colorVariants($("#themeBlockBackgroundTitleColor").val());
|
var colors = core.colorVariants($("#themeBlockBackgroundTitleColor").val());
|
||||||
css += ".block.preview {background-color: " + $("#themeBlockBackgroundColor").val() + ";padding: 20px 20px 10px;margin: 20px 0; word-wrap: break-word;border-radius: " + $("#themeBlockBorderRadius").val() + ";border: 1px solid " + $("#themeBlockBorderColor").val() + ";box-shadow: " + $("#themeBlockBorderShadow").val() + " " + $("#themeBlockBorderColor").val() + ";}.block.preview h4.preview {background: " + colors.normal + ";color:" + colors.text + ";margin: -20px -20px 10px -20px; padding: 10px;border-radius: " + $("#themeBlockBorderRadius").val() + " " + $("#themeBlockBorderRadius").val() + " 0px 0px;}";
|
css += ".block.preview {background-color: " + $("#themeBlockBackgroundColor").val() + ";padding: 20px 20px 10px;margin: 20px 0; word-wrap: break-word;border-radius: " + $("#themeBlockBorderRadius").val() + ";border: 1px solid " + $("#themeBlockBorderColor").val() + ";box-shadow: " + $("#themeBlockBorderShadow").val() + " " + $("#themeBlockBorderColor").val() + ";}.block.preview h4.preview {background: " + colors.normal + ";color:" + colors.text + ";font-family:'" + titleFont.replace(/\+/g, " ") + "',sans-serif;margin: -20px -20px 10px -20px; padding: 10px;border-radius: " + $("#themeBlockBorderRadius").val() + " " + $("#themeBlockBorderRadius").val() + " 0px 0px;}";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection dans le DOM
|
* Injection dans le DOM
|
||||||
|
|
|
@ -455,7 +455,7 @@ $config = array(
|
||||||
//Allowed extensions (lowercase insert)
|
//Allowed extensions (lowercase insert)
|
||||||
//**********************
|
//**********************
|
||||||
'ext_img' => array( 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff','svg', 'ico' ), //Images
|
'ext_img' => array( 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff','svg', 'ico' ), //Images
|
||||||
'ext_file' => array( 'doc', 'docx', 'rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv', 'html', 'xhtml', 'psd', 'sql', 'log', 'fla', 'xml', 'ade', 'adp', 'mdb', 'accdb', 'ppt', 'pptx', 'odt', 'ots', 'ott', 'odb', 'odg', 'otp', 'otg', 'odf', 'ods', 'odp', 'css', 'ai', 'kmz','dwg', 'dxf', 'hpgl', 'plt', 'spl', 'step', 'stp', 'iges', 'igs', 'sat', 'cgm', 'ics', 'gpx', 'kml', ''), //Files
|
'ext_file' => array( 'doc', 'docx', 'rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv', 'html', 'xhtml', 'psd', 'sql', 'log', 'fla', 'xml', 'ade', 'adp', 'mdb', 'accdb', 'ppt', 'pptx', 'odt', 'ots', 'ott', 'odb', 'odg', 'otp', 'otg', 'odf', 'ods', 'odp', 'css', 'ai', 'kmz','dwg', 'dxf', 'hpgl', 'plt', 'spl', 'step', 'stp', 'iges', 'igs', 'sat', 'cgm', 'ics', 'gpx', 'kml', 'ttf', 'eot', 'woff', 'otf', 'woff2', ''), //Files
|
||||||
'ext_video' => array( 'mov', 'mpeg', 'm4v', 'mp4', 'avi', 'mpg', 'wma', "flv", "webm" ), //Video
|
'ext_video' => array( 'mov', 'mpeg', 'm4v', 'mp4', 'avi', 'mpg', 'wma', "flv", "webm" ), //Video
|
||||||
'ext_music' => array( 'mp3', 'mpga', 'm4a', 'ac3', 'aiff', 'mid', 'ogg', 'wav' ), //Audio
|
'ext_music' => array( 'mp3', 'mpga', 'm4a', 'ac3', 'aiff', 'mid', 'ogg', 'wav' ), //Audio
|
||||||
'ext_misc' => array( 'zip', 'rar', 'gz', 'tar', 'iso', 'dmg' ), //Archives
|
'ext_misc' => array( 'zip', 'rar', 'gz', 'tar', 'iso', 'dmg' ), //Archives
|
||||||
|
|
Loading…
Reference in New Issue