fd
This commit is contained in:
parent
fcc5b01d16
commit
4fafb2e9aa
|
|
@ -64,4 +64,69 @@ body { background: var(--bg-body); color: #444; }
|
|||
width: 40px; height: 40px; background: var(--accent); color: white;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
border-radius: 50%; font-weight: bold;
|
||||
}
|
||||
|
||||
/* --- SIDEBAR STRUCTURE --- */
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
bottom: 20px;
|
||||
width: 260px;
|
||||
z-index: 996;
|
||||
transition: all 0.3s;
|
||||
padding: 20px;
|
||||
overflow-y: auto;
|
||||
background: #1e293b; /* Bleu Nuit */
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.sidebar-nav .nav-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
color: rgba(255,255,255,0.7);
|
||||
padding: 12px 15px;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.sidebar-nav .nav-link.active, .sidebar-nav .nav-link:hover {
|
||||
background: rgba(8, 197, 209, 0.15);
|
||||
color: #08C5D1;
|
||||
}
|
||||
|
||||
/* --- MAIN TOOLBAR --- */
|
||||
.main-nav-toolbar {
|
||||
background: white;
|
||||
padding: 15px 25px;
|
||||
border-radius: 15px;
|
||||
border: 1px solid #edf2f7;
|
||||
margin-top: -10px; /* Aligné avec le haut du main */
|
||||
}
|
||||
|
||||
.nav-pill-item {
|
||||
padding: 8px 16px;
|
||||
border-radius: 10px;
|
||||
text-decoration: none;
|
||||
color: #64748b;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
transition: 0.2s;
|
||||
}
|
||||
|
||||
.nav-pill-item.active {
|
||||
background: #08C5D1;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
/* --- FIX DES SUPERPOSITIONS --- */
|
||||
#main {
|
||||
margin-left: 300px !important; /* Sidebar (260) + Marge (40) */
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
@media (max-width: 1199px) {
|
||||
#main { margin-left: 20px !important; }
|
||||
}
|
||||
|
|
@ -25,19 +25,6 @@
|
|||
$imgData = $_SESSION['photoAssureCrypte'];
|
||||
?>
|
||||
|
||||
<?php
|
||||
// On définit le chemin du dossier includes par rapport au fichier actuel
|
||||
$inc_path = __DIR__ . '/includes/';
|
||||
|
||||
include($inc_path . 'head-meta.php');
|
||||
include($inc_path . 'header.php');
|
||||
include($inc_path . 'sidebar.php');
|
||||
include($inc_path . 'main-navigation.php');
|
||||
include($inc_path . 'barre-contexte.php');
|
||||
include($inc_path . 'modals.php');
|
||||
include($inc_path . 'scripts-footer.php');
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
|
|
|
|||
|
|
@ -13,4 +13,4 @@
|
|||
<link href="<?= $url ?>Bootstrap_new/css/select2.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
|
||||
|
||||
<link href="<?= $url ?>Bootstrap_new/css/theme-modern.css?ver=2026.02.23.00" rel="stylesheet">
|
||||
<link href="<?= $url ?>Bootstrap_new/css/theme-modern.css?ver=2026.02.23.10" rel="stylesheet">
|
||||
|
|
@ -1,23 +1,29 @@
|
|||
<?php
|
||||
// Protection et récupération des données comme dans ton fichier 04 original
|
||||
if(isset($menusvue) && count($menusvue) > 0):
|
||||
$current_url = $_SERVER['REQUEST_URI'];
|
||||
?>
|
||||
<div class="main-navigation-wrapper mb-4">
|
||||
<div class="scrollmenu shadow-sm p-2 rounded-pill bg-white d-inline-flex">
|
||||
<?php foreach ($menusvue as $menu):
|
||||
$isActive = (basename($menu['lienMenu']) == basename($current_url));
|
||||
?>
|
||||
<a title="<?= $menu['descriptionMenu']; ?>"
|
||||
href="<?= $menu['lienMenu']; ?>"
|
||||
class="nav-pill-link <?= $isActive ? 'active' : '' ?>">
|
||||
<?= $menu['libeleMenu'] ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
<?php if(isset($menusvue) && count($menusvue) > 0): ?>
|
||||
<div class="main-nav-toolbar mb-4">
|
||||
<div class="d-flex align-items-center">
|
||||
<nav class="nav-breadcrumb me-4">
|
||||
<span class="text-muted small"><?= $activeLevel1 ?></span>
|
||||
<i class="bi bi-chevron-right mx-2 text-silver"></i>
|
||||
<span class="fw-bold"><?= $activeLevel2 ?></span>
|
||||
</nav>
|
||||
|
||||
<div class="nav-pills-wrapper">
|
||||
<div class="nav-pills-scroll">
|
||||
<?php foreach ($menusvue as $menu):
|
||||
$isActive = (basename($menu['lienMenu']) == basename($_SERVER['REQUEST_URI']));
|
||||
?>
|
||||
<a href="<?= $menu['lienMenu'] ?>" class="nav-pill-item <?= $isActive ? 'active' : '' ?>">
|
||||
<?= $menu['libeleMenu'] ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<input class="sr-only d-none" type="text" id="vue" name="vue" value="<?= $_SESSION['vue'] ?? '' ?>">
|
||||
<input class="sr-only d-none" type="text" id="racineWeb" name="racineWeb" value="<?= $racineWeb ?>">
|
||||
<input class="sr-only d-none" type="text" id="dureeSession" name="dureeSession" value="<?= $_SESSION['dureeSession'] ?>">
|
||||
<div class="d-none">
|
||||
<input type="text" id="vue" value="<?= $_SESSION['vue'] ?? '' ?>">
|
||||
<input type="text" id="racineWeb" value="<?= $racineWeb ?>">
|
||||
<input type="text" id="dureeSession" value="<?= $_SESSION['dureeSession'] ?>">
|
||||
</div>
|
||||
|
|
@ -1,42 +1,41 @@
|
|||
<aside id="sidebar" class="sidebar shadow-lg">
|
||||
<aside id="sidebar" class="sidebar">
|
||||
<div class="sidebar-header d-flex align-items-center justify-content-center py-4 d-lg-none">
|
||||
<img src="<?= $racineWeb ?>Bootstrap_new/images/new/favicon.png" alt="Logo" height="30">
|
||||
</div>
|
||||
|
||||
<ul class="sidebar-nav" id="sidebar-nav">
|
||||
<?php foreach ($menus as $key0 => $menuParent):
|
||||
$menuChildrenLevelOne = $gabary->get_menus_by_parent_code($menuParent['vue']);
|
||||
$hasChildren = (count($menuChildrenLevelOne) > 0);
|
||||
$parentID = "menu-" . $menuParent['codeMenu'] . $key0;
|
||||
|
||||
// Logique d'activation (Basée sur ton fichier 03)
|
||||
$isActiveParent = (strtolower($menuParent['libeleMenu']) == strtolower($activeLevel1));
|
||||
$menuChildren = $gabary->get_menus_by_parent_code($menuParent['vue']);
|
||||
$hasChildren = (count($menuChildren) > 0);
|
||||
$targetId = "menu-" . $menuParent['codeMenu'] . $key0;
|
||||
$isActive = (strtolower($menuParent['libeleMenu']) == strtolower($activeLevel1));
|
||||
?>
|
||||
<li class="nav-item">
|
||||
<?php if ($hasChildren): ?>
|
||||
<a class="nav-link <?= $isActiveParent ? '' : 'collapsed' ?>"
|
||||
data-bs-target="#<?= $parentID ?>"
|
||||
<a class="nav-link <?= $isActive ? '' : 'collapsed' ?>"
|
||||
data-bs-target="#<?= $targetId ?>"
|
||||
data-bs-toggle="collapse" href="#">
|
||||
<i class="<?= $menuParent['icone'] ?> fs-5"></i>
|
||||
<i class="<?= $menuParent['icone'] ?>"></i>
|
||||
<span><?= $menuParent['libeleMenu'] ?></span>
|
||||
<i class="bi bi-chevron-down ms-auto"></i>
|
||||
<i class="bi bi-chevron-down ms-auto fs-xs"></i>
|
||||
</a>
|
||||
<ul id="<?= $parentID ?>"
|
||||
class="nav-content collapse <?= $isActiveParent ? 'show' : '' ?>"
|
||||
<ul id="<?= $targetId ?>"
|
||||
class="nav-content collapse <?= $isActive ? 'show' : '' ?>"
|
||||
data-bs-parent="#sidebar-nav">
|
||||
<?php foreach ($menuChildrenLevelOne as $menuChild):
|
||||
$link_clean = explode('/', $menuChild['lienMenu'])[0];
|
||||
$isSubActive = ($link_clean == $_SESSION['firstLevelMenu']);
|
||||
<?php foreach ($menuChildren as $menuChild):
|
||||
$isSubActive = (explode('/', $menuChild['lienMenu'])[0] == $_SESSION['firstLevelMenu']);
|
||||
?>
|
||||
<li>
|
||||
<a href="<?= $menuChild['lienMenu'] ?>"
|
||||
class="<?= $isSubActive ? 'active-submenu' : '' ?>">
|
||||
<i class="bi bi-circle"></i>
|
||||
<a href="<?= $menuChild['lienMenu'] ?>" class="<?= $isSubActive ? 'active' : '' ?>">
|
||||
<i class="bi bi-dot"></i>
|
||||
<span><?= $menuChild['libeleMenu'] ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<a class="nav-link <?= $isActiveParent ? '' : 'collapsed' ?>"
|
||||
href="<?= $menuParent['lienMenu'] ?>">
|
||||
<i class="<?= $menuParent['icone'] ?> fs-5"></i>
|
||||
<a class="nav-link <?= $isActive ? '' : 'collapsed' ?>" href="<?= $menuParent['lienMenu'] ?>">
|
||||
<i class="<?= $menuParent['icone'] ?>"></i>
|
||||
<span><?= $menuParent['libeleMenu'] ?></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user