<?php
    /**
    *
    * copyright (c) 2013-2020 Heliac Technologies
    * license http://opensource.org/licenses/gpl-license.php GNU GPL v3 
    *
    * linee guida per l'utilizzo del logo http://www.geecom.org/articolo.php?id=34&alias=linee-guida-per-l%27uso-del-logo-geecom
    */

    $gestoreJavascript->aggiungiJavascript("<script src=\"https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.concat.min.js\"></script>
    <script type=\"text/javascript\">
        $(document).ready(function () {
            $(\"#sidebar\").mCustomScrollbar({
                theme: \"minimal\"
            });

            $('#dismiss, .overlay').on('click', function () {
                $('#sidebar').removeClass('active');
                $('.overlay').removeClass('active');
            });

            $('#sidebarCollapse').on('click', function () {
                $('#sidebar').addClass('active');
                $('.overlay').addClass('active');
                $('.collapse.in').toggleClass('in');
                $('a[aria-expanded=true]').attr('aria-expanded', 'false');
            });
        });
    </script>");
    
?>
<div class="wrapper">
   <?php 
        include"template/include/aspetto/{$aspettoSito["cartellaMenu"]}/menuPrincipale.php"; 
    ?>
    <div id="content" class="d-flex flex-column">
        <button id="sidebarCollapse" class="hamburger" type="button" aria-label="Menu" aria-controls="navbarCollapse">
            <span class="hamburger-box">
                <span class="hamburger-inner"></span>
            </span>
        </button>
        
        <header>
            <?php
                if($impostazioni["attivaBarraSuperiore"]=="si") {
                    include "template/include/aspetto/{$aspettoSito["cartellaMenu"]}/barraSuperiore.php";
                }
            ?>
        </header>

        <div class="page-wrapper">
            <main>
                <a class="navbar-brand" href="#">
                    <img class="img-fluid" src="<?= $configurazioneAspetto["logo"]; ?>" alt="logo">
                </a>
                <?php
                    UtilTemplate::stampaComponenti($geecomDb, $gestoreJavascript, $impostazioni, $contenuto["id"],$gestoreTraduzioni,$lingua);
                ?>
                </main>
            </div>
            <?php    
                include "template/include/aspetto/{$aspettoSito["cartellaFooter"]}/footer.php";
            ?>
    </div>
</div>
<div class="overlay"></div>