Log in Sign up

Lightbox

questions tagged ‘Lightbox’

Is it possible to connect Lightbox Gallery?

I really want to connect the gallery with a grid, for example "lightGallery". I've spent a lot of time trying to embed the gallery, gone through dozens of options, and all possible combinations, nothing works. As if something is blocking or not loading scripts and styles. Maybe the structure in the template is different from the usual one, or I'm doing something wrong. The example is for the Magazine template. Did I understand the structure correctly: "Index.html" is → "header.html" The "head" element, which is usually at the beginning of "Index.html" (header.html), is here a separate file → "head.html". The "body" element, which is usually in the middle of "Index.html" (header.html), is also a separate file → "footer.html". It follows that to "head.html" I add references to the styles (which I created separately in the directory), for example at the beginning, after "meta". Next, I add the script to "footer.html", also at the beginning. Then I add a link to the photo to the document I created in Google Drive, as indicated on the sites of gallery developers (although in their examples, the gallery is placed in the "body"). But nothing works, styles and scripts do not work at all, static images are displayed in a column, when clicking on them, it displays an error that there is no such page. I usually add styles in css-layout.css and for everything else it works, sometimes up to css-theme.css. If you need to add scripts - I add to script.js, it also works for others. But galleries usually require separate large stylesheets and scripts. Did I understand the structure correctly? Is it even possible to create a gallery similar to "lightGallery" or is my attempt futile? Maybe the template has restrictions on connecting individual js and css files? Maybe I'm adding the code in the wrong place, or in the wrong format to accept the template? Or do you need to add links to files only at the beginning / at the end of the file / or after a certain time? All I need for happiness is a gallery with a grid, with the possibility of clicking on a photo, then displaying it in its original size, as well as switching to neighboring ones with the help of arrows. Like a small wish, but something completely impossible. I will be grateful for tips, help, links to working versions of the galleries.