

/* highlights 圖片*/
let imgBlock = document.querySelector('.img-block');
let imgContent = [];

// index < 照片總數
for (let index = 0; index < 15; index++) {
  let dom = `
   <div class="col-4 col-lg-3">
      <a href="./img/Highlights/Image-${index + 1}.jpg" data-fancybox="gallery" data-caption="#${index + 1}">
        <img src="./img/Highlights/Image-${index + 1}.jpg" alt="Global AI Media Allianc" />
      </a>
    </div>`

  imgContent.push(dom);
}

imgBlock.innerHTML = imgContent.join(" ");

// 展開圖片清單
let dropdownBtn = document.querySelector('.dropdown');

dropdownBtn.addEventListener('click', () => {
  imgBlock.classList.toggle("show");
  dropdownBtn.classList.toggle("dropdown-rotate");
})

/* coming 圖片*/
let comingBlock = document.querySelector('.coming-block');
let comingContent = [];

for (let index = 0; index < 29; index++) {
  let dom = `
   <div class="col-4 col-lg-3">
      <a href="./img/coming-soon/cover-${index + 1}.jpg" data-fancybox="gallery" data-caption="#${index + 1}">
        <img src="./img/coming-soon/cover-${index + 1}.jpg" alt="Global AI Media Allianc" />
      </a>
    </div>`

  comingContent.push(dom);
}

comingBlock.innerHTML = comingContent.join(" ");
