

<head>

    <script src="https://cdn.jsdelivr.net/npm/jquery@3.4.0/dist/jquery.min.js"></script>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css">
  <script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
</head>
<body>


<div class="GAP25" >

<div class="ttl"><h1><?= $current->title ?></h1></div></div>
<main class="main">
  <div class="container">
  <? $ic=0; foreach($current->getImages() as $f){  ?>
    <div class="card">
      <div class="card-image">
        <a href= "<?= $f ?>" data-fancybox="gallery" data-caption="">
        <img src="<?= $f ?>" alt="Image Gallery">
  </a>
      </div>
    </div>
	<? $ic++; } ?>

  </div>

</main>
  
</body>



<style>

.container {
  max-width: 80rem;
  width: 100%;
  padding: 4rem 2rem;
  margin: 0 auto;
}

.main .container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 1rem;
    justify-content: center;
    align-items: center;
  }

  .card {
    color: black;
    border-radius: 2px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.24);}

.card-image {
      position: relative;
      display: block;
      width: 100%;
      padding-top: 70%;
      background: white;}

.card-image img {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

@media only screen and (max-width: 600px) {
  .main .container {
      display: grid;
      grid-template-columns: 1fr;
      grid-gap: 1rem;
    }
  }

</style>
<script>
$('[data-fancybox="gallery"]').fancybox({
  buttons: [
    "slideShow",
    "thumbs",
    "zoom",
    "fullScreen",
    "share",
    "close"
  ],
  loop: false,
  protect: true
});
</script>

