<div class="wrapper">
    <?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
        */
        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>
        <div class="page-wrapper">
            <header>
                <?php 
                    if($impostazioni["attivaBarraSuperiore"]=="si") {
                        include "template/include/aspetto/{$aspettoSito["cartellaMenu"]}/barraSuperiore.php";
                    }
                ?>
            </header>
            <main>
                <a class="navbar-brand d-md-none" href="<?= $impostazioni["urlSito"]; ?>">
                    <img class="img-fluid" src="<?= $configurazioneAspetto["logo"]; ?>" alt="logo">
                </a>
                
                <?php 
                    if(isset($categoria) && $categoria["foto"]!="") {
                        echo "<div class=\"container mt-4\">
                                <div class=\"row px-3 header-categoria\">
                                    <div class=\"col-md-4 col-lg-3 background-image\" style=\"background: url('{$categoria["foto"]}');\">&nbsp;</div>
                                    <div class=\"col-md-8 col-lg-9 p-5 bg-light\">
                                        <h1>{$categoria["nome"]}</h1>
                                        {$categoria["descrizione"]}
                                    </div>
                                </div>
                            </div>";
                    }
                    else if(isset($categoria) && $categoria["descrizione"]!="") {
                        echo "<div class=\"container mt-3\">{$categoria["descrizione"]}</div>";
                    }
                    $motoreRicerca->eseguiRicerca($aspettoSito,$paginaCorrente);
                ?>
            </main>
        </div>
        <?php
            include "template/include/aspetto/{$aspettoSito["cartellaFooter"]}/footer.php";
            echo $inclusioni["footer"];
        ?>
   </div>
    
    <div class="overlay"></div>
    <?php
        $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>");