Bilder-ordner-anzeigen-als-thumbnails.php


Quell Code


<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="https://stylehatch.github.io/photoset-grid/css/main1.css" />
      <link rel="stylesheet" href="https://stylehatch.github.io/photoset-grid/css/colorbox.css" />
    <link rel="stylesheet" href="https://nitinhayaran.github.io/Justified.js/jquery.justified.css">
    <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
</head>
<div class="photoset-grid-lightbox" data-layout="555555">
    <?php
    $link='';
        $ordner = "../bilder/im-kreiss-anzeigen";
        $allebilder = scandir($ordner);
        foreach ($allebilder as $bild) {
            $bildinfo = pathinfo($ordner."/".$bild); 
            $size = ceil(filesize($ordner."/".$bild)/1024); 
            if ($bild != "." && $bild != ".."  && $bild != "_notes" && $bildinfo['basename'] != "Thumbs.db") {
               $link.='<img height="200" width="200" src="'.$bildinfo['dirname'].'/'.$bildinfo['basename'].'" data-highres="'.$bildinfo['dirname'].'/'.$bildinfo['basename'].'">';
   
            };
        };
echo $link;
    ?>
</div>

  <script src="https://stylehatch.github.io/photoset-grid/jquery.photoset-grid.js"></script>
  <script src="https://stylehatch.github.io/photoset-grid/js/jquery.colorbox.js"></script>
 
<script>
  $('.photoset-grid-lightbox').photosetGrid({
    highresLinks: true,
    rel: 'withhearts-gallery',
    gutter: '12px',
    width:'800px',

    onComplete: function(){
      $('.photoset-grid-lightbox').attr('style', '');
      $('.photoset-grid-lightbox a').colorbox({
        photo: true,
        scalePhotos: true,
                maxHeight:'90%',
                maxWidth:'90%'
      });
    }
  });
</script>