Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash in URL refering to photo #229

Open
StyXman opened this issue Dec 18, 2019 · 1 comment
Open

Hash in URL refering to photo #229

StyXman opened this issue Dec 18, 2019 · 1 comment

Comments

@StyXman
Copy link

StyXman commented Dec 18, 2019

I use baguette via the nikola static website generator. I love the lightbox, and I have a (hopefully) minor request.

Let's take the example of the first gallery at https://feimosi.github.io/baguetteBox.js/ If I click in the 4th image on the 1st row, the lightbox opens showing a bigger image. So far so good.

What I would like is that the URL in the browser's location bar to have a reference to this image in the lightbox. The most usual way is to add an anchor to the URL, like https://feimosi.github.io/baguetteBox.js/#img/1-4.jpg

The second part of the request is that if the URL has a breadcrumb, the lightbox with the relevant image opens. That is, if I got to https://feimosi.github.io/baguetteBox.js/#img/1-4.jpg , I expect the page to open with the lightbox open and that image in it.

This way I can send URLs to specific images to people, instead of having to put them in their own folder or telling them "check the 284th image in this gallery!".

Unluckily my free time and JS knowledge are not enough to try to tackle this myself.

@StyXman
Copy link
Author

StyXman commented Dec 21, 2019

Look, I found some code that maybe you can use, at least as inspiration: https://github.com/fancyapps/fancybox/blob/master/src/js/hash.js

@StyXman StyXman changed the title Breadcrumbs Hasehd URL Apr 4, 2020
@StyXman StyXman changed the title Hasehd URL Hashed URL Apr 4, 2020
@StyXman StyXman changed the title Hashed URL Hash in URL refering to photo Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant