ZwiiCMS/core/layout/main.php

201 lines
10 KiB
PHP
Raw Normal View History

2019-05-02 13:21:48 +02:00
<!DOCTYPE html>
2022-09-02 18:45:55 +02:00
<html prefix="og: http://ogp.me/ns#" lang="<?php echo self::$i18nContent;?>">
2019-09-17 18:22:43 +02:00
<head>
2020-11-01 07:56:04 +01:00
<meta charset="UTF-8">
2019-09-17 18:22:43 +02:00
<meta name="viewport" content="width=device-width, initial-scale=1">
2021-06-14 18:37:45 +02:00
<?php $this->showMetaTitle(); ?>
<?php $this->showMetaDescription(); ?>
<?php $this->showMetaType(); ?>
<?php $this->showMetaImage(); ?>
<?php $this->showFavicon(); ?>
<?php $this->showVendor(); ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css?<?php echo md5_file('core/layout/common.css');?>">
2020-03-23 16:16:45 +01:00
<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'); ?>">
2020-11-20 17:08:19 +01:00
<!-- Détection RSS -->
<?php if ( ( $this->getData(['page', $this->getUrl(0), 'moduleId']) === 'blog'
OR $this->getData(['page', $this->getUrl(0), 'moduleId']) === 'news' )
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">
<?php endif; ?>
2021-06-14 18:37:45 +02:00
<?php $this->showStyle(); ?>
2022-11-16 15:51:12 +01:00
<!-- 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 -->
2020-03-23 16:16:45 +01:00
<?php if (file_exists(self::DATA_DIR .'head.inc.html')) {
include(self::DATA_DIR .'head.inc.html');
2019-09-17 18:22:43 +02:00
}?>
</head>
<body>
<!-- Barre d'administration -->
<?php if($this->getUser('group') > self::GROUP_MEMBER): ?>
2021-06-14 18:37:45 +02:00
<?php $this->showBar(); ?>
<?php endif;?>
<!-- Notifications -->
2021-06-14 18:37:45 +02:00
<?php $this->showNotification(); ?>
<!-- Menu dans le fond du site avant la bannière -->
2021-11-18 11:34:19 +01:00
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top' ): ?>
2020-09-25 16:19:07 +02:00
<!-- Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté -->
<?php
if ( $this->getData(['theme', 'menu', 'position']) === 'top'
AND $this->getData(['theme', 'menu', 'fixed']) === true
2021-12-06 09:14:14 +01:00
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND $this->getUser('group') > self::GROUP_MEMBER) {
2020-09-25 16:19:07 +02:00
echo '<nav id="navfixedconnected" >';
} else {
echo '<nav id="navfixedlogout" >';
2020-09-25 11:49:11 +02:00
}
2020-09-25 16:19:07 +02:00
?>
<!-- Menu Burger -->
<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']) === 'logo' ? '<div id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?>
2022-08-27 10:17:43 +02:00
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
2021-11-12 12:59:58 +01:00
<!-- fin du menu burger -->
2021-11-18 11:34:19 +01:00
<?php
2021-11-12 12:59:58 +01:00
$menuClass = $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"';
2021-11-18 11:34:19 +01:00
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
2021-11-12 12:59:58 +01:00
?>
<div id="menu" <?php echo $menuClass; ?> >
2021-06-14 18:37:45 +02:00
<?php $this->showMenu(); ?>
2019-09-17 18:22:43 +02:00
</div> <!--fin menu -->
</nav>
<?php endif; ?>
<!-- Bannière dans le fond du site -->
2021-11-18 11:34:19 +01:00
<?php if($this->getData(['theme', 'header', 'position']) === 'body'): ?>
<?php
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
$headerClass .= $this->getData(['theme', 'header', 'wide']) === 'none' ? '' : 'container';
2021-11-11 15:54:57 +01:00
?>
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"';?>>
2021-11-11 15:54:57 +01:00
<?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', 'textHide']) === false
// Affiche toujours le titre de la bannière pour l'édition du thème
OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header')
): ?>
<span id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
<?php else: ?>
2021-11-11 15:54:57 +01:00
<span id="themeHeaderTitle">&nbsp;</span>
<?php endif; ?>
<?php else: ?>
<div id="featureContent">
<?php echo $this->getData(['theme','header','featureContent']);?>
</div>
2022-04-01 09:32:04 +02:00
<?php endif; ?>
<?php echo ($this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '</a>' : '';?>
2019-09-17 18:22:43 +02:00
</header>
2019-05-02 13:21:48 +02:00
<?php endif; ?>
<!-- Menu dans le fond du site après la bannière -->
2019-09-17 18:22:43 +02:00
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-second'): ?>
2021-11-18 11:34:19 +01:00
2019-09-17 18:22:43 +02:00
<nav>
2021-11-12 12:59:58 +01:00
<!-- Menu burger -->
<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']) === 'logo' ? '<div id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?>
2022-08-27 10:17:43 +02:00
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
2021-11-12 12:59:58 +01:00
<!-- fin du menu burger -->
2021-11-18 11:34:19 +01:00
<?php
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
2021-11-12 12:59:58 +01:00
?>
<div id="menu" <?php echo $menuClass; ?> >
<?php $this->showMenu(); ?></div>
2019-09-17 18:22:43 +02:00
</nav>
<?php endif; ?>
2019-09-17 18:22:43 +02:00
<!-- Site -->
<div id="site" class="container">
<?php if($this->getData(['theme', 'menu', 'position']) === 'site-first'): ?>
<!-- Menu dans le site avant la bannière -->
<nav>
<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']) === 'logo' ? '<div id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?>
2022-08-27 10:17:43 +02:00
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
2021-06-14 18:37:45 +02:00
<div id="menu" class="container"><?php $this->showMenu(); ?></div>
2019-09-17 18:22:43 +02:00
</nav>
<?php endif; ?>
2019-05-02 13:21:48 +02:00
<?php if(
2021-10-24 18:01:13 +02:00
$this->getData(['theme', 'header', 'position']) === 'site'
// Affiche toujours la bannière pour l'édition du thème
OR (
$this->getData(['theme', 'header', 'position']) === 'hide'
AND $this->getUrl(0) === 'theme'
)
): ?>
<!-- Bannière dans le site -->
<?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
2021-11-18 11:34:19 +01:00
<?php
2021-11-12 12:59:58 +01:00
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
?>
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"';?>>
2021-11-11 15:54:57 +01:00
<?php if ($this->getData(['theme','header','feature']) === 'wallpaper' ): ?>
<?php if(
$this->getData(['theme', 'header', 'textHide']) === false
// Affiche toujours le titre de la bannière pour l'édition du thème
OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header')
): ?>
<span id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
2021-10-24 18:01:13 +02:00
<?php else: ?>
2021-11-11 15:54:57 +01:00
<span id="themeHeaderTitle">&nbsp;</span>
2021-10-24 18:01:13 +02:00
<?php endif; ?>
2021-11-11 15:54:57 +01:00
<?php else: ?>
<div id="featureContent">
<?php echo $this->getData(['theme','header','featureContent']);?>
</diV>
<?php endif; ?>
2021-10-24 18:01:13 +02:00
</header>
<?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '</a>' : ''; ?>
2019-05-02 13:21:48 +02:00
<?php endif; ?>
2019-09-17 18:22:43 +02:00
<?php if(
$this->getData(['theme', 'menu', 'position']) === 'site-second' ||
$this->getData(['theme', 'menu', 'position']) === 'site'
// Affiche toujours le menu pour l'édition du thème
OR (
$this->getData(['theme', 'menu', 'position']) === 'hide'
AND $this->getUrl(0) === 'theme'
)
): ?>
<!-- Menu dans le site après la bannière -->
<nav <?php if($this->getData(['theme', 'menu', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
<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']) === 'logo' ? '<div id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?>
2022-08-27 10:17:43 +02:00
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
2021-06-14 18:37:45 +02:00
<div id="menu" class="container"><?php $this->showMenu(); ?></div>
2019-09-17 18:22:43 +02:00
</nav>
<?php endif; ?>
2019-09-17 18:22:43 +02:00
<!-- Corps de page -->
2021-10-25 17:51:30 +02:00
<?php $this->showSection();?>
2022-03-04 17:59:30 +01:00
2019-09-17 18:22:43 +02:00
<!-- footer -->
2021-10-25 17:51:30 +02:00
<?php $this->showFooter();?>
2021-10-25 18:08:43 +02:00
<!-- Fin du site -->
<?php echo $this->getData(['theme', 'footer', 'position']) === 'site'? '</div>' : '';?>
2021-10-25 18:08:43 +02:00
<!-- Lien remonter en haut -->
<div id="backToTop"><?php echo template::ico('up'); ?></div>
2022-03-04 17:59:30 +01:00
<!-- Affichage du consentement aux cookies-->
2021-11-18 11:34:19 +01:00
<?php $this->showCookies(); ?>
2021-10-25 18:08:43 +02:00
<!-- Les scripts -->
<?php $this->showScript();?>
<!-- Script perso dans body -->
<?php if (file_exists(self::DATA_DIR . 'body.inc.html')) {
include(self::DATA_DIR . 'body.inc.html');
}
?>
2021-10-25 18:08:43 +02:00
</body>
2021-11-18 11:34:19 +01:00
</html>