Story Show Gallery - JS & React - minimalist, vertical photo gallery, mobile friendly

Overview

Story Show Gallery - JS & React - minimalist, vertical photo gallery, mobile friendly

Known Vulnerabilities

SSG nicely combines photos and captions to show a whole story in full ­screen, mini­­mal­ist, non-dis­tracting environ­­ment (no ugly arrows). SSG can support your brand and mar­ket­ing. The gallery is vertical - optimized for use on smart­phones.

Story Show Gallery - fullscreen

View demo gallery and documentation at github.io
SSG is also in the form of a Wordpress plugin


Story Show Gallery versus usual gallery lightbox. Do you want more icons or more from a photo? SSG use whole smartphone display - even notch area and even on iPhone.

Story Show Gallery is mobile friendly

Portrait mode and four visual themes: Story Show Gallery visual themes

Story Show Gallery has very easy setup, it binds onto image hyper­links on the page auto­mati­cally. You can control this proccess by CSS classes. Define sepa­rate galleries, activate full screen mode, selectively deactivate SSG, etc. Story Show Gallery can also work as a React Component.


Not another photo gallery

  • On smartphones, full screen mode works like on You­Tube. It triggers after rotating a phone into landscape mode.
  • Brand building (image or text), social sharing icon that can be hardly overlooked
  • Easy browsing without clicking and thinking
  • Image frame effects and settings
  • EXIF info inside captions
  • Deeplinking
  • Four visual themes
  • Goo­gle Analytics support
  • HTML signpost to other galleries
  • No e×it mode for galleries based on bare HTML
  • SSG is probably the only gallery which can place each caption individually according to image size vs. screen size:

SSG is fully responsive image gallery


Implementation

Add ssg.min.css and jQuery in the of the document. Add ssg.min.js before end of . You can link files directly from CDN:

... ">
<head>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/story-show-gallery@3/dist/ssg.min.css">
    <script src="https://code.jquery.com/jquery-3.5.1.min.js"> script>
head>
...
<script src="https://cdn.jsdelivr.net/npm/story-show-gallery@3/dist/ssg.min.js">script>

<script src="https://cdn.jsdelivr.net/npm/exifr@7/dist/lite.umd.js"> script>
body>

SSG binds onto image hyper­links on the page auto­mati­cally, BigImage1-4 will be in the gallery. You can control this proccess by CSS classes.

<div class='ssg fs'>
    <a href='BigImage1.jpg'> <img alt='This text will appear under picture as a caption' src='thumbnail.jpg'> a>
    <a href='BigImage2.jpg' data-author='photo by Misty'> Also image caption a>
    <a href='BigImage3.jpg data-caption='this caption has priority over link text or alt'> some text a>
    <a href='BigImage4.jpg'>a> 


    <a href='BigImage5.jpg' class='nossg'> don't include me into SSG a>
div>

The ssg class creates a separate gallery, the fs class will activate full screen mode. The BigImage4.jpg will open normally within a browser because of the nossg class. There are more control classes.

You can also run the gallery by calling SSG.run method and passing an JS array of images into SSG.


React Component (Next.js)

Story Show Gallery for React works the same way as it is described above. Just put in your React app StoryShowGallery component and every image hyperlink on the entire page will be asigned an onclick function, which opens image into the gallery. Image hyperlinks can be controled by CSS classes, as it is described above.

Or you can use SSG.run method with array of images.

How to install and use StoryShowGallery React component:

">
// install npm package:
npm i story-show-gallery

// import into React app:
import StoryShowGallery, { SSG } from "story-show-gallery/src/react";

// if you want EXIF support use:
import StoryShowGallery, { SSG } from "story-show-gallery/src/react-exifr";

// and also import CSS file:
import "story-show-gallery/src/ssg.css";
// if you use Next.js, you have to import it into _app.tsx as global CSS

// use StoryShowGallery component and configure the gallery:
<StoryShowGallery config={{ theme: 'light', watermarkText: 'xxx' }} />

You can import story-show-gallery into root component (app.js or _app.js in case of Next.js) so the all aplication can use it. Or import it just into some component/page with a gallery. There is sample implementation (SsgReactExample.js) in the example directory.


Configuration

Default SSG configuration and language localization are at the begining of ssg.js file. You can edit source ssg.js file and then minify it. Or copy selected settings into your document to override default configuration. See all possible settings. Place the selected settings after ssg.min.js:

