Style et script dans les barres

This commit is contained in:
Fred Tempez 2022-11-16 16:13:52 +01:00
parent 189f5e1365
commit 82fc3c6250
2 changed files with 7 additions and 6 deletions

View File

@ -2935,6 +2935,7 @@ class core extends common
'title' => $title, 'title' => $title,
'content' => $this->getPage($this->getUrl(0), self::$i18nContent) . 'content' => $this->getPage($this->getUrl(0), self::$i18nContent) .
// Concatène avec les paramètres avancés. // Concatène avec les paramètres avancés.
'<style>' . $this->getData(['page', $this->getUrl(0), 'css']) . '</style>' .
'<script>' . $this->getData(['page', $this->getUrl(0), 'js']) . '</script>', '<script>' . $this->getData(['page', $this->getUrl(0), 'js']) . '</script>',
'metaDescription' => $this->getData(['page', $this->getUrl(0), 'metaDescription']), 'metaDescription' => $this->getData(['page', $this->getUrl(0), 'metaDescription']),
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']), 'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
@ -2942,10 +2943,14 @@ class core extends common
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']), 'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']), 'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
'contentRight' => $this->getData(['page', $this->getUrl(0), 'barRight']) 'contentRight' => $this->getData(['page', $this->getUrl(0), 'barRight'])
? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$i18nContent) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$i18nContent) .
'<style>' . $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']) . '</style>' .
'<script>' . $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'js']) . '</script>'
: '', : '',
'contentLeft' => $this->getData(['page', $this->getUrl(0), 'barLeft']) 'contentLeft' => $this->getData(['page', $this->getUrl(0), 'barLeft'])
? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$i18nContent) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$i18nContent) .
'<style>' . $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']) . '</style>' .
'<script>' . $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'js']) . '</script>'
: '' : ''
]); ]);
} }

View File

@ -20,10 +20,6 @@
<link rel="alternate" type="application/rss+xml" href="'<?php echo helper::baseUrl(). $this->getUrl(0) . '/rss';?>" title="fLUX rss"> <link rel="alternate" type="application/rss+xml" href="'<?php echo helper::baseUrl(). $this->getUrl(0) . '/rss';?>" title="fLUX rss">
<?php endif; ?> <?php endif; ?>
<?php $this->showStyle(); ?> <?php $this->showStyle(); ?>
<!-- Style de la page affichée -->
<?php if ( $this->getData(['page', $this->getUrl(0), 'css'])): ?>
<?php echo '<style>' . $this->getData(['page', $this->getUrl(0), 'css']) . '</style>'; ?>
<?php endif;?>
<!-- Script perso dans le header --> <!-- Script perso dans le header -->
<?php if (file_exists(self::DATA_DIR .'head.inc.html')) { <?php if (file_exists(self::DATA_DIR .'head.inc.html')) {
include(self::DATA_DIR .'head.inc.html'); include(self::DATA_DIR .'head.inc.html');