12100 include script, add <script> markup

This commit is contained in:
Fred Tempez 2023-01-08 20:22:31 +01:00
parent c67a1c0e8e
commit bfd8797aa4
1 changed files with 181 additions and 174 deletions

View File

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="<?php echo self::$i18nContent; ?>"> <html prefix="og: http://ogp.me/ns#" lang="<?php echo self::$i18nContent; ?>">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
@ -15,16 +16,20 @@
<!-- Détection RSS --> <!-- Détection RSS -->
<?php if (($this->getData(['page', $this->getUrl(0), 'moduleId']) === 'blog' <?php if (($this->getData(['page', $this->getUrl(0), 'moduleId']) === 'blog'
OR $this->getData(['page', $this->getUrl(0), 'moduleId']) === 'news' ) or $this->getData(['page', $this->getUrl(0), 'moduleId']) === 'news')
AND $this->getData(['module', $this->getUrl(0), 'config', 'feeds']) === TRUE ): ?> and $this->getData(['module', $this->getUrl(0), 'config', 'feeds']) === TRUE
) : ?>
<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(); ?>
<!-- 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')) {
echo '<script>';
include(self::DATA_DIR . 'head.inc.html'); include(self::DATA_DIR . 'head.inc.html');
echo '</script>';
} ?> } ?>
</head> </head>
<body> <body>
<!-- Barre d'administration --> <!-- Barre d'administration -->
<?php if ($this->getUser('group') > self::GROUP_MEMBER) : ?> <?php if ($this->getUser('group') > self::GROUP_MEMBER) : ?>
@ -38,10 +43,12 @@
<?php if ($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top') : ?> <?php if ($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top') : ?>
<!-- Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté --> <!-- Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté -->
<?php <?php
if ( $this->getData(['theme', 'menu', 'position']) === 'top' if (
AND $this->getData(['theme', 'menu', 'fixed']) === true $this->getData(['theme', 'menu', 'position']) === 'top'
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') and $this->getData(['theme', 'menu', 'fixed']) === true
AND $this->getUser('group') > self::GROUP_MEMBER) { and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
and $this->getUser('group') > self::GROUP_MEMBER
) {
echo '<nav id="navfixedconnected" >'; echo '<nav id="navfixedconnected" >';
} else { } else {
echo '<nav id="navfixedlogout" >'; echo '<nav id="navfixedlogout" >';
@ -76,7 +83,7 @@
<?php if ( <?php if (
$this->getData(['theme', 'header', 'textHide']) === false $this->getData(['theme', 'header', 'textHide']) === false
// Affiche toujours le titre de la bannière pour l'édition du thème // Affiche toujours le titre de la bannière pour l'édition du thème
OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header') or ($this->getUrl(0) === 'theme' and $this->getUrl(1) === 'header')
) : ?> ) : ?>
<span id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span> <span id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
<?php else : ?> <?php else : ?>
@ -123,9 +130,8 @@
<?php if ( <?php if (
$this->getData(['theme', 'header', 'position']) === 'site' $this->getData(['theme', 'header', 'position']) === 'site'
// Affiche toujours la bannière pour l'édition du thème // Affiche toujours la bannière pour l'édition du thème
OR ( or ($this->getData(['theme', 'header', 'position']) === 'hide'
$this->getData(['theme', 'header', 'position']) === 'hide' and $this->getUrl(0) === 'theme'
AND $this->getUrl(0) === 'theme'
) )
) : ?> ) : ?>
<!-- Bannière dans le site --> <!-- Bannière dans le site -->
@ -139,7 +145,7 @@
<?php if ( <?php if (
$this->getData(['theme', 'header', 'textHide']) === false $this->getData(['theme', 'header', 'textHide']) === false
// Affiche toujours le titre de la bannière pour l'édition du thème // Affiche toujours le titre de la bannière pour l'édition du thème
OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header') or ($this->getUrl(0) === 'theme' and $this->getUrl(1) === 'header')
) : ?> ) : ?>
<span id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span> <span id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
<?php else : ?> <?php else : ?>
@ -157,9 +163,8 @@
$this->getData(['theme', 'menu', 'position']) === 'site-second' || $this->getData(['theme', 'menu', 'position']) === 'site-second' ||
$this->getData(['theme', 'menu', 'position']) === 'site' $this->getData(['theme', 'menu', 'position']) === 'site'
// Affiche toujours le menu pour l'édition du thème // Affiche toujours le menu pour l'édition du thème
OR ( or ($this->getData(['theme', 'menu', 'position']) === 'hide'
$this->getData(['theme', 'menu', 'position']) === 'hide' and $this->getUrl(0) === 'theme'
AND $this->getUrl(0) === 'theme'
) )
) : ?> ) : ?>
<!-- Menu dans le site après la bannière --> <!-- Menu dans le site après la bannière -->
@ -189,8 +194,10 @@
<?php $this->showScript(); ?> <?php $this->showScript(); ?>
<!-- Script perso dans body --> <!-- Script perso dans body -->
<?php if (file_exists(self::DATA_DIR . 'body.inc.html')) { <?php if (file_exists(self::DATA_DIR . 'body.inc.html')) {
echo '<script>';
include(self::DATA_DIR . 'body.inc.html'); include(self::DATA_DIR . 'body.inc.html');
} echo '</script>';
?> }?>
</body> </body>
</html> </html>