">
<script type="text/javascript" src="ssg.min.js">script>
<script>
  SSG.cfg.theme: 'light';  // visual theme
  SSG.cfg.fileToLoad = 'signpost.html'; // HTML file to load behind the gallery
  SSG.cfg.watermarkText = '〽️ Misty';  // watermark text overlaying a photo
  SSG.cfg.watermarkFontSize = 18;
  SSG.cfg.captionExif = 'trim'; // show EXIF with reduced lens info
script>

Complete HTML5 example of SSG implementation and configuration:

HTML5 example of SSG implementation

Part of the configuration are also SSG events, you can use them to run your functions on the gallery start, on an image change, etc.


Minifying

If you modify source files (src folder), you will probably want to minify the result. Use existing npm script:

npm install   // it will install uglify-JS and uglify-CSS which are needed for minifying
npm run-script dist  // it will minify the source files and put them into the dist directory.

License

You can use Story Show Gallery freely within open source GNU GPL-3.0 license.

There is one exception from the license: Distributing Story Show Gallery within a Wordpress plugin or theme is only allowed for the author of Story Show Gallery.

You might also like...

Smooth mobile touch slider for Mobile WebApp, HTML5 App, Hybrid App

Smooth mobile touch slider for Mobile WebApp, HTML5 App, Hybrid App

iSlider iSlider is a lightweight, high-performant, no library dependencies cross-platform slide controller. It can help handling most sliding effects,

Nov 25, 2022

Full featured JavaScript image & video gallery. No dependencies

Full featured JavaScript image & video gallery. No dependencies

lightgallery.js Full featured JavaScript lightbox gallery. No dependencies. Important notice lightgallery.js has been merged with lightGallery. That m

Dec 30, 2022

Fast Hugo gallery theme/module suitable for lots of images.

Fast Hugo gallery theme/module suitable for lots of images.

Gallery Deluxe A Hugo Module to show a photo gallery. It's very fast/effective, especially if you have lots of images on display. See the annotated in

Jan 2, 2023

A minimalist web app for the daily morning and night athkar.

Morning & Night Athkar | أذكار الصباح والمساء Local Development Recommended: Use nvm to manage npm dependencies and versions. This app uses node versi

Dec 2, 2022

Sharerbox - Free, minimalist and lightweight JavaScript-based social-media sharer for websites

Sharerbox Free minimalist and lightweight JavaScript-based social-media sharer for websites. Version: 0.8.1 Description SharerBox is a free, minimalis

Aug 22, 2022

minimalist virtual dom library

petit-dom A minimalist virtual DOM library. Supports HTML & SVG elements. Supports Render functions and Fragments. Custom components allows to build y

Dec 12, 2022

This is a basic website Todo Application that displays a list that looks and behaves like the part of minimalist project.

To-Do-list-microverse Description This is a basic website; a Todo Application that displays a list that looks and behaves like the part of minimalist

Feb 3, 2022

Minimalist Web XR Location Based Markers for A-Frame 1.3.0

LBAR.js “I understand how the engines work now. It came to me in a dream. The engines don't move the ship at all. The ship stays where it is and the e

Dec 3, 2022

A minimalist ToDo list app to add, update and remove tasks easily

A minimalist ToDo list app to add, update and remove tasks easily

To-do list is a tool that helps to organize your day. It simply lists the things that you need to do and allows you to mark them as complete. We will build a simple website that allows for doing that, and we will do it using ES6 and Webpack!

Jun 23, 2022
Comments
  • A display problem when start SSG by JS

    A display problem when start SSG by JS

    The function, SSG.run, has an attribute named 'initImgID'.

    I want to start SSG by clicking an img. But when I set the img's ID, I can't scroll to the previous img even the img I click is not the first img.

    If I don't set initImgID, no matter what img I click, it would show the first img at the beginning.

    It would be nice if SSG can init all the imgs while I can choose where to start

    opened by kizuner-bonely 2
