ZwiiCMS/core/layout/main.php

217 lines
10 KiB
PHP
Raw Normal View History

2019-05-02 13:21:48 +02:00
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$siteContent, 0, 2); ?>">
2024-01-03 00:03:36 +01:00
<head>
<meta charset="UTF-8">
2024-10-02 12:15:53 +02:00
<meta http-equiv="content-type" content="text/html;">
2023-02-17 17:15:19 +01:00
<meta meta="description=" content="ZwiiCMS le CMS multilingue sans base de données">
<meta name="generator" content="ZiiCMS https://forge.chapril.org/ZwiiCMS-Team/ZwiiCMS">
<meta name="viewport" content="width=device-width, initial-scale=1">
2023-03-07 09:32:04 +01:00
<?php $layout->showMetaTitle(); ?>
<?php $layout->showMetaDescription(); ?>
<?php $layout->showMetaType(); ?>
<?php $layout->showMetaImage(); ?>
<?php $layout->showFavicon(); ?>
<?php $layout->showVendor(); ?>
<?php $layout->showFonts(); ?>
<?php if (file_exists(self::DATA_DIR . 'font/font.css')): ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>font/font.css?<?php echo md5_file(self::DATA_DIR . 'font/font.css'); ?>">
<?php endif; ?>
2024-01-03 00:03:36 +01:00
<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'); ?>">
<!-- Détection RSS -->
2024-01-03 00:03:36 +01:00
<?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
2024-01-03 00:03:36 +01:00
): ?>
<link rel="alternate" type="application/rss+xml"
href="'<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>" title="fLUX rss">
<?php endif; ?>
2023-03-07 09:32:04 +01:00
<?php $layout->showStyle(); ?>
<?php $layout->showInlineStyle(); ?>
<!-- Script perso dans le header -->
<?php if (file_exists(self::DATA_DIR . 'head.inc.html')) {
include(self::DATA_DIR . 'head.inc.html');
} ?>
</head>
2024-01-03 00:03:36 +01:00
<body>
<!-- Barre d'administration -->
2024-01-03 00:03:36 +01:00
<?php if ($this->getUser('group') > self::GROUP_MEMBER): ?>
2023-03-07 09:32:04 +01:00
<?php $layout->showBar(); ?>
<?php endif; ?>
<!-- Notifications -->
2023-03-07 09:32:04 +01:00
<?php $layout->showNotification(); ?>
<!-- Menu dans le fond du site avant la bannière -->
2024-01-03 00:03:36 +01:00
<?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é -->
<?php
if (
$this->getData(['theme', 'menu', 'position']) === 'top'
and $this->getData(['theme', 'menu', 'fixed']) === true
2024-09-06 17:32:29 +02:00
and $this->isConnected() === true
and $this->getUser('group') > self::GROUP_MEMBER
) {
echo '<nav id="navfixedconnected" >';
} else {
echo '<nav id="navfixedlogout" >';
}
?>
<!-- Menu Burger -->
<div id="toggle">
2024-01-03 00:03:36 +01:00
<?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 template::ico('menu', ['fontSize' => '2em']); ?>
</div>
<!-- fin du menu burger -->
<?php
2024-01-03 00:03:36 +01:00
$menuClass = $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"';
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
?>
<div id="menu" <?php echo $menuClass; ?>>
2023-03-07 09:32:04 +01:00
<?php $layout->showMenu(); ?>
</div> <!--fin menu -->
</nav>
<?php endif; ?>
<!-- Bannière dans le fond du site -->
2024-01-03 00:03:36 +01:00
<?php if ($this->getData(['theme', 'header', 'position']) === 'body'): ?>
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
<?php
2024-01-03 00:03:36 +01:00
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
$headerClass .= $this->getData(['theme', 'header', 'wide']) === 'none' ? '' : 'container';
?>
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"'; ?>>
2024-01-03 00:03:36 +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')
2024-01-03 00:03:36 +01:00
): ?>
<span id="themeHeaderTitle">
<?php echo $this->getData(['locale', 'title']); ?>
</span>
<?php else: ?>
<span id="themeHeaderTitle">&nbsp;</span>
<?php endif; ?>
2024-01-03 00:03:36 +01:00
<?php else: ?>
<div id="featureContent">
<?php echo $this->getData(['theme', 'header', 'featureContent']); ?>
</div>
<?php endif; ?>
</header>
2024-01-03 00:03:36 +01:00
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '</a>' : ''; ?>
<?php endif; ?>
<!-- Menu dans le fond du site après la bannière -->
2024-01-03 00:03:36 +01:00
<?php if ($this->getData(['theme', 'menu', 'position']) === 'body-second'): ?>
<nav>
<!-- Menu burger -->
<div id="toggle">
2024-01-03 00:03:36 +01:00
<?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 template::ico('menu', ['fontSize' => '2em']); ?>
</div>
<!-- fin du menu burger -->
<?php
2024-01-03 00:03:36 +01:00
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
?>
<div id="menu" <?php echo $menuClass; ?>>
2024-01-03 00:03:36 +01:00
<?php $layout->showMenu(); ?>
</div>
</nav>
<?php endif; ?>
<!-- Site -->
<div id="site" class="container">
2024-01-03 00:03:36 +01:00
<?php if ($this->getData(['theme', 'menu', 'position']) === 'site-first'): ?>
<!-- Menu dans le site avant la bannière -->
<nav>
<div id="toggle">
2024-01-03 00:03:36 +01:00
<?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 template::ico('menu', ['fontSize' => '2em']); ?>
</div>
<div id="menu" class="container">
<?php $layout->showMenu(); ?>
</div>
2019-09-17 18:22:43 +02:00
</nav>
<?php endif; ?>
<?php if (
$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'
)
2024-01-03 00:03:36 +01:00
): ?>
<!-- Bannière dans le site -->
2024-01-03 00:03:36 +01:00
<?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
2024-01-03 00:03:36 +01:00
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
2021-11-11 15:54:57 +01:00
?>
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"'; ?>>
2024-01-03 00:03:36 +01:00
<?php if ($this->getData(['theme', 'header', 'feature']) === 'wallpaper'): ?>
<?php if (
2021-11-11 15:54:57 +01:00
$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')
2024-01-03 00:03:36 +01:00
): ?>
<span id="themeHeaderTitle">
<?php echo $this->getData(['locale', 'title']); ?>
</span>
<?php else: ?>
<span id="themeHeaderTitle">&nbsp;</span>
2021-11-11 15:54:57 +01:00
<?php endif; ?>
2024-01-03 00:03:36 +01:00
<?php else: ?>
2021-11-11 15:54:57 +01:00
<div id="featureContent">
<?php echo $this->getData(['theme', 'header', 'featureContent']); ?>
</diV>
2022-04-01 09:32:04 +02:00
<?php endif; ?>
2019-09-17 18:22:43 +02:00
</header>
2024-01-03 00:03:36 +01:00
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '</a>' : ''; ?>
2019-05-02 13:21:48 +02:00
<?php endif; ?>
<?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'
)
2024-01-03 00:03:36 +01:00
): ?>
2019-09-17 18:22:43 +02:00
<!-- Menu dans le site après la bannière -->
2024-01-03 00:03:36 +01:00
<nav <?php if ($this->getData(['theme', 'menu', 'position']) === 'hide'): ?>class="displayNone" <?php endif; ?>>
<div id="toggle">
2024-01-03 00:03:36 +01:00
<?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 template::ico('menu', ['fontSize' => '2em']); ?>
</div>
<div id="menu" class="container">
<?php $layout->showMenu(); ?>
</div>
2019-09-17 18:22:43 +02:00
</nav>
<?php endif; ?>
<!-- Corps de page -->
2023-08-05 16:20:19 +02:00
<?php $layout->showMain(); ?>
<!-- footer -->
2023-03-07 09:32:04 +01:00
<?php $layout->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 -->
2024-01-03 00:03:36 +01:00
<div id="backToTop">
<?php echo template::ico('up'); ?>
</div>
2022-03-04 17:59:30 +01:00
<!-- Affichage du consentement aux cookies-->
2023-03-07 09:32:04 +01:00
<?php $layout->showCookies(); ?>
2021-10-25 18:08:43 +02:00
<!-- Les scripts -->
2023-03-07 09:32:04 +01:00
<?php $layout->showScript(); ?>
<!-- Script perso dans body -->
<?php if (file_exists(self::DATA_DIR . 'body.inc.html')) {
include(self::DATA_DIR . 'body.inc.html');
2024-01-03 00:03:36 +01:00
} ?>
</body>
</html>