<!DOCTYPE html>
<html lang="en"><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title><?php echo strip_tags($site['titre']); ?></title>
    <meta name="description" content="Un dérivé de XML collection">
    <meta name="keywords" content="<?php echo $site['keywords'] ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="subject" content="collection">

    <link rel="icon" type="image/png" href="app/images/favicon-16.png" sizes="16x16">
    <link rel="icon" type="image/png" href="app/images/favicon-32.png" sizes="32x32"> 
    <link rel="icon" type="image/png" href="app/images/favicon-96.png" sizes="96x96">

    <link rel="stylesheet" href="app/css/bootstrap.css">
    <link rel="stylesheet" href="app/css/heebo-fontfacekit/stylesheet.css">
    <link rel="stylesheet" href="app/css/trumbowyg.min.css">
    <link rel="stylesheet" href="app/css/main.css">
    <link rel="stylesheet" href="app/css/css-awesome/all.min.css">
    <?php 
    // charger les css du dossier custom
    $csss=glob(DOSSIER_CUSTOM."*.css");
          foreach($csss as $css){
              echo "<link rel=\"stylesheet\" href=\"".$css."\">\n";
          }
          $liste_criteres=implode(",",$xml->get_liste_pour_attribut("afficher","oui",array("illustration")));
    ?> 
    </head>
    <body data-type-action="<?= $menu_header["Action"]["default"]; ?>" data-type-tri="<?= $menu_header["Tri"]["default"]; ?>" data-type-affichage="items" data-items-infos="<?php echo $liste_criteres; ?>" data-items-search="<?php echo $liste_criteres; ?>">
        <!-- NAV -->
        <section class="container-fluid mt-2">
            <nav class="navbar navbar-expand-md navbar-light" id="main-navbar">
                <a class="navbar-brand" href="./"><?php echo $site['titre'] ?></a>
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#menu" aria-controls="menu" aria-expanded="false" aria-label="Toggle navigation">
                    <span><i class="navbar-toggler-icon"></i></span>
                </button>
                <div class="collapse navbar-collapse my-3 my-md-0" id="menu">
                    <ul class="navbar-nav ml-auto">
                        <?php
    // ici un chargement des pages custom comme par exemple "about"
    include(APP."inc/inc-menu-pages.php");
                        ?>
                        <li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle" href="#" id="admindropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                Admin
                            </a>
                            <div id="admin-menu" class="dropdown-menu" aria-labelledby="admindropdown">
                                <?php
                                include(APP."inc/inc-menu-admin.php");
                                ?>
                            </div>
                        </li>
                    </ul>
                </div>
            </nav>
        </section>
        <section class="container-fluid mb-3">
            <div id="descriptif" class="texte-medium mx-3">
                <?php echo $site['descriptif'] ?>
            </div>
        </section>
        <!-- END nav -->
        <?php
    // insert du pipeline en bottom
    if(file_exists(CHEMIN.DOSSIER_CUSTOM."insert-pre-mosaique.php")){
        include(CHEMIN.DOSSIER_CUSTOM."insert-pre-mosaique.php");
    }
        ?>
        <section class="container-fluid my-2"  id="toolbar">
            <div class="border-top border-bottom py-1 mx-3">
                <ul class="nav" id="toolnav">
                    <?php
                    foreach($menu_header as $titre => $i){
                        if($i["display"]){
                            echo "<li class=\"nav-item\">\n<a class=\"nav-link\" data-showhide=\"".$i["id"]."\" href=\"#\">". $titre ."</a></li>";
                        }
                    }
                    ?>
                </ul>
                <?php
                foreach($menu_header as $titre => $i){
                    if($i["display"]){
                        $file=CHEMIN.DOSSIER_CUSTOM."snippets/".$i["file"];
                        if(!file_exists($file)){
                            $file=APP."snippets/".$i["file"];
                        }
                        include($file);
                    }
                }
                ?>
            </div>
        </section>

