diff --git a/core/core.php b/core/core.php index db82eef8..c0742f6e 100644 --- a/core/core.php +++ b/core/core.php @@ -189,11 +189,6 @@ class common { 'font-family' => 'Arial, Helvetica, sans-serif', 'resource' => 'websafe' ], - 'arial-black' => [ - 'name' => 'Arial Black', - 'font-family' => '\'Arial Black\', Gadget, sans-serif', - 'resource' => 'websafe' - ], 'arvo'=> [ 'name' => 'Arvo', 'font-family' => 'Arvo, sans-serif', @@ -2178,6 +2173,9 @@ class common { if ( file_exists(self::DATA_DIR . 'fonts/fonts.html') ){ include_once(self::DATA_DIR . 'fonts/fonts.html'); } + if ( file_exists(self::DATA_DIR . 'fonts/fonts.css') ){ + echo ''; + } } /** diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index ff4f7065..11040563 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -1189,12 +1189,14 @@ class theme extends common { * Chargement des polices en ligne dans un fichier fonts.html inclus dans main.php */ $gf = false; - $fileContent = ''; + $fileContent = ''; foreach ($this->getData(['fonts', 'imported']) as $fontId => $fontValue) { if ( ( $scope === 'user' && in_array($fontId, $fontsInstalled) ) || $scope === 'all' ) { + //Pré chargement à revoir + //$fileContent .= ''; $fileContent .= ''; // Pré connect pour api.google $gf = strpos($fontValue['resource'], 'fonts.googleapis.com') === false ? $gf || false : $gf || true; @@ -1217,13 +1219,15 @@ class theme extends common { || $scope === 'all' ) { if (file_exists(self::DATA_DIR . 'fonts/' . $fontValue['resource']) ) { + // Extension + $path_parts = pathinfo(helper::baseUrl(false) . self::DATA_DIR . 'fonts/' . $fontValue['resource']); // Chargement de la police $fileContentCss .= '@font-face {' ; - $fileContentCss .= 'font-family:"' . $fontValue['font-family'] . '";'; - $fileContentCss .= 'src: local("' . $fontValue['name'] . '"), url("' . $fontValue['resource'] . '") format("woff");'; + $fileContentCss .= 'font-family:"' . $fontId . '";'; + $fileContentCss .= 'src: url("' . $fontValue['resource'] . '") format("' . $path_parts['extension'] . '");'; $fileContentCss .= '}' ; // Préchargement - $fileContent = '' . $fileContent; + //$fileContent = '' . $fileContent; } } } diff --git a/core/module/theme/view/fontAdd/fontAdd.php b/core/module/theme/view/fontAdd/fontAdd.php index 804b3674..cddc03fe 100644 --- a/core/module/theme/view/fontAdd/fontAdd.php +++ b/core/module/theme/view/fontAdd/fontAdd.php @@ -1,23 +1,21 @@
-
+
'buttonGrey', 'href' => helper::baseUrl() . 'theme/fonts', - 'ico' => 'left', - 'value' => 'Retour' + 'value' => template::ico('left') ]); ?>
-
+
'https://doc.zwiicms.fr/fontes#add', 'target' => '_blank', - 'ico' => 'help', - 'value' => 'Aide', + 'value' => template::ico('help'), 'class' => 'buttonHelp' ]); ?>
-
+
'Valider', 'uniqueSubmission' => true diff --git a/core/module/theme/view/fontEdit/fontEdit.php b/core/module/theme/view/fontEdit/fontEdit.php index 21bf456c..15b7a535 100644 --- a/core/module/theme/view/fontEdit/fontEdit.php +++ b/core/module/theme/view/fontEdit/fontEdit.php @@ -1,23 +1,21 @@
-
+
'buttonGrey', 'href' => helper::baseUrl() . 'theme/fonts', - 'ico' => 'left', - 'value' => 'Retour' + 'value' => template::ico('left') ]); ?>
-
+
'https://doc.zwiicms.fr/fontes#add', 'target' => '_blank', - 'ico' => 'help', - 'value' => 'Aide', + 'value' => template::ico('help'), 'class' => 'buttonHelp' ]); ?>
-
+
'Valider', 'uniqueSubmission' => true diff --git a/core/module/theme/view/fonts/fonts.php b/core/module/theme/view/fonts/fonts.php index 87c28836..27ebd056 100644 --- a/core/module/theme/view/fonts/fonts.php +++ b/core/module/theme/view/fonts/fonts.php @@ -1,22 +1,20 @@
-
+
'buttonGrey', 'href' => helper::baseUrl() . 'theme', - 'ico' => 'left', - 'value' => 'Retour' + 'value' => template::ico('left') ]); ?>
-
+
'https://doc.zwiicms.fr/fontes', 'target' => '_blank', - 'ico' => 'help', - 'value' => 'Aide', + 'value' => template::ico('help'), 'class' => 'buttonHelp' ]); ?>
-
+
helper::baseUrl() . $this->getUrl(0) . '/fontAdd', 'ico' => 'plus',