Simplify image galleries: folder download link, no per-image download

Remove FileBrowser API fetch, async lightbox logic, and per-image
download button. Add a single folder share link per collection page
next to Back to Hub. Lightbox is now fully synchronous.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-27 20:33:49 +02:00
parent 696bc9c2a7
commit 781d3ef1e7
4 changed files with 28 additions and 244 deletions

View File

@@ -212,14 +212,6 @@
letter-spacing: 0.05em;
}
.loading-indicator {
font-family: 'Share Tech Mono', monospace;
color: var(--accent);
font-size: 0.8rem;
margin-top: 0.5rem;
display: none;
}
</style>
</head>
<body>
@@ -228,7 +220,10 @@
<span class="subtitle">2026present Collection</span>
<h1>Exopraxist</h1>
</div>
<div class="nav-actions">
<a href="images.html" class="nav-back">← Back to Hub</a>
<a href="https://files.exopraxist.org/share/97AGC2WQ" class="nav-back" target="_blank">↓ Download Folder</a>
</div>
</header>
<main>
@@ -240,28 +235,22 @@
<button class="lightbox-btn close-btn" id="close-btn">CLOSE [ESC]</button>
<img id="lightbox-img" src="" alt="">
<div id="lightbox-filename"></div>
<div id="loading-indicator" class="loading-indicator">UPGRADING TO FULL RESOLUTION...</div>
<div class="lightbox-controls">
<button class="lightbox-btn" id="prev-btn">PREV</button>
<a href="#" id="dl-btn" class="lightbox-btn" target="_blank">DOWNLOAD</a>
<button class="lightbox-btn" id="next-btn">NEXT</button>
</div>
</div>
</div>
<script>
const COLLECTION_TOKEN = '97AGC2WQ';
const THUMBNAILS = ["jl_bg_intermediate3.jpg","jl_wallpaper_desktop_F.jpg"];
let fbIndex = null;
let currentIndex = -1;
const galleryEl = document.getElementById('gallery');
const lightboxEl = document.getElementById('lightbox');
const lightboxImg = document.getElementById('lightbox-img');
const lightboxFilename = document.getElementById('lightbox-filename');
const dlBtn = document.getElementById('dl-btn');
const loadingIndicator = document.getElementById('loading-indicator');
function renderGallery() {
THUMBNAILS.forEach((filename, index) => {
@@ -274,57 +263,15 @@
});
}
async function getFBIndex() {
if (fbIndex) return fbIndex;
try {
const res = await fetch(`https://files.exopraxist.org/api/public/share/${COLLECTION_TOKEN}`);
const data = await res.json();
fbIndex = {};
for (const item of data.items) {
const stem = item.name.replace(/\.[^.]+$/, '');
fbIndex[stem] = item.name;
}
} catch (e) {
console.error('FileBrowser fetch failed:', e);
fbIndex = {};
}
return fbIndex;
}
async function openLightbox(index) {
function openLightbox(index) {
currentIndex = index;
const thumbFilename = THUMBNAILS[currentIndex];
const thumbUrl = `Exopraxist/thumbnails/${thumbFilename}`;
lightboxImg.src = thumbUrl;
lightboxImg.src = `Exopraxist/thumbnails/${thumbFilename}`;
lightboxFilename.textContent = thumbFilename;
dlBtn.href = thumbUrl;
loadingIndicator.style.display = 'block';
lightboxEl.style.display = 'flex';
document.body.style.overflow = 'hidden';
}
const stem = thumbFilename.replace('.jpg', '');
const idx = await getFBIndex();
const originalName = idx[stem];
if (originalName) {
const fullResUrl = `https://files.exopraxist.org/api/public/dl/${COLLECTION_TOKEN}/${encodeURIComponent(originalName)}`;
if (currentIndex === index) {
const img = new Image();
img.onload = () => {
if (currentIndex === index) {
lightboxImg.src = fullResUrl;
dlBtn.href = fullResUrl;
loadingIndicator.style.display = 'none';
}
};
img.src = fullResUrl;
}
} else {
loadingIndicator.style.display = 'none';
}
}
function closeLightbox() {
lightboxEl.style.display = 'none';

View File

@@ -211,14 +211,6 @@
letter-spacing: 0.05em;
}
.loading-indicator {
font-family: 'Share Tech Mono', monospace;
color: var(--accent);
font-size: 0.8rem;
margin-top: 0.5rem;
display: none;
}
</style>
</head>
<body>
@@ -227,7 +219,10 @@
<span class="subtitle">20222025 Collection</span>
<h1>MysterWizzard</h1>
</div>
<div class="nav-actions">
<a href="images.html" class="nav-back">← Back to Hub</a>
<a href="https://files.exopraxist.org/share/swAa4bTp" class="nav-back" target="_blank">↓ Download Folder</a>
</div>
</header>
<main>
@@ -239,28 +234,22 @@
<button class="lightbox-btn close-btn" id="close-btn">CLOSE [ESC]</button>
<img id="lightbox-img" src="" alt="">
<div id="lightbox-filename"></div>
<div id="loading-indicator" class="loading-indicator">UPGRADING TO FULL RESOLUTION...</div>
<div class="lightbox-controls">
<button class="lightbox-btn" id="prev-btn">PREV</button>
<a href="#" id="dl-btn" class="lightbox-btn" target="_blank">DOWNLOAD</a>
<button class="lightbox-btn" id="next-btn">NEXT</button>
</div>
</div>
</div>
<script>
const COLLECTION_TOKEN = 'swAa4bTp';
const THUMBNAILS = ["20240926_142229.jpg","20241127_195824.jpg","707ac20b-6197-4d14-8120-386662f8b757.jpg","71482354-65c6-4071-a5e5-656fd476635e.jpg","8DAD0415-7437-496B-8833-FEA53B54898C.jpg","a2e0e59a-7e73-46b8-a8b9-ca729908e599.jpg","b8d94cf9-98a1-44f3-a393-7eba7dc8c2cc.jpg","BLVD_ColorTest_Splash_5jpg.jpg","C572D811-090C-4080-BC9E-A0A4D6F2A513.jpg","Enlight96.jpg","Enlight97.jpg","FC17DC88-653C-4DE6-9714-FDEEC7B77559.jpg","IMG_0003.jpg","IMG_0004.jpg","IMG_0006.jpg","IMG_0007.jpg","IMG_0009.jpg","IMG_0010.jpg","IMG_0227.jpg","IMG_0233.jpg","IMG_2062.jpg","IMG_2094.jpg","IMG_2095.jpg","IMG_2096.jpg","IMG_2097.jpg","IMG_2098.jpg","IMG_2101.jpg","IMG_2172.jpg","IMG_2878.jpg","IMG_2883.jpg","IMG_2886.jpg","IMG_2888.jpg","IMG_2889.jpg","IMG_2903.jpg","IMG_2904.jpg","IMG_2905.jpg","IMG_2906.jpg","IMG_2907.jpg","IMG_2912.jpg","IMG_2913.jpg","IMG_2914.jpg","IMG_2919.jpg","IMG_2920.jpg","IMG_2921.jpg","IMG_2940.jpg","IMG_2941.jpg","IMG_2942.jpg","IMG_2949.jpg","IMG_2950.jpg","IMG_2951.jpg","IMG_2956.jpg","IMG_2957.jpg","IMG_2958.jpg","IMG_2973.jpg","IMG_2993.jpg","IMG_2994.jpg","IMG_2995.jpg","IMG_2996.jpg","IMG_2997.jpg","IMG_2998.jpg","IMG_2999.jpg","IMG_3001.jpg","IMG_3003.jpg","IMG_3004.jpg","IMG_3005.jpg","IMG_3011.jpg","IMG_3013.jpg","IMG_3027.jpg","IMG_3028.jpg","IMG_3029.jpg","IMG_3030.jpg","IMG_3041.jpg","IMG_3046.jpg","IMG_3047.jpg","IMG_3050.jpg","IMG_3051.jpg","IMG_3052.jpg","IMG_3069.jpg","IMG_3070.jpg","IMG_3558.jpg","IMG_3681.jpg","IMG_4298.jpg","IMG_4474.jpg","IMG_4919.jpg","IMG_5162.jpg","IMG_7493.jpg","IMG_7494.jpg","IMG_7495.jpg","IMG_7496.jpg","IMG_7500.jpg","IMG_9749.jpg","IMG_9753.jpg","IMG_9754.jpg","TShedza Skull Dressing Concept.jpg"];
let fbIndex = null;
let currentIndex = -1;
const galleryEl = document.getElementById('gallery');
const lightboxEl = document.getElementById('lightbox');
const lightboxImg = document.getElementById('lightbox-img');
const lightboxFilename = document.getElementById('lightbox-filename');
const dlBtn = document.getElementById('dl-btn');
const loadingIndicator = document.getElementById('loading-indicator');
function renderGallery() {
THUMBNAILS.forEach((filename, index) => {
@@ -273,57 +262,15 @@
});
}
async function getFBIndex() {
if (fbIndex) return fbIndex;
try {
const res = await fetch(`https://files.exopraxist.org/api/public/share/${COLLECTION_TOKEN}`);
const data = await res.json();
fbIndex = {};
for (const item of data.items) {
const stem = item.name.replace(/\.[^.]+$/, '');
fbIndex[stem] = item.name;
}
} catch (e) {
console.error('FileBrowser fetch failed:', e);
fbIndex = {};
}
return fbIndex;
}
async function openLightbox(index) {
function openLightbox(index) {
currentIndex = index;
const thumbFilename = THUMBNAILS[currentIndex];
const thumbUrl = `MysterWizzard/thumbnails/${thumbFilename}`;
lightboxImg.src = thumbUrl;
lightboxImg.src = `MysterWizzard/thumbnails/${thumbFilename}`;
lightboxFilename.textContent = thumbFilename;
dlBtn.href = thumbUrl;
loadingIndicator.style.display = 'block';
lightboxEl.style.display = 'flex';
document.body.style.overflow = 'hidden';
}
const stem = thumbFilename.replace('.jpg', '');
const idx = await getFBIndex();
const originalName = idx[stem];
if (originalName) {
const fullResUrl = `https://files.exopraxist.org/api/public/dl/${COLLECTION_TOKEN}/${encodeURIComponent(originalName)}`;
if (currentIndex === index) {
const img = new Image();
img.onload = () => {
if (currentIndex === index) {
lightboxImg.src = fullResUrl;
dlBtn.href = fullResUrl;
loadingIndicator.style.display = 'none';
}
};
img.src = fullResUrl;
}
} else {
loadingIndicator.style.display = 'none';
}
}
function closeLightbox() {
lightboxEl.style.display = 'none';

View File

@@ -216,14 +216,6 @@
letter-spacing: 0.05em;
}
.loading-indicator {
font-family: 'Share Tech Mono', monospace;
color: var(--accent);
font-size: 0.8rem;
margin-top: 0.5rem;
display: none;
}
</style>
</head>
<body>
@@ -232,7 +224,10 @@
<span class="subtitle">20152021 Collection</span>
<h1>YourNomadSoul</h1>
</div>
<div class="nav-actions">
<a href="images.html" class="nav-back">← Back to Hub</a>
<a href="https://files.exopraxist.org/share/yNytp9Di" class="nav-back" target="_blank">↓ Download Folder</a>
</div>
</header>
<main>
@@ -244,28 +239,22 @@
<button class="lightbox-btn close-btn" id="close-btn">CLOSE [ESC]</button>
<img id="lightbox-img" src="" alt="">
<div id="lightbox-filename"></div>
<div id="loading-indicator" class="loading-indicator">UPGRADING TO FULL RESOLUTION...</div>
<div class="lightbox-controls">
<button class="lightbox-btn" id="prev-btn">PREV</button>
<a href="#" id="dl-btn" class="lightbox-btn" target="_blank">DOWNLOAD</a>
<button class="lightbox-btn" id="next-btn">NEXT</button>
</div>
</div>
</div>
<script>
const COLLECTION_TOKEN = 'yNytp9Di';
const THUMBNAILS = ["03E15F7E-3C6F-4F97-B4C9-6795DA2AA5D9.jpg","10B9A361-651C-48B6-B546-A8B1FAFD1C63.jpg","13F18846-DE0A-4241-9871-918FEE42E99C.jpg","1E43042E-FED5-41C0-B6CC-1B2EBB2AC444.jpg","1F78EFFE-1047-4FD8-AF3E-02CF401E1301.jpg","20250424_153909.jpg","20250509_013815.jpg","2476C9EC-AF3D-4C6A-A4EC-C02DE23E19DC.jpg","255ADCA7-B3FC-45AC-B8A2-F467CE943B69.jpg","28C577F5-E72D-4A80-9713-F6B2D9B9481A.jpg","2E5C2060-D6FD-48B4-B73D-A23B54C8ACF6.jpg","302B44E4-0B31-4A0F-9706-9416779C69F6.jpg","37562198-5802-42D1-AD08-D5676245FF95.jpg","38301693-900F-4A86-B204-EC3ED225110C.jpg","420FDA25-6214-4994-8B3C-E5BC37250847.jpg","464B57C7-F7CA-4982-A1F7-6EFF374EEBF7.jpg","538DD231-EE16-451B-AFB3-118561D31BA4.jpg","556AD25E-D25F-4A61-8910-B295820E8824.jpg","5BFF1175-6213-4E53-B0EF-60C264044DC7.jpg","5D09E88F-DC1E-464E-AAE5-391B25A3844E.jpg","61ED267A-372A-4DF0-8AB7-AE7FF061D00B.jpg","65E63360-02D8-4D39-AF52-270B9EE20743.jpg","66E9E706-CABD-4845-B4A9-210240B14C60.jpg","6A71F1C3-5C6A-43FC-B098-C09C0429454D.jpg","6B143887-9178-467B-B712-0C75630AE6AE.jpg","72134D18-616F-4C60-83B8-2BD87E72AD19.jpg","7A938D4C-FA4F-4C4E-95F4-4A2F6EF65EC5.jpg","7DEF89AC-E0C1-42A4-9719-EA49D6CB654F.jpg","84A8BEBA-444A-4AAF-9783-432487B2EBC3.jpg","92A53036-1ECD-473C-8543-4C217B59977C.jpg","9D22BCCD-BCC1-4835-A19D-90666B31614B.jpg","A3F0ECCA-F462-415E-A5FC-5C266BB964EF.jpg","A943A54B-5434-4D75-9748-D7CF26BE8C7A.jpg","B7AFD385-7C23-43E9-BFAF-E3C7E0637992.jpg","BB8106F0-D6B2-4790-B5F4-2E3ABA132E5B.jpg","C0B2F65C-FE7B-4C87-A320-C3CE3B096DDA.jpg","C84F9036-CBFE-4A0C-AE36-7DDC10F38FBF.jpg","CE783D3C-EAE6-4307-BA68-69479458085C.jpg","CFDF72B8-893C-42BA-AFF4-0662DBAE75CD.jpg","D6121816-C247-444A-8FDB-BECA57195AC1.jpg","D6924AED-E593-459C-946D-EEDC9D9CF85C.jpg","DE5E965E-2C42-4245-8F97-3B1CDFD92612.jpg","E21A56E3-5221-447E-A255-20060248785E.jpg","E5C22C2D-036F-4CA6-9677-592E21F360EF.jpg","E75BF5E2-6389-47C7-8F92-5903C566B1CD.jpg","EA6FEF34-CE32-44F9-86E9-409DB1AEE150.jpg","Enlight1-15.jpg","Enlight1-16.jpg","Enlight1-1.jpg","Enlight1-2 (copy 1).jpg","Enlight14.jpg","Enlight1-5 (copy 1).jpg","Enlight15.jpg","Enlight16.jpg","Enlight1-7.jpg","Enlight17.jpg","Enlight1-8.jpg","Enlight18.jpg","Enlight1-9.jpg","Enlight1 (copy 1).jpg","Enlight1.jpg","Enlight25.jpg","Enlight28.jpg","Enlight30.jpg","Enlight31.jpg","Enlight32.jpg","Enlight34.jpg","Enlight35.jpg","Enlight41.jpg","Enlight42.jpg","Enlight43.jpg","Enlight53.jpg","Enlight57.jpg","Enlight5.jpg","Enlight65.jpg","Enlight66.jpg","Enlight67.jpg","Enlight69.jpg","Enlight6.jpg","Enlight75.jpg","Enlight77.jpg","Enlight79.jpg","Enlight7.jpg","Enlight80.jpg","Enlight81.jpg","Enlight82.jpg","Enlight84.jpg","Enlight85.jpg","Enlight87.jpg","Enlight88.jpg","Enlight89.jpg","Enlight8.jpg","Enlight93.jpg","F4B3B056-C476-412B-A360-7DC55190406B.jpg","IMG_0006.jpg","IMG_0081.jpg","IMG_0146.jpg","IMG_0232.jpg","IMG_0526.jpg","IMG_0844.jpg","IMG_0876.jpg","IMG_0878.jpg","IMG_0881.jpg","IMG_0883.jpg","IMG_0935.jpg","IMG_0938.jpg","IMG_0940.jpg","IMG_0958.jpg","IMG_0959.jpg","IMG_0960.jpg","IMG_0961.jpg","IMG_0962.jpg","IMG_0963.jpg","IMG_0983.jpg","IMG_0985.jpg","IMG_0986.jpg","IMG_0987.jpg","IMG_0988.jpg","IMG_0989.jpg","IMG_1002.jpg","IMG_1028.jpg","IMG_1029.jpg","IMG_1030.jpg","IMG_1035.jpg","IMG_1052.jpg","IMG_1053.jpg","IMG_1063.jpg","IMG_1093.jpg","IMG_1095.jpg","IMG_1131.jpg","IMG_1132.jpg","IMG_1134.jpg","IMG_1139.jpg","IMG_1142.jpg","IMG_1143.jpg","IMG_1144.jpg","IMG_1157.jpg","IMG_1158.jpg","IMG_1159.jpg","IMG_1161.jpg","IMG_1163.jpg","IMG_1192.jpg","IMG_1193.jpg","IMG_1194.jpg","IMG_1231.jpg","IMG_1232.jpg","IMG_1233.jpg","IMG_1256.jpg","IMG_1257.jpg","IMG_1258.jpg","IMG_1259.jpg","IMG_1260.jpg","IMG_1261.jpg","IMG_1262.jpg","IMG_1263.jpg","IMG_1308.jpg","IMG_1309.jpg","IMG_1310.jpg","IMG_1472.jpg","IMG_1601.jpg","IMG_2190.jpg","IMG_2816.jpg","IMG_3012.jpg","IMG_3017.jpg","IMG_3018.jpg","IMG_3019.jpg","IMG_3059.jpg","IMG_3060.jpg","IMG_3061.jpg","IMG_3077.jpg","IMG_3078.jpg","IMG_3079.jpg","IMG_3082.jpg","IMG_3109.jpg","IMG_3110.jpg","IMG_3111.jpg","IMG_3125.jpg","IMG_3126.jpg","IMG_3134.jpg","IMG_3135.jpg","IMG_3143.jpg","IMG_3144.jpg","IMG_3145.jpg","IMG_3162.jpg","IMG_3163.jpg","IMG_3164.jpg","IMG_3181.jpg","IMG_3182.jpg","IMG_3183.jpg","IMG_3189.jpg","IMG_3575.jpg","IMG_3576.jpg","IMG_3577.jpg","IMG_3578.jpg","IMG_4182.jpg","IMG_4185.jpg","IMG_4191.jpg","IMG_4193.jpg","IMG_4195.jpg","IMG_4273.jpg","IMG_4274.jpg","IMG_4275.jpg","IMG_4288.jpg","IMG_4289.jpg","IMG_4418.jpg","IMG_4430.jpg","IMG_4431.jpg","IMG_4432.jpg","IMG_4433.jpg","IMG_4434.jpg","IMG_6075.jpg","IMG_6117.jpg","IMG_6118.jpg","IMG_6119.jpg","IMG_6120.jpg","IMG_6121.jpg","IMG_7296.jpg","IMG_7297.jpg","IMG_7298.jpg","IMG_8180.jpg","IMG_8181.jpg","IMG_8184.jpg","IMG_8185.jpg"];
let fbIndex = null;
let currentIndex = -1;
const galleryEl = document.getElementById('gallery');
const lightboxEl = document.getElementById('lightbox');
const lightboxImg = document.getElementById('lightbox-img');
const lightboxFilename = document.getElementById('lightbox-filename');
const dlBtn = document.getElementById('dl-btn');
const loadingIndicator = document.getElementById('loading-indicator');
function renderGallery() {
THUMBNAILS.forEach((filename, index) => {
@@ -278,57 +267,15 @@
});
}
async function getFBIndex() {
if (fbIndex) return fbIndex;
try {
const res = await fetch(`https://files.exopraxist.org/api/public/share/${COLLECTION_TOKEN}`);
const data = await res.json();
fbIndex = {};
for (const item of data.items) {
const stem = item.name.replace(/\.[^.]+$/, '');
fbIndex[stem] = item.name;
}
} catch (e) {
console.error('FileBrowser fetch failed:', e);
fbIndex = {};
}
return fbIndex;
}
async function openLightbox(index) {
function openLightbox(index) {
currentIndex = index;
const thumbFilename = THUMBNAILS[currentIndex];
const thumbUrl = `YourNomadSoul/thumbnails/${thumbFilename}`;
lightboxImg.src = thumbUrl;
lightboxImg.src = `YourNomadSoul/thumbnails/${thumbFilename}`;
lightboxFilename.textContent = thumbFilename;
dlBtn.href = thumbUrl;
loadingIndicator.style.display = 'block';
lightboxEl.style.display = 'flex';
document.body.style.overflow = 'hidden';
}
const stem = thumbFilename.replace('.jpg', '');
const idx = await getFBIndex();
const originalName = idx[stem];
if (originalName) {
const fullResUrl = `https://files.exopraxist.org/api/public/dl/${COLLECTION_TOKEN}/${encodeURIComponent(originalName)}`;
if (currentIndex === index) {
const img = new Image();
img.onload = () => {
if (currentIndex === index) {
lightboxImg.src = fullResUrl;
dlBtn.href = fullResUrl;
loadingIndicator.style.display = 'none';
}
};
img.src = fullResUrl;
}
} else {
loadingIndicator.style.display = 'none';
}
}
function closeLightbox() {
lightboxEl.style.display = 'none';

View File

@@ -216,14 +216,6 @@
letter-spacing: 0.05em;
}
.loading-indicator {
font-family: 'Share Tech Mono', monospace;
color: var(--accent);
font-size: 0.8rem;
margin-top: 0.5rem;
display: none;
}
</style>
</head>
<body>
@@ -232,7 +224,10 @@
<span class="subtitle">20102014 Collection</span>
<h1>WayBack</h1>
</div>
<div class="nav-actions">
<a href="images.html" class="nav-back">← Back to Hub</a>
<a href="https://files.exopraxist.org/share/voxb2LeQ" class="nav-back" target="_blank">↓ Download Folder</a>
</div>
</header>
<main>
@@ -244,28 +239,22 @@
<button class="lightbox-btn close-btn" id="close-btn">CLOSE [ESC]</button>
<img id="lightbox-img" src="" alt="">
<div id="lightbox-filename"></div>
<div id="loading-indicator" class="loading-indicator">UPGRADING TO FULL RESOLUTION...</div>
<div class="lightbox-controls">
<button class="lightbox-btn" id="prev-btn">PREV</button>
<a href="#" id="dl-btn" class="lightbox-btn" target="_blank">DOWNLOAD</a>
<button class="lightbox-btn" id="next-btn">NEXT</button>
</div>
</div>
</div>
<script>
const COLLECTION_TOKEN = 'voxb2LeQ';
const THUMBNAILS = ["3DCB5B82-94E6-4BA0-A382-3A98007038F2.jpg","BreakermanAvatar1.jpg","ChristmiesPortrait3_low.jpg","ChristmiesPortrait_low.jpg","_DSC3150.jpg","Enlight100.jpg","Enlight1-2.jpg","Enlight1-4 (copy 1).jpg","Enlight1-4.jpg","Enlight27.jpg","Enlight33.jpg","Enlight37.jpg","Enlight38.jpg","Enlight39.jpg","Enlight40.jpg","Enlight44.jpg","Enlight46.jpg","Enlight47.jpg","Enlight48.jpg","Enlight49.jpg","Enlight50.jpg","Enlight51.jpg","Enlight54.jpg","Enlight55.jpg","Enlight56.jpg","Enlight68.jpg","Enlight70.jpg","Enlight71.jpg","Enlight72.jpg","Enlight73.jpg","Enlight74.jpg","Enlight76.jpg","Enlight94.jpg","Enlight95.jpg","Enlight98.jpg","Enlight99.jpg","Enlight9.jpg","IMG_0375.jpg","IMG_0787.jpg","IMG_0791.jpg","IMG_0828.jpg","IMG_0831.jpg","IMG_0835.jpg","IMG_0941.jpg","IMG_0944.jpg","IMG_0948.jpg","IMG_0970.jpg","IMG_0971.jpg","IMG_0972.jpg","IMG_1207.jpg","IMG_1208.jpg","IMG_1209.jpg","IMG_1210.jpg","IMG_1211.jpg","IMG_1212.jpg","IMG_1214.jpg","IMG_1215.jpg","IMG_1216.jpg","IMG_2610.jpg","IMG_2611.jpg","IMG_2612.jpg","IMG_2613.jpg","IMG_2614.jpg","IMG_2615.jpg","IMG_2616.jpg","IMG_2669.jpg","IMG_2684.jpg","IMG_2685.jpg","IMG_2696.jpg","IMG_2697.jpg","IMG_3123.jpg","IMG_3124.jpg","IMG_3188.jpg","IMG_3190.jpg","IMG_3482.jpg","IMG_3483.jpg","IMG_3484.jpg","IMG_3485.jpg","IMG_3486.jpg","IMG_3509.jpg","IMG_3512.jpg","IMG_3515.jpg","IMG_3516.jpg","IMG_3517.jpg","IMG_3751.jpg","IMG_3752.jpg","IMG_3760.jpg","JncPortraits1.jpg","JncPortraits2.jpg","JncPortraits3.jpg","Jnc_Teaser2.jpg","JnC_Teaser3.jpg","JnC_Teaser4.jpg","JnC_Teaser.jpg","ORT_ad1.jpg","ORT_ad2.jpg","ORT_ad3.jpg","ORT_ad4.jpg","TJF Cover photo2.jpg","TJF Cover photo3.jpg","TJF Cover photo4.jpg","TJF Cover photo5.jpg","TJF Cover photo6.jpg"];
const THUMBNAILS =["3DCB5B82-94E6-4BA0-A382-3A98007038F2.jpg","BreakermanAvatar1.jpg","ChristmiesPortrait3_low.jpg","ChristmiesPortrait_low.jpg","_DSC3150.jpg","Enlight100.jpg","Enlight1-2.jpg","Enlight1-4 (copy 1).jpg","Enlight1-4.jpg","Enlight27.jpg","Enlight33.jpg","Enlight37.jpg","Enlight38.jpg","Enlight39.jpg","Enlight40.jpg","Enlight44.jpg","Enlight46.jpg","Enlight47.jpg","Enlight48.jpg","Enlight49.jpg","Enlight50.jpg","Enlight51.jpg","Enlight54.jpg","Enlight55.jpg","Enlight56.jpg","Enlight68.jpg","Enlight70.jpg","Enlight71.jpg","Enlight72.jpg","Enlight73.jpg","Enlight74.jpg","Enlight76.jpg","Enlight94.jpg","Enlight95.jpg","Enlight98.jpg","Enlight99.jpg","Enlight9.jpg","IMG_0375.jpg","IMG_0787.jpg","IMG_0791.jpg","IMG_0828.jpg","IMG_0831.jpg","IMG_0835.jpg","IMG_0941.jpg","IMG_0944.jpg","IMG_0948.jpg","IMG_0970.jpg","IMG_0971.jpg","IMG_0972.jpg","IMG_1207.jpg","IMG_1208.jpg","IMG_1209.jpg","IMG_1210.jpg","IMG_1211.jpg","IMG_1212.jpg","IMG_1214.jpg","IMG_1215.jpg","IMG_1216.jpg","IMG_2610.jpg","IMG_2611.jpg","IMG_2612.jpg","IMG_2613.jpg","IMG_2614.jpg","IMG_2615.jpg","IMG_2616.jpg","IMG_2669.jpg","IMG_2684.jpg","IMG_2685.jpg","IMG_2696.jpg","IMG_2697.jpg","IMG_3123.jpg","IMG_3124.jpg","IMG_3188.jpg","IMG_3190.jpg","IMG_3482.jpg","IMG_3483.jpg","IMG_3484.jpg","IMG_3485.jpg","IMG_3486.jpg","IMG_3509.jpg","IMG_3512.jpg","IMG_3515.jpg","IMG_3516.jpg","IMG_3517.jpg","IMG_3751.jpg","IMG_3752.jpg","IMG_3760.jpg","JncPortraits1.jpg","JncPortraits2.jpg","JncPortraits3.jpg","Jnc_Teaser2.jpg","JnC_Teaser3.jpg","JnC_Teaser4.jpg","JnC_Teaser.jpg","ORT_ad1.jpg","ORT_ad2.jpg","ORT_ad3.jpg","ORT_ad4.jpg","TJF Cover photo2.jpg","TJF Cover photo3.jpg","TJF Cover photo4.jpg","TJF Cover photo5.jpg","TJF Cover photo6.jpg"];
let fbIndex = null;
let currentIndex = -1;
const galleryEl = document.getElementById('gallery');
const lightboxEl = document.getElementById('lightbox');
const lightboxImg = document.getElementById('lightbox-img');
const lightboxFilename = document.getElementById('lightbox-filename');
const dlBtn = document.getElementById('dl-btn');
const loadingIndicator = document.getElementById('loading-indicator');
function renderGallery() {
THUMBNAILS.forEach((filename, index) => {
@@ -278,59 +267,13 @@
});
}
async function getFBIndex() {
if (fbIndex) return fbIndex;
try {
const res = await fetch(`https://files.exopraxist.org/api/public/share/${COLLECTION_TOKEN}`);
const data = await res.json();
fbIndex = {};
for (const item of data.items) {
const stem = item.name.replace(/\.[^.]+$/, '');
fbIndex[stem] = item.name;
}
} catch (e) {
console.error('FileBrowser fetch failed:', e);
fbIndex = {};
}
return fbIndex;
}
async function openLightbox(index) {
function openLightbox(index) {
currentIndex = index;
const thumbFilename = THUMBNAILS[currentIndex];
const thumbUrl = `WayBack/thumbnails/${thumbFilename}`;
// Show thumbnail immediately
lightboxImg.src = thumbUrl;
lightboxImg.src = `WayBack/thumbnails/${thumbFilename}`;
lightboxFilename.textContent = thumbFilename;
dlBtn.href = thumbUrl;
loadingIndicator.style.display = 'block';
lightboxEl.style.display = 'flex';
document.body.style.overflow = 'hidden';
// Lazy upgrade to full-res
const stem = thumbFilename.replace('.jpg', '');
const idx = await getFBIndex();
const originalName = idx[stem];
if (originalName) {
const fullResUrl = `https://files.exopraxist.org/api/public/dl/${COLLECTION_TOKEN}/${encodeURIComponent(originalName)}`;
// Only update if still on the same image
if (currentIndex === index) {
const img = new Image();
img.onload = () => {
if (currentIndex === index) {
lightboxImg.src = fullResUrl;
dlBtn.href = fullResUrl;
loadingIndicator.style.display = 'none';
}
};
img.src = fullResUrl;
}
} else {
loadingIndicator.style.display = 'none';
}
}
function closeLightbox() {