Comments (3)
I am also trying to create a gallery template but I think I'm not quite there. I have created a folder with images and metadata
01.Images
|- gallery.md
|- image1.jpg
|- image1.jpg.meta.yaml
|- image2.jpg
|- image2.jpg.meta.yaml
gallery.md has the following template gallery.html.twig
:
{% extends 'partials/base.html.twig' %}
{% block content %}
{{ page.content }}
{% for image in page.media.images %}
{{ image.lightbox(1024,768).cropResize(200,200).html(image.meta.title) }}
{% endfor %}
{% endblock %}
This sort of works, each image is shown sequentially and activates the lightbox
However, I'd like to be able to then proceed to the next image in a gallery.
How would one do this?
Ideally, I'd like to have the featherlight gallery working on and image collage like https://github.com/petrgrishin/grav-plugin-image-collage
from grav-plugin-featherlight.
You would have to manipulate the script that initializes the featherlight gallery. That's a quite easy task as soon as pull request #11 is approved ;-)
Then you just would have to make sure to identify the links that belong together and work with a init script like this:
$('#elementWrapper_1 a[rel=lightbox]').{pluginName}({
openSpeed: {openSpeed},
closeSpeed: {closeSpeed},
closeOnClick: '{closeOnClick}',
root: '{root}',
});
Setting a different rel attribute than 'lightbox' when creating a lightbox link would make it even easier, I think. But that's currently not possible with the grav core since the rel attribute is hard coded at the moment.
from grav-plugin-featherlight.
However, I'd like to be able to then proceed to the next image in a gallery.
Your code works for me well. The next image button appears when you hover the mouse over the edge of the image.
from grav-plugin-featherlight.
Related Issues (20)
- Unable to animate content on popup
- Content height and width returning zero if not specified with css
- Images are not opening in lightbox HOT 2
- Update? HOT 15
- Control options halfway hidden
- Unable to close image in 1 click on Opera browser HOT 4
- Classes ignored for lightbox images
- Images have '@1x' burned in HOT 1
- Plugin doesn't seem to work, not even on Grav wiki HOT 9
- Featherlight plugin activation code HOT 2
- prev/next buttons not displayed HOT 1
- RC 17 - webp shows garbage HOT 3
- How to combine HOT 1
- Swipe functionality missing?
- Clarification on captions
- Next button causes scroll bars on narrow images HOT 1
- New release?
- Big puctures support (zoom in/zoom out)
- Change default for 'active' to true? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grav-plugin-featherlight.