Comments (3)
Forgive me for closing the issue, but ignoring some images sounds to me like a completely different issue than multiple images in different places in one gallery mentioned in title and your primary description.
Nevertheless, the solution with adding a configurable class/attribute that will be ignored by hes-gallery sounds like a sensible idea. I will try to implement something like this in the near future
from hes-gallery.
Hi, <img>
tags does not need to be a direct childs of the .hes-gallery
class wrapper. You can wrap whole content with this class, and all images should be loaded into one gallery
Example below:
<div class="hes-gallery">
<h1>Hello world</h1>
<p>Lorem ipsum</p>
<img src="test.png" />
<div class="grid">
<img src="test2.png" />
<img src="test2.png" />
<img src="test2.png" />
</div>
</div>
Or based on your example:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Kira hes-gallery all in one gallery</title>
<script src="https://cdn.jsdelivr.net/npm/hes-gallery/dist/hes-gallery.min.js" defer></script>
</head>
- <body>
+ <body class="hes-gallery">
- <div class="hes-gallery">
+ <div>
<img alt="First image description" src="https://64.media.tumblr.com/b46755ce8132f94072dc11ff1bc521f2/tumblr_o9c27npEFz1st5lhmo1_1280.jpg">
</div>
<p>Between the gallery images may be something</p>
- <div class="hes-gallery">
+ <div>
<img alt="Second image description" src="https://64.media.tumblr.com/e448b56e7d05e08fc7d50fba6279162a/tumblr_o9c384UrKV1st5lhmo1_1280.jpg">
</div>
<p>It may or may not be related to gallery images</p>
- <div class="hes-gallery">
+ <div>
<img alt="Third image description" src="https://64.media.tumblr.com/6a3c1841255255d81f00adc0559ae3e1/tumblr_o9c2klYKxX1st5lhmo1_1280.jpg">
</div>
</body>
</html>
from hes-gallery.
Status: It doesn’t completely solve the problem ❌
1. Early closing
@demtario, I’m not sure that closing an issue as “completed” 3 days after the own reply without waiting for the reply of the creator of the issue is the best practice.
2. Problem — unexpected images
Even if the user wants to include all the images of an article in a single gallery (as in my example), interface icons and other unwanted images can also end up in the gallery.
Also, users may want to include in the single gallery some images (on the different places of the page), but not others, for other reasons.
It would be nice if it would be possible without hard-coding.
3. Possible solutions
- For example, class
hes-gallery-all
. hes-gallery will include all images on the page inside<div class="hes-gallery-all"></div>
into a single gallery. - Or perhaps an option
ignoredClasses
. Values — a list of img classes for which hes-gallery will not be applied. For example, ifignoredClasses: ["KiraInterfaceIcon"]
, hes-gallery will not add<img class="KiraInterfaceIcon">
to galleries.
Thanks.
from hes-gallery.
Related Issues (13)
- feature_request(enhancement): thumbnails bar HOT 1
- Improve web accessibility HOT 3
- 'AutoInit' set to false doesn't work. HOT 1
- Node engine version HOT 3
- The origin of the project's name is unknown
- Multiple Sections?
- Thumbnails
- Background "onclick" not triggering hide. HOT 1
- Bad subtitle position HOT 1
- Doesn't work in IE HOT 1
- Broken titles and counter in IE HOT 1
- question/feature_request(interface): images overlaps close button HOT 1
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 hes-gallery.