Releases(2.9.6)
  • 2.9.6(Sep 24, 2020)

    A deeplink into the gallery will run the gallery immediately and it will show the desired photo. Eg. https://roman-flossler.github.io/StoryShowGallery/#element

    In this case SSG will stop loading of all images on the underlying page, so the desired photo can load much faster. It has all the bandwidth. When a user exits the gallery, the whole page will load.

    Source code(tar.gz)
    Source code(zip)
  • 2.6.3(Apr 16, 2020)

    When a webpage has the html tag styled with Scroll-behavior:smooth it totally messes up the gallery scrolling. So after the gallery initialization Scroll-behavior on the html and the body is set to auto and deactivated. After the gallery exit it is restored back.

    New down arrow without any text and with the new cool animation.

    Source code(tar.gz)
    Source code(zip)
  • 2.6.0(Feb 17, 2020)

  • 2.5.3(Nov 14, 2019)

    Speed optimization of Jump scroll animation based on frame by frame analysis from Chrome performance. Measures taken: Img.decode used for pre-decode images. Loading of the next image and setting pages's hash was postponed after the animation. Animation is much more fluent now.

    GA sends image views to log just if the page is scrolled very slowly or not scrolled at all - if a user is really watching.

    On tablet devices the gallery is directly switched into fullscreen mode, it solves problems with mobile browsers (height of address bar is changing).

    Source code(tar.gz)
    Source code(zip)
  • 2.4.1(Sep 22, 2019)

  • 2.4.0(Aug 6, 2019)

    There was some problems (mainly on Chrome mobile) with turning the gallery into full screen while the gallery was beeing created. So now the gallery is created after the full screen mode was activated (fullscreenchange event).

    On smart phones full screen mode works like on YouTube, it activates after rotating a phone from portrait to landscape mode. It is much more smoother experience for a user. On mobile Chrome there is a lot of blinking, when the full screen is activated after a user tap. If a smart phone is already in landscape mode (not usual), then the gallery goes into full screen directly.

    Redrawing of the gallery happens on different events for smart phones, desktops and iPhones.

    Fixing bugs that occured on Safari iOS

    Source code(tar.gz)
    Source code(zip)
  • 2.3.3(Jul 18, 2019)

    Optimized launch and orientation change

    Dealing with the multiple resize event in some browsers when the gallery is being switched into full screen mode. Fixing the problem with orientation change on mobiles. The gallery reliably preserves an actual photo now.

    Hint for a user how to browse through the gallery on touch devices

    based on a little UX testing. SSG will show the hint if a user doesn't know he can use a jumps scroll to browse the gallery.

    Notice "photos look better in landscape mode" was moved after the first photo, because the mobile chrome shows at the top of the screen notice about switching into the full screen mode

    Source code(tar.gz)
    Source code(zip)
  • 2.3.1(Jun 4, 2019)

    Protection of photos from being copied via right click menu. SSG displays the quick help with fullscreen option instead of the context menu.

    Fix problem with Opera browser

    Source code(tar.gz)
    Source code(zip)
  • 2.3.0(May 27, 2019)

    Newly there are 3 ways how a photo gallery can be created. Automatically from images on the page, by passing an Javascript array of images into SSG, or by combi­nation of both.

    Better positioning of final horizontal menu in case that there is no html signpost behind the gallery.

    Preventing potential problems with too general CSS styles of underlaying webpage

    Source code(tar.gz)
    Source code(zip)
  • 2.2.2(May 7, 2019)

    Minding the notch on mobiles - to prevent the notch intervene into a caption, SSG swaps caption and photo if necessary. So photo is always next to notch regardless how a user holds his phone.

    Better positioning of caption and photo.

    Source code(tar.gz)
    Source code(zip)
  • 2.2.1(Apr 23, 2019)

    Photos in the gallery (gallery class) are newly marked with subIDs, which fixed the problem with initial grouping of photos.

    Adding fading effect to image transition animation (looks better :-)

    Source code(tar.gz)
    Source code(zip)
  • 2.2.0(Apr 11, 2019)

    You can control gallery behaviour by assigning CSS classes to image links. The nossg class selectively deactivate SSG for some images or entire gallery. The gossg class will show image in the gallery only if a user activates the gallery through the image. The fs class activates fullscreen mode on selected image.

    Added initImgID parameter which will activate the gallery with particular image.

    Source code(tar.gz)
    Source code(zip)
  • 2.1.2(Mar 19, 2019)

    • Optimization and enhancement of scrolling. Faster code. Dealing with default passive event which came with Chrome 73 and broke scrolling. Better scrolling on touchpad. Scrolling to a right position when image is decentered by a user. Dark scrolling bar for new Firefox.
    • hi-res version of crosshair cursor It fixed problem with blurry interpolation of low res cursor in Chrome
    • code refactoring
    • Added the fsa parameter which also activates full screen mode. It 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.
    Source code(tar.gz)
    Source code(zip)
  • 2.1.1(Feb 14, 2019)

    • Complete reformat of the code for better readability
    • changing the viewport to "viewport-fit=cover" and restoring the original viewport after leaving the gallery
    • minor CSS tuning
    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Feb 14, 2019)

    • Every image in Story Show Gallery has its own URL adress: www.site.com/dir/#photoname. As you are browsing through the gallery the #photoname is constantly changing in the browser's navigation bar. But the bar isn’t visible in the full-screen mode. So there is a little hack. If you hold alt key and click on a thumbnail the SSG won’t run into fullscreen and you can find out an URL of some image and use it as link into the gallery.
    • handling of broken link. SSG will show 'error loading image' image. So you will notice it before site visitors do.
    • activating dark theme on mobile browsers
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Feb 3, 2019)

    • Story Show Gallery has three landscape modes now - a text caption below an image, aside an image and with no caption. For each image SSG calculates which mode to use according to an image format vs. screen aspect ratio. This is recalculated on each window resize/rotate and animation centers the image after resizing.
    • change of class names activating fullscreen mode (in favor of Wordpress), class order doesn't matter anymore
    • better order of displaying photos, suitable even for several galleries on one page
    • Adding loading-wait icon for touch screen devices
    • the "next photo" link vertically centered and aside of the text caption.
    • the exit icon in fullscreen for noExit mode
    • bug fixes and CSS tuning.
    • sample gallery and readme update
    Source code(tar.gz)
    Source code(zip)
Easy responsive tabs - is a lightweight jQuery plugin which optimizes normal horizontal or vertical tabs to accordion on multi devices

Easy responsive tabs - is a lightweight jQuery plugin which optimizes normal horizontal or vertical tabs to accordion on multi devices like: web, tablets, Mobile (IPad & IPhone). This plugin adapts the screen size and changes its action accordingly.

Samson Onna 600 Dec 8, 2022
Have you always wanted to check if someone has checked out your story or not?

InstaStoryChecker - Search in your story viewers Have you always wanted to check if a certain person has checked out your story or not and you had to

Mohammad Saleh 4 Jul 7, 2022
An interactive story framework.

Tale-js Tale-js is an interactive story maker, that allows you to write a story using JavaScript logic controls. There are a few requirements: // For

Jesse 4 May 23, 2022
jQuery Tabs Plugin. CSS Tabs with Accessible and Responsive Design. Lot of Tab Themes with Vertical and Horizontal Orientation.

Macaw Tabs Macaw Tabs is jQuery tabs plugin. It helps you to create accessible and responsive jQuery tabs by implementing the W3 design patterns for t

HTMLCSSFreebies 6 Dec 8, 2022
Simple and lightweight vertical 3-dot context menu

3-dot Context Menu Thanks for taking a look at our 3-dot context menu for web development. The 3-dot context menu allows a simple and lightweight impl

Boardies IT Solutions 3 Nov 6, 2022
jQuery Plugin for Ticker, News Ticker with Vertical, Horizontal, Marquee and Typewriting effects

AcmeTicker - News Ticker A very lightweight jQuery plugin for creating advanced news ticker. Demo: Gutentor News Ticker Ticker Type Vertical Horizonta

Santosh Kunwar 11 Sep 3, 2022
Storybook Addon Root Attributes to switch html, body or some element attributes (multiple) at runtime for you story

Storybook Addon Root Attributes What is this This project was inspired by le0pard/storybook-addon-root-attribute The existing library received only on

정현수 5 Sep 6, 2022
JavaScript image gallery for mobile and desktop, modular, framework independent

PhotoSwipe v5 — JavaScript image gallery and lightbox Demo | Documentation Repo structure dist/ - main JS and CSS src/ - source JS and CSS. src/js/pho

Dmytro Semenov 22.4k Dec 29, 2022
TVMAZE API-based webapp, receives TV show episodes with all data about that TV show.

TVMAZE API-based webapp, receives TV show episodes with all data about that TV show. The Webapp has two interfaces: A home page, showing a list of Tv show episodes you can like. And a popup window with more data about the TV show that you can comment on.

Yasin Warsame 4 Aug 9, 2022
This is an application that entered the market with a mobile application in real life. We wrote the backend side with node.js and the mobile side with flutter.

HAUSE TAXI API Get Started Must be installed on your computer Git Node Firebase Database Config You should read this easy documentation Firebase-Fires

Muhammet Çokyaman 4 Nov 4, 2021