
Story Show Gallery
jQuery vertical gallery created by Roman FlösslerStory Show Gallery nicely combines photos and captions to show a whole story in fullscreen, minimalist, non-distracting environment. You can browse through the gallery just by scrolling, touching or via vertical slider or keyboard.
Download Story Show Gallery from
GitHub or
NPM
SSG is also in the form of a Wordpress plugin
Main features
- SSG is fully responsive and mobile friendly vertical gallery - works on desktops, tablets and mobiles. For every photo size SSG calculates optimal position of a caption:
- Fullscreen lightbox with an unobtrusive vertical slider and cursor. No ugly arrows around the image - it's a minimalist gallery. Great for photographers to present their photos.
- Story Show Gallery supports Google analytics to measure views of each photo. SSG detects and uses GA tracking code on your site.
- No e×it mode: You can write just a minimal HTML code and SSG creates a vertical gallery which works like a separate webpage. Because there is not much to display without SSG, the gallery can run in the no exit mode. See a minimal crash course
- SSG can display watermark - logo over images. Just link it via CSS styles.
- Gradual lazy loading of photos while a user browse through the gallery.
- You can link into the gallery to show a particular photo. Just use image name in the hashtag:
- Story Show Gallery can load a HTML signpost to other photo galleries behind the last image. See a sample



License
You can use SSG freely within
Mozilla Public License 2.0.
There is one exception from license: Distributing Story Show Gallery within a Wordpress plugin or theme is only allowed for the author of Story Show Gallery.
SSG is easy to implement
Story Show Gallery is easy to implement on your website, it binds onto images automatically. Download SSG files and add these two lines somewhere before the </body> tag:
<link rel="stylesheet" href="path/to/ssg.css" >
<script src="path/to/ssg.js"> </script>
For a quick try of SSG on your website you can link SSG files from Flor.cz:
<link rel="stylesheet" href="https://ssg.flor.cz/ssg.css">
<script src="https://ssg.flor.cz/ssg.js"> </script>
SSG requires jQuery library at least in version 1.5. Place jQuery code inside the <head> section (Wordpress already includes jQuery):
<script src="https://code.jquery.com/jquery-3.3.1.min.js"> </script>
Sample HTML5 gallery code and re-styling Story Show Gallery:

Story Show Gallery consists of three files:
- ssg.js - all Javascript - jQuery code
- ssg.css - the gallery styles, includes icons and cursor
- ssg-loaded.html (optional) - a html file to load behind the last photo, typically a signpost to other galleries. Edit it to contain your links.
How Story Show Gallery works
Story Show Gallery looks for all hyperlinks (<a> tags) on the page that points to a picture file (extensions: jpg, jpeg, JPG, png, PNG, gif, GIF). And adds to all these hyperlinks (unless nossg class is used) an onclick function which runs the gallery.
A caption next to a photo is taken from a thumbnail's alt attribute or a link text. SSG will create the gallery from all these three images (BigImage1~3):
<a href='BigImage1.jpg'> <img alt='text caption' src='thumb.jpg'> </a>
<a href='BigImage2.jpg'> Another text caption </a>
<a href='BigImage3.jpg'></a> (an empty link, no caption)
Story Show Gallery activates after a user clicks on some hyperlink from the above example. But you can also run the gallery by Javascript calling SSG.run method. Example: the body's onload event runs the gallery immediately after a page is loaded:
<body onload='SSG.run()'>
Use initImgId argument to set the initial image in the gallery:
<body onload="SSG.run( {initImgID: 6} )">
Run SSG immediately after page loads is useful, when the html page is just a plain list of links without any design. There is nothing much to see without SSG. So the gallery can run in the no e×it mode - no close icon, no ESC key.
<body onload='SSG.run({noExit:true})'>
See a crash course - the most minimal way how to use Story Show Gallery:

Fullscreen mode
Fullscreen mode can be activated three ways.
Adding the "gallery" or "wp-block-gallery" class to the wrapper tag of <a> tags. These two classes use the Wordpress built-in gallery. All images inside the gallery activate fullscreen mode:
<div class='gallery'>
<a href='big-image.jpg'> <img src='thumbnail.jpg'></a>
<a href='big-image2.jpg'> <img src='thumbnail2.jpg'></a>
</div>
Adding the fs class to <a> tag. This single image activates fullscreen mode:
<a class='fs' href='big-image.jpg'> <img src='thumbnail.jpg'></a>
Running the gallery by calling the SSG.run method with the fs:true or fsa:true parameter.
<a onclick='SSG.run({fs:true})'> Show gallery</a>
The fsa parameter is good to use when the gallery is initiate without an active click from a user. But that click is needed for entering fullscreen mode. So the gallery will ask if a user wants to switch into fullscreen mode.
The nossg and gossg class
You can selectively deactivate SSG by asigning nossg class to some photo or entire gallery. After clicking on a thumbnail Story Show Gallery won't run.
<div class='gallery nossg'> OR
<a href='bigimg.jpg' class='nossg' > <img src='thumbnail.jpg'></a>
If the image has gossg class, it can only activate the gallery. If a user clicks on another thumbnail, images with gossg class won't be in the gallery. On this page gossg class has image with Sample source code and Responsive modes.
<a href='bigimg.jpg' class='gossg fs' > <img src='thumbnail.jpg'></a>