File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -418,12 +418,12 @@ const allTalksData = await getProcessedTalks();
418418 images.forEach(img => {
419419 // Skip icons or small decorative images
420420 if (img.width < 40 || img.height < 40) return;
421- // Skip if already wrapped or has a parent link
422- if (img.closest('a ')) return;
421+ // Skip if already wrapped with fancybox
422+ if (img.closest('[data-fancybox] ')) return;
423423
424- const wrapper = document.createElement('a ');
424+ const wrapper = document.createElement('span ');
425425 wrapper.setAttribute('data-fancybox', 'gallery');
426- wrapper.setAttribute('href ', img.src);
426+ wrapper.setAttribute('data-src ', img.src);
427427 wrapper.setAttribute('data-caption', img.alt || '');
428428 wrapper.className = 'cursor-zoom-in block my-6 overflow-hidden rounded-sm border-4 border-[#0284c7] shadow-[6px_6px_0px_0px_#0284c7] hover:shadow-[10px_10px_0px_0px_#10b981] transition-all duration-300 transform hover:scale-[1.01]';
429429
@@ -442,6 +442,7 @@ const allTalksData = await getProcessedTalks();
442442 try {
443443 Fancybox.destroy();
444444 Fancybox.bind('[data-fancybox]', {
445+ placeFocusBack: false,
445446 carousel: { friction: 0.8 },
446447 Toolbar: {
447448 display: {
You can’t perform that action at this time.
0 commit comments