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,6 +1,7 @@
<!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">
<?php $this->showMetaTitle(); ?> <?php $this->showMetaTitle(); ?>
@ -9,39 +10,45 @@
<?php $this->showMetaImage(); ?> <?php $this->showMetaImage(); ?>
<?php $this->showFavicon(); ?> <?php $this->showFavicon(); ?>
<?php $this->showVendor(); ?> <?php $this->showVendor(); ?>
<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); ?>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; ?>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'); ?>"> <link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>custom.css?<?php echo md5_file(self::DATA_DIR . 'custom.css'); ?>">
<!-- 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')) {
include(self::DATA_DIR .'head.inc.html'); echo '<script>';
}?> include(self::DATA_DIR . 'head.inc.html');
</head> echo '</script>';
<body> } ?>
</head>
<body>
<!-- Barre d'administration --> <!-- Barre d'administration -->
<?php if($this->getUser('group') > self::GROUP_MEMBER): ?> <?php if ($this->getUser('group') > self::GROUP_MEMBER) : ?>
<?php $this->showBar(); ?> <?php $this->showBar(); ?>
<?php endif;?> <?php endif; ?>
<!-- Notifications --> <!-- Notifications -->
<?php $this->showNotification(); ?> <?php $this->showNotification(); ?>
<!-- Menu dans le fond du site avant la bannière --> <!-- Menu dans le fond du site avant la bannière -->
<?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" >';
@ -49,148 +56,148 @@
?> ?>
<!-- Menu Burger --> <!-- Menu Burger -->
<div id="toggle"> <div id="toggle">
<?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?> <?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?> <?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div> <?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
<!-- fin du menu burger --> <!-- fin du menu burger -->
<?php <?php
$menuClass = $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"'; $menuClass = $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"';
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"'; $menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
?> ?>
<div id="menu" <?php echo $menuClass; ?> > <div id="menu" <?php echo $menuClass; ?>>
<?php $this->showMenu(); ?> <?php $this->showMenu(); ?>
</div> <!--fin menu --> </div> <!--fin menu -->
</nav> </nav>
<?php endif; ?> <?php endif; ?>
<!-- Bannière dans le fond du site --> <!-- Bannière dans le fond du site -->
<?php if($this->getData(['theme', 'header', 'position']) === 'body'): ?> <?php if ($this->getData(['theme', 'header', 'position']) === 'body') : ?>
<?php <?php
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : ''; $headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : ''; $headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
$headerClass .= $this->getData(['theme', 'header', 'wide']) === 'none' ? '' : 'container'; $headerClass .= $this->getData(['theme', 'header', 'wide']) === 'none' ? '' : 'container';
?> ?>
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"';?>> <header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"'; ?>>
<?php echo ($this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?> <?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
<?php if ($this->getData(['theme','header','feature']) === 'wallpaper' ): ?> <?php if ($this->getData(['theme', 'header', 'feature']) === 'wallpaper') : ?>
<?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 : ?>
<span id="themeHeaderTitle">&nbsp;</span> <span id="themeHeaderTitle">&nbsp;</span>
<?php endif; ?> <?php endif; ?>
<?php else: ?> <?php else : ?>
<div id="featureContent"> <div id="featureContent">
<?php echo $this->getData(['theme','header','featureContent']);?> <?php echo $this->getData(['theme', 'header', 'featureContent']); ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php echo ($this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '</a>' : '';?> <?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '</a>' : ''; ?>
</header> </header>
<?php endif; ?> <?php endif; ?>
<!-- Menu dans le fond du site après la bannière --> <!-- Menu dans le fond du site après la bannière -->
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-second'): ?> <?php if ($this->getData(['theme', 'menu', 'position']) === 'body-second') : ?>
<nav> <nav>
<!-- Menu burger --> <!-- Menu burger -->
<div id="toggle"> <div id="toggle">
<?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?> <?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?> <?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div> <?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
<!-- fin du menu burger --> <!-- fin du menu burger -->
<?php <?php
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"'; $menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
?> ?>
<div id="menu" <?php echo $menuClass; ?> > <div id="menu" <?php echo $menuClass; ?>>
<?php $this->showMenu(); ?></div> <?php $this->showMenu(); ?></div>
</nav> </nav>
<?php endif; ?> <?php endif; ?>
<!-- Site --> <!-- Site -->
<div id="site" class="container"> <div id="site" class="container">
<?php if($this->getData(['theme', 'menu', 'position']) === 'site-first'): ?> <?php if ($this->getData(['theme', 'menu', 'position']) === 'site-first') : ?>
<!-- Menu dans le site avant la bannière --> <!-- Menu dans le site avant la bannière -->
<nav> <nav>
<div id="toggle"> <div id="toggle">
<?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?> <?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?> <?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div> <?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
<div id="menu" class="container"><?php $this->showMenu(); ?></div> <div id="menu" class="container"><?php $this->showMenu(); ?></div>
</nav> </nav>
<?php endif; ?> <?php endif; ?>
<?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 -->
<?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?> <?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
<?php <?php
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : ''; $headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : ''; $headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
?> ?>
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"';?>> <header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"'; ?>>
<?php if ($this->getData(['theme','header','feature']) === 'wallpaper' ): ?> <?php if ($this->getData(['theme', 'header', 'feature']) === 'wallpaper') : ?>
<?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 : ?>
<span id="themeHeaderTitle">&nbsp;</span> <span id="themeHeaderTitle">&nbsp;</span>
<?php endif; ?> <?php endif; ?>
<?php else: ?> <?php else : ?>
<div id="featureContent"> <div id="featureContent">
<?php echo $this->getData(['theme','header','featureContent']);?> <?php echo $this->getData(['theme', 'header', 'featureContent']); ?>
</diV> </diV>
<?php endif; ?> <?php endif; ?>
</header> </header>
<?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '</a>' : ''; ?> <?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '</a>' : ''; ?>
<?php endif; ?> <?php endif; ?>
<?php if( <?php if (
$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 -->
<nav <?php if($this->getData(['theme', 'menu', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>> <nav <?php if ($this->getData(['theme', 'menu', 'position']) === 'hide') : ?>class="displayNone" <?php endif; ?>>
<div id="toggle"> <div id="toggle">
<?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?> <?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?> <?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div> <?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
<div id="menu" class="container"><?php $this->showMenu(); ?></div> <div id="menu" class="container"><?php $this->showMenu(); ?></div>
</nav> </nav>
<?php endif; ?> <?php endif; ?>
<!-- Corps de page --> <!-- Corps de page -->
<?php $this->showSection();?> <?php $this->showSection(); ?>
<!-- footer --> <!-- footer -->
<?php $this->showFooter();?> <?php $this->showFooter(); ?>
<!-- Fin du site --> <!-- Fin du site -->
<?php echo $this->getData(['theme', 'footer', 'position']) === 'site'? '</div>' : '';?> <?php echo $this->getData(['theme', 'footer', 'position']) === 'site' ? '</div>' : ''; ?>
<!-- Lien remonter en haut --> <!-- Lien remonter en haut -->
<div id="backToTop"><?php echo template::ico('up'); ?></div> <div id="backToTop"><?php echo template::ico('up'); ?></div>
<!-- Affichage du consentement aux cookies--> <!-- Affichage du consentement aux cookies-->
<?php $this->showCookies(); ?> <?php $this->showCookies(); ?>
<!-- Les scripts --> <!-- Les scripts -->
<?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>