{"id":1757,"date":"2026-12-03T08:59:29","date_gmt":"2026-12-03T08:59:29","guid":{"rendered":"https:\/\/apsacongress2026.arch.hku.hk\/?page_id=1757"},"modified":"2026-12-03T09:02:42","modified_gmt":"2026-12-03T09:02:42","slug":"gallery-technical-tour","status":"publish","type":"page","link":"https:\/\/apsacongress2026.arch.hku.hk\/index.php\/gallery-technical-tour\/","title":{"rendered":"Gallery &#8211; Technical Tour"},"content":{"rendered":"\n<script data-wp-block-html=\"js\">\n\/\/ Kawaii Ninja\ndocument.addEventListener('DOMContentLoaded', () => {\n  sortPictures();\n\n  const galleryImages = Array.from(\n    document.querySelectorAll('.wp-block-gallery img, .gallery-item img')\n  );\n  if (!galleryImages.length) return;\n\n  let isOpen = false;\n  let currentIndex = 0;\n  let closeTimer = null;\n  let previousOverflow = '';\n\n  \/\/ Create lightbox overlay\n  const overlay = document.createElement('div');\n  overlay.className = 'vanilla-lightbox';\n  overlay.setAttribute('role', 'dialog');\n  overlay.setAttribute('aria-modal', 'true');\n  overlay.style.cssText = `\n    position: fixed; inset: 0; display: none; align-items: center; justify-content: center;\n    background: rgba(0, 0, 0, 0.88); z-index: 99999; padding: 24px; cursor: zoom-out;\n    opacity: 0; transition: opacity 0.25s ease; user-select: none;\n  `;\n\n  \/\/ Create image element\n  const imgEl = document.createElement('img');\n  imgEl.style.cssText = `\n    max-width: 88vw; max-height: 88vh; object-fit: contain; cursor: default;\n    transform: scale(0.94); opacity: 0;\n    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;\n  `;\n\n  \/\/ Helper to create control buttons\n  const createBtn = (label, text, extraStyles) => {\n    const btn = document.createElement('button');\n    btn.type = 'button';\n    btn.setAttribute('aria-label', label);\n    btn.innerHTML = text;\n    btn.style.cssText = `\n      position: fixed; background: rgba(255, 255, 255, 0.14); color: #fff;\n      border: none; border-radius: 50%; width: 44px; height: 44px;\n      font-size: 24px; line-height: 1; cursor: pointer;\n      display: flex; align-items: center; justify-content: center;\n      transition: background 0.2s ease, transform 0.2s ease;\n      ${extraStyles}\n    `;\n    btn.addEventListener('mouseenter', () => {\n      btn.style.background = 'rgba(255, 255, 255, 0.28)';\n    });\n    btn.addEventListener('mouseleave', () => {\n      btn.style.background = 'rgba(255, 255, 255, 0.14)';\n    });\n    return btn;\n  };\n\n  const closeBtn = createBtn('Close lightbox', '&times;', 'top: 20px; right: 20px;');\n  const prevBtn = createBtn('Previous image', '&#8249;', 'left: 20px; top: 50%; transform: translateY(-50%);');\n  const nextBtn = createBtn('Next image', '&#8250;', 'right: 20px; top: 50%; transform: translateY(-50%);');\n\n  \/\/ Hide arrows if there is only 1 image\n  if (galleryImages.length <= 1) {\n    prevBtn.style.display = 'none';\n    nextBtn.style.display = 'none';\n  }\n\n  overlay.appendChild(imgEl);\n  overlay.appendChild(closeBtn);\n  overlay.appendChild(prevBtn);\n  overlay.appendChild(nextBtn);\n  document.body.appendChild(overlay);\n\n  const getFullSrc = (img) => {\n    const parentLink = img.closest('a');\n    const fallbackSrc = img.srcset\n      ? img.srcset.split(',')[0].trim().split(' ')[0]\n      : (img.dataset.fullSrc || img.currentSrc || img.src);\n\n    let finalSrc = (parentLink && parentLink.href) ? parentLink.href : fallbackSrc;\n\n    if (finalSrc.endsWith('-scaled.jpg')) {\n      finalSrc = finalSrc.replace('-scaled', '');\n    }\n    return finalSrc;\n  };\n\n  const showImageAt = (index) => {\n    currentIndex = (index + galleryImages.length) % galleryImages.length;\n    const targetImg = galleryImages[currentIndex];\n    imgEl.src = getFullSrc(targetImg);\n    imgEl.alt = targetImg.alt || '';\n  };\n\n  const openLightbox = (index) => {\n    clearTimeout(closeTimer);\n    isOpen = true;\n\n    \/\/ Lock background scroll\n    previousOverflow = document.body.style.overflow;\n    document.body.style.overflow = 'hidden';\n\n    showImageAt(index);\n    overlay.style.display = 'flex';\n\n    requestAnimationFrame(() => {\n      requestAnimationFrame(() => {\n        overlay.style.opacity = '1';\n        imgEl.style.opacity = '1';\n        imgEl.style.transform = 'scale(1)';\n      });\n    });\n  };\n\n  const closeLightbox = () => {\n    if (!isOpen) return;\n    isOpen = false;\n\n    overlay.style.opacity = '0';\n    imgEl.style.opacity = '0';\n    imgEl.style.transform = 'scale(0.94)';\n\n    \/\/ Restore background scroll\n    document.body.style.overflow = previousOverflow;\n\n    closeTimer = setTimeout(() => {\n      overlay.style.display = 'none';\n      imgEl.src = '';\n    }, 280);\n  };\n\n  galleryImages.forEach((img, index) => {\n    img.style.cursor = 'zoom-in';\n    img.addEventListener('click', (e) => {\n      e.preventDefault();\n      openLightbox(index);\n    });\n  });\n\n  \/\/ Prevent clicks on image\/buttons from closing overlay\n  imgEl.addEventListener('click', (e) => e.stopPropagation());\n  prevBtn.addEventListener('click', (e) => {\n    e.stopPropagation();\n    showImageAt(currentIndex - 1);\n  });\n  nextBtn.addEventListener('click', (e) => {\n    e.stopPropagation();\n    showImageAt(currentIndex + 1);\n  });\n  closeBtn.addEventListener('click', (e) => {\n    e.stopPropagation();\n    closeLightbox();\n  });\n\n  overlay.addEventListener('click', closeLightbox);\n\n  \/\/ Keyboard navigation (Escape, Left, Right)\n  document.addEventListener('keydown', (e) => {\n    if (!isOpen) return;\n    if (e.key === 'Escape') closeLightbox();\n    if (e.key === 'ArrowLeft' && galleryImages.length > 1) showImageAt(currentIndex - 1);\n    if (e.key === 'ArrowRight' && galleryImages.length > 1) showImageAt(currentIndex + 1);\n  });\n});\n\nfunction sortPictures() {\n  const div = document.getElementById(\"sumomo\");\n  var pics = [];\n  for (const element of div.children) {\n    pics.push(element);\n  }\n  pics.sort(function (a, b) {\n    return ('' + a.firstChild.src).localeCompare('' + b.firstChild.src);\n  });\n  div.innerHTML = \"\";\n  for (const sorted of pics) {\n    div.appendChild(sorted);\n  }\n}\n<\/script>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\" id=\"sumomo\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" data-id=\"1723\" src=\"https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.24-1-1.jpeg\" alt=\"\" class=\"wp-image-1723\" srcset=\"https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.24-1-1.jpeg 1024w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.24-1-1-300x225.jpeg 300w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.24-1-1-768x576.jpeg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" data-id=\"1639\" src=\"https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.24.jpeg\" alt=\"\" class=\"wp-image-1639\" srcset=\"https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.24.jpeg 1024w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.24-300x225.jpeg 300w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.24-768x576.jpeg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" data-id=\"1638\" src=\"https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.24-1.jpeg\" alt=\"\" class=\"wp-image-1638\" srcset=\"https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.24-1.jpeg 1024w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.24-1-300x225.jpeg 300w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.24-1-768x576.jpeg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" data-id=\"1637\" src=\"https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.23.jpeg\" alt=\"\" class=\"wp-image-1637\" srcset=\"https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.23.jpeg 1024w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.23-300x225.jpeg 300w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.23-768x576.jpeg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" data-id=\"1636\" src=\"https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.23-1.jpeg\" alt=\"\" class=\"wp-image-1636\" srcset=\"https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.23-1.jpeg 1024w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.23-1-300x225.jpeg 300w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.23-1-768x576.jpeg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"1024\" data-id=\"1635\" src=\"https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.22.jpeg\" alt=\"\" class=\"wp-image-1635\" srcset=\"https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.22.jpeg 768w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_WhatsApp-Image-2026-12-02-at-12.32.22-225x300.jpeg 225w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" data-id=\"1634\" src=\"https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_Technical-Tour-4-1024x768.jpeg\" alt=\"\" class=\"wp-image-1634\" srcset=\"https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_Technical-Tour-4-1024x768.jpeg 1024w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_Technical-Tour-4-300x225.jpeg 300w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_Technical-Tour-4-768x576.jpeg 768w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_Technical-Tour-4-1536x1152.jpeg 1536w, https:\/\/apsacongress2026.arch.hku.hk\/wp-content\/uploads\/2026\/12\/Tour_Technical-Tour-4-2048x1536.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/figure>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":1635,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1757","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/apsacongress2026.arch.hku.hk\/index.php\/wp-json\/wp\/v2\/pages\/1757","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apsacongress2026.arch.hku.hk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/apsacongress2026.arch.hku.hk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/apsacongress2026.arch.hku.hk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/apsacongress2026.arch.hku.hk\/index.php\/wp-json\/wp\/v2\/comments?post=1757"}],"version-history":[{"count":3,"href":"https:\/\/apsacongress2026.arch.hku.hk\/index.php\/wp-json\/wp\/v2\/pages\/1757\/revisions"}],"predecessor-version":[{"id":1771,"href":"https:\/\/apsacongress2026.arch.hku.hk\/index.php\/wp-json\/wp\/v2\/pages\/1757\/revisions\/1771"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/apsacongress2026.arch.hku.hk\/index.php\/wp-json\/wp\/v2\/media\/1635"}],"wp:attachment":[{"href":"https:\/\/apsacongress2026.arch.hku.hk\/index.php\/wp-json\/wp\/v2\/media?parent=1757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}