<div class="fs-small py-1" id="collections-container">
    <?php
    $collecs=glob(CONTENTS."collections/*.yaml");
    $grid="grid-reg6";
    if(count($collecs)>=6){
        $grid="grid-reg7";
    }
    if(count($collecs)>=15){
        $grid="grid-reg8";
    }
    if(count($collecs)>=20){
        $grid="grid-reg10";
    }
    ?>
    <div class="grid grid-gap-1 <?= $grid ?>">
        <?php
        
        foreach($collecs as $collec){
            $co=new yamlReadwriter(); 
            // trouver le bon snippet
            $snippet=getSnippetFile("display_collection.php");
            $co->loadYaml(getTemplate("structure_collection.yaml")); // charger la structure 
            $co->loadContentFromYaml($collec);
            include($snippet);
        } 
        ?>
    </div>
    <?php
    if(!count($collecs)){
        echo "Pas de collection actuellement.";
    }
    ?>
</div>