Changement des polices
This commit is contained in:
parent
73ff1c1d56
commit
b9a21a67dd
|
@ -6,6 +6,7 @@
|
|||
## Version 3.1.01 de Deltacms
|
||||
- Modifications :
|
||||
- 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
|
||||
- Modifications :
|
||||
|
|
|
@ -621,7 +621,7 @@ class template {
|
|||
// Liste des polices à intégrer
|
||||
if ($attributes['fonts'] === true) {
|
||||
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
|
||||
|
|
|
@ -2234,8 +2234,11 @@ class core extends common {
|
|||
if(empty($cssVersion[1]) OR $cssVersion[1] !== md5(json_encode($this->getData(['theme'])))) {
|
||||
// Version
|
||||
$css = '/*' . md5(json_encode($this->getData(['theme']))) . '*/';
|
||||
// Import des polices de caractères
|
||||
$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 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']) . '");';
|
||||
|
||||
// Import sur le poste de l'utilisateur des polices auto hébergées
|
||||
|
||||
// Fond du body
|
||||
$colors = helper::colorVariants($this->getData(['theme', 'body', 'backgroundColor']));
|
||||
// Body
|
||||
|
@ -2431,7 +2434,7 @@ class core extends common {
|
|||
$colors = helper::colorVariants($this->getData(['admin','backgroundColor']));
|
||||
$css .= '#site{background-color:' . $colors['normal']. ';}';
|
||||
$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
|
||||
$css .= 'body:not(.editorWysiwyg),span .zwiico-help {color:' . $this->getData(['admin','colorText']) . ';}';
|
||||
|
|
|
@ -43,33 +43,36 @@ class theme extends common {
|
|||
'fixed' => 'Fixe'
|
||||
];
|
||||
public static $fonts = [
|
||||
'Abril+Fatface' => 'Abril Fatface',
|
||||
'Arimo' => 'Arimo',
|
||||
'Arvo' => 'Arvo',
|
||||
'Berkshire+Swash' => 'Berkshire Swash',
|
||||
'Cabin' => 'Cabin',
|
||||
'Dancing+Script' => 'Dancing Script',
|
||||
'Droid+Sans' => 'Droid Sans',
|
||||
'Droid+Serif' => 'Droid Serif',
|
||||
'Fira+Sans' => 'Fira Sans',
|
||||
'Inconsolata' => 'Inconsolata',
|
||||
'Indie+Flower' => 'Indie Flower',
|
||||
'Josefin+Slab' => 'Josefin Slab',
|
||||
'Lobster' => 'Lobster',
|
||||
'Lora' => 'Lora',
|
||||
'Lato' => 'Lato',
|
||||
'Marvel' => 'Marvel',
|
||||
'Old+Standard+TT' => 'Old Standard TT',
|
||||
'Open+Sans' => 'Open Sans',
|
||||
'Oswald' => 'Oswald',
|
||||
'PT+Mono' => 'PT Mono',
|
||||
'PT+Serif' => 'PT Serif',
|
||||
'Raleway' => 'Raleway',
|
||||
'Rancho' => 'Rancho',
|
||||
'Roboto' => 'Roboto',
|
||||
'Signika' => 'Signika',
|
||||
'Ubuntu' => 'Ubuntu',
|
||||
'Vollkorn' => 'Vollkorn'
|
||||
'Arial' => 'Arial',
|
||||
'Bodoni MT' => 'Bodoni MT',
|
||||
'Baskerville' => 'Baskerville',
|
||||
'Calibri' => 'Calibri',
|
||||
'Calisto MT' => 'Calisto MT',
|
||||
'Cambria' => 'Cambria',
|
||||
'Candara' => 'Candara',
|
||||
'Century Gothic' => 'Century Gothic',
|
||||
'Consolas' => 'Consolas',
|
||||
'Copperplate Gothic' => 'Copperplate Gothic',
|
||||
'Courrier New' => 'Courrier New',
|
||||
'Dejavu Sans' => 'Dejavu Sans',
|
||||
'Didot' => 'Didot',
|
||||
'Franklin Gothic' => 'Franklin Gothic',
|
||||
'Garamond' => 'Garamond',
|
||||
'Georgia' => 'Georgia',
|
||||
'Goudy Old Style' => 'Goudy Old Style',
|
||||
'Helvetica' => 'Helvetica',
|
||||
'Impact' => 'Impact',
|
||||
'Lucida Bright' => 'Lucida Bright',
|
||||
'Lucida Sans' => 'Lucida Sans',
|
||||
'Microsoft Sans Serif' => 'Microsoft Sans Serif',
|
||||
'Optima' => 'Optima',
|
||||
'Palatino' => 'Palatino',
|
||||
'Perpetua' => 'Perpetua',
|
||||
'Rockwell' => 'Rockwell',
|
||||
'Segoe UI' => 'Segoe UI',
|
||||
'Tahoma' => 'Tahoma',
|
||||
'Trebuchet MS' => 'Trebuchet MS',
|
||||
'Verdana' => 'Verdana'
|
||||
];
|
||||
public static $containerWides = [
|
||||
'container' => 'Limitée au site',
|
||||
|
|
|
@ -21,7 +21,7 @@ $("input, select").on("change", function() {
|
|||
|
||||
var titleFont = $("#adminFontTitle").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 css = "#site{background-color:" + colors.normal + ";}";
|
||||
css += "body, .row > div {font:" + $("#adminFontTextSize").val() + " '" + textFont + "', sans-serif;}";
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
$("input, select").on("change", function() {
|
||||
// Import des polices de caractères
|
||||
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
|
||||
var colors = core.colorVariants($("#themeFooterBackgroundColor").val());
|
||||
var textColor = $("#themeFooterTextColor").val();
|
||||
|
|
|
@ -83,9 +83,9 @@ $("input, select").on("change", function() {
|
|||
|
||||
// Import des polices de caractères
|
||||
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()) {
|
||||
// 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() + ";";
|
||||
|
|
|
@ -44,10 +44,10 @@ $(document).ready(function(){
|
|||
$("input, select").on("change", function() {
|
||||
// Import des polices de caractères
|
||||
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());
|
||||
// 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:hover{background-color:" + colors.darken + "}";
|
||||
if ($("#themeMenuActiveColorAuto").is(':checked')) {
|
||||
|
|
|
@ -38,10 +38,10 @@ $("input, select").on("change",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 css = "@import url('https://fonts.googleapis.com/css?family=" + titleFont + "|" + textFont + "');";
|
||||
// Couleurs des boutons
|
||||
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{color:" + colors.text + ";}";
|
||||
|
||||
|
@ -85,7 +85,7 @@ $("input, select").on("change",function() {
|
|||
css += "#site{border-radius:" + $("#themeSiteRadius").val() + ";box-shadow:" + $("#themeSiteShadow").val() + " #212223}";
|
||||
|
||||
// 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'])); ?>;
|
||||
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() + "}";
|
||||
|
@ -94,14 +94,14 @@ $("input, select").on("change",function() {
|
|||
else {
|
||||
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() + ";}";
|
||||
|
||||
// Les blocs
|
||||
|
||||
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
|
||||
|
|
|
@ -455,7 +455,7 @@ $config = array(
|
|||
//Allowed extensions (lowercase insert)
|
||||
//**********************
|
||||
'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_music' => array( 'mp3', 'mpga', 'm4a', 'ac3', 'aiff', 'mid', 'ogg', 'wav' ), //Audio
|
||||
'ext_misc' => array( 'zip', 'rar', 'gz', 'tar', 'iso', 'dmg' ), //Archives
|
||||
|
|
Loading…
Reference in New Issue