Lightbox
The ssglib.lightbox module provides CSS and JavaScript
for a modal image gallery. Images are grouped by
data-lightbox attribute and displayed in a full-screen
dialog with navigation, keyboard controls, and scroll-snap.
local lightbox = require "ssglib.lightbox"css()
Return the lightbox CSS as a string. Loaded lazily on first call.
local css = table.concat({
lightbox.css(),
pandoc.system.read_file("src/site.css"),
}, "\n")
site:write_data("/site.css", css)js()
Return the lightbox JavaScript as a string. Loaded lazily on first call.
local js = lightbox.js()
site:write_data("/site.js", js)