showFontes

This commit is contained in:
Fred Tempez 2023-02-15 18:17:24 +01:00
parent 9544c3305d
commit c670443132
5 changed files with 26 additions and 28 deletions

View File

@ -2337,6 +2337,12 @@ class common
}
echo '<style type="text/css">' . helper::minifyCss($this->output['style']) . '</style>';
}
}
/**
* Importe les polices de carcatères
*/
public function showFonts() {
// Import des fontes liées au thème
if (file_exists(self::DATA_DIR . 'fonts/fonts.html')) {
include_once(self::DATA_DIR . 'fonts/fonts.html');
@ -3007,26 +3013,16 @@ class core extends common
$this->addOutput([
'title' => $title,
'content' => $this->getPage($this->getUrl(0), self::$i18nContent) .
($this->getData(['page', $this->getUrl(0), 'css']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'css']) ).
($this->getData(['page', $this->getUrl(0), 'js']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'js']) ),
'content' => $this->getPage($this->getUrl(0), self::$i18nContent),
'metaDescription' => $this->getData(['page', $this->getUrl(0), 'metaDescription']),
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
'contentRight' => $this->getData(['page', $this->getUrl(0), 'barRight'])
? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$i18nContent) .
($this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']) == null ?'' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css'])) .
($this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'js']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'js']))
: '',
'contentLeft' => $this->getData(['page', $this->getUrl(0), 'barLeft'])
? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$i18nContent) .
($this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css'])) .
($this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'js']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'js']))
: ''
'contentRight' => $this->getData(['page', $this->getUrl(0), 'barRight']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$i18nContent) : '',
'contentLeft' => $this->getData(['page', $this->getUrl(0), 'barLeft']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$i18nContent) : ''
]);
// ($this->getData(['page', $this->getUrl(0), 'js']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'js']) );
}
// Importe le module
else {
@ -3051,9 +3047,9 @@ class core extends common
? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$i18nContent)
: ''
]);
$pageContent = $this->getPage($this->getUrl(0), self::$i18nContent) .
($this->getData(['page', $this->getUrl(0), 'css']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'css']) ).
($this->getData(['page', $this->getUrl(0), 'js']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'js']) );
//$pageContent = $this->getPage($this->getUrl(0), self::$i18nContent) .
//($this->getData(['page', $this->getUrl(0), 'css']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'css']) ).
//($this->getData(['page', $this->getUrl(0), 'js']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'js']) );
} else {
$moduleId = $this->getUrl(0);
$pageContent = '';
@ -3148,7 +3144,8 @@ class core extends common
}
if ($output['style']) {
$this->addOutput([
'style' => $this->output['style'] . file_get_contents($output['style'])
//'style' => $this->output['style'] . file_get_contents($output['style'])
'style' => file_get_contents($output['style'])
]);
}

View File

@ -10,6 +10,7 @@
<?php $this->showFavicon(); ?>
<?php $this->showVendor(); ?>
<?php $this->showStyle(); ?>
<?php $this->showFonts(); ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/blank.css">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>theme.css?<?php echo md5_file(self::DATA_DIR.'theme.css'); ?>">

View File

@ -10,6 +10,7 @@
<?php $this->showFavicon(); ?>
<?php $this->showVendor(); ?>
<?php $this->showStyle(); ?>
<?php $this->showFonts(); ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/light.css">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>theme.css?<?php echo md5_file(self::DATA_DIR.'theme.css'); ?>">

View File

@ -9,6 +9,7 @@
<?php $this->showMetaImage(); ?>
<?php $this->showFavicon(); ?>
<?php $this->showVendor(); ?>
<?php $this->showFonts(); ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css?<?php echo md5_file('core/layout/common.css'); ?>">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>theme.css?<?php echo md5_file(self::DATA_DIR . 'theme.css'); ?>">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>custom.css?<?php echo md5_file(self::DATA_DIR . 'custom.css'); ?>">

View File

@ -562,7 +562,6 @@ class page extends common
{
// Soumission du formulaire
if ($this->isPost()) {
// Supprime les balises styles si elles ont été saisies
$css = $this->getInput('pageCssEditorContent') === null ? '': $this->getInput('pageCssEditorContent');
// Enregistre le CSS
$this->setData([
@ -593,7 +592,6 @@ class page extends common
{
// Soumission du formulaire
if ($this->isPost()) {
// Supprime les balises scripts si elles ont été saisies
$js = $this->getInput('pageJsEditorContent') === null ? '' : $this->getInput('pageJsEditorContent');
// Enregistre le JS
$this->setData([