Skip to content

Commit

Permalink
try (last workss)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdarkle committed Sep 9, 2024
1 parent 9b17861 commit 22d4d42
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion js/dist/forum.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dist/forum.js.map

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,14 @@ app.initializers.add('darkle/fancybox', () => {
const index = Array.from(group).indexOf(link);

Fancybox.show(
Array.from(group).map(el => ({
src: el.href,
type: 'image',
})),
Array.from(group).map(el => {
const img = el.querySelector('img');
return {
src: img.getAttribute('data-src') || img.src,
thumb: img.src,
type: 'image',
};
}),
{
...fancyboxOptions,
startIndex: index,
Expand Down

0 comments on commit 22d4d42

Please sign in to comment.