f
This commit is contained in:
parent
37601dbc34
commit
c6e8284cce
|
|
@ -1,21 +1,25 @@
|
|||
<?php
|
||||
// Versioning automatique pour le cache navigateur
|
||||
$version = date('YmdHi');
|
||||
// Définir la racine absolue du projet
|
||||
|
||||
// $racineWeb est défini dans gabarit.php, on le garde
|
||||
// Exemple: $racineWeb = '/newdesignstationnaire/';
|
||||
?>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- On garde la balise base avec $racineWeb -->
|
||||
<base href="<?= $racineWeb ?>">
|
||||
|
||||
<!-- Favicon - chemin absolu depuis la base -->
|
||||
<!-- Favicon - chemin relatif à la base -->
|
||||
<link rel="icon" href="Bootstrap_new/images/favicon.ico"/>
|
||||
|
||||
<!-- Google Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:opsz@14..32&display=swap" rel="stylesheet">
|
||||
<!-- Google Fonts : Inter -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.gstatic.com" rel="preconnect">
|
||||
|
||||
<!-- Vendor CSS Files - chemins absolus depuis la base -->
|
||||
<!-- Vendor CSS Files -->
|
||||
<link href="Bootstrap/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="Bootstrap/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
|
||||
<link href="Bootstrap/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
|
||||
|
|
@ -34,4 +38,26 @@ $version = date('YmdHi');
|
|||
|
||||
<!-- Chart.js -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2.0.0"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2.0.0"></script>
|
||||
|
||||
<style>
|
||||
/* Style de secours minimal en attendant le chargement du CSS */
|
||||
body {
|
||||
font-family: 'Inter', sans-serif;
|
||||
margin: 0;
|
||||
background: #f4f6f9;
|
||||
}
|
||||
.sidebar {
|
||||
width: 260px;
|
||||
background: #1a2b3c;
|
||||
color: white;
|
||||
position: fixed;
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.main {
|
||||
margin-left: 260px;
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,40 +1,43 @@
|
|||
<aside id="sidebar" class="sidebar">
|
||||
<ul class="sidebar-nav" id="sidebar-nav">
|
||||
<?php foreach ($menus as $key0 => $menuParent):
|
||||
$menuChildrenLevelOne = $gabary->get_menus_by_parent_code($menuParent['vue']);
|
||||
$hasChildren = !empty($menuChildrenLevelOne);
|
||||
$parentLink = explode('/', $menuParent['lienMenu'])[0];
|
||||
<div class="sidebar-brand">
|
||||
<img src="Bootstrap_new/images/new/favicon.png" alt="Inter Santé" style="width: 40px;">
|
||||
<span>INTER SANTE</span>
|
||||
</div>
|
||||
|
||||
<ul class="sidebar-nav">
|
||||
<?php foreach ($menus as $menuParent):
|
||||
$menuChildren = $gabary->get_menus_by_parent_code($menuParent['vue']);
|
||||
$hasChildren = !empty($menuChildren);
|
||||
$isActive = (strtolower($menuParent['libeleMenu']) == strtolower($activeLevel1));
|
||||
?>
|
||||
<?php if ($hasChildren): ?>
|
||||
<!-- Menu Parent avec enfants -->
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?= $isActive ? '' : 'collapsed' ?>" data-bs-target="#nav-<?= $menuParent['codeMenu'].$key0 ?>" data-bs-toggle="collapse" href="#">
|
||||
<li class="nav-item">
|
||||
<?php if ($hasChildren): ?>
|
||||
<a class="nav-link <?= $isActive ? '' : 'collapsed' ?>"
|
||||
data-bs-target="#menu-<?= $menuParent['codeMenu'] ?>"
|
||||
data-bs-toggle="collapse"
|
||||
href="#">
|
||||
<i class="<?= $menuParent['icone'] ?>"></i>
|
||||
<span><?= $menuParent['libeleMenu'] ?></span>
|
||||
<span><?= _($menuParent['libeleMenu']) ?></span>
|
||||
<i class="bi bi-chevron-down ms-auto"></i>
|
||||
</a>
|
||||
<ul id="nav-<?= $menuParent['codeMenu'].$key0 ?>" class="nav-content collapse <?= $isActive ? 'show' : '' ?>" data-bs-parent="#sidebar-nav">
|
||||
<?php foreach ($menuChildrenLevelOne as $menuChild):
|
||||
$childLink = explode('/', $menuChild['lienMenu'])[0];
|
||||
?>
|
||||
<ul id="menu-<?= $menuParent['codeMenu'] ?>"
|
||||
class="nav-content collapse <?= $isActive ? 'show' : '' ?>">
|
||||
<?php foreach ($menuChildren as $child): ?>
|
||||
<li>
|
||||
<a href="<?= $menuChild['lienMenu'] ?>" class="<?= ($childLink == $activeLink) ? 'active' : '' ?>">
|
||||
<i class="bi bi-circle"></i><span><?= $menuChild['libeleMenu'] ?></span>
|
||||
<a href="<?= $child['lienMenu'] ?>">
|
||||
<i class="bi bi-circle"></i>
|
||||
<span><?= _($child['libeleMenu']) ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<!-- Menu Parent sans enfant (lien direct) -->
|
||||
<li class="nav-item">
|
||||
<?php else: ?>
|
||||
<a class="nav-link" href="<?= $menuParent['lienMenu'] ?>">
|
||||
<i class="<?= $menuParent['icone'] ?>"></i>
|
||||
<span><?= $menuParent['libeleMenu'] ?></span>
|
||||
<span><?= _($menuParent['libeleMenu']) ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</aside>
|
||||
Loading…
Reference in New Issue
Block a user