From 928c501dda0c3580e3cb0389efc16fc1dde16b68 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sat, 3 Jul 2021 05:06:44 +0200 Subject: viewer: optional user-defined markdown splash screen GitHub: closes #284 --- viewer/ldgallery-viewer.7.md | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'viewer/ldgallery-viewer.7.md') diff --git a/viewer/ldgallery-viewer.7.md b/viewer/ldgallery-viewer.7.md index 96070dc..5012e3b 100644 --- a/viewer/ldgallery-viewer.7.md +++ b/viewer/ldgallery-viewer.7.md @@ -96,6 +96,53 @@ An alternative viewer configuration file located in the viewer's directory can b without the ".json" extension, as a query parameter given before the page anchor; for example, some alternative configuration named "config_2.json" can be loaded with "http://gallery/?config_2#". +splashScreen +: Displays an information notice before opening the gallery (see below). + + +# SPLASH SCREEN CONFIGURATION + +splashScreen.resource +: Absolute or relative path to the information notice. The user is prompted to explicitly acknowledge such notice before being allowed to browse the gallery. + Rich text formatting is possible through the use of the [GitHub Flavoured Markdown syntax][GFM]. + Inline HTML and CSS are also supported. + +splashScreen.dontshowagainUID +: Optional unique ID; when set, the information notice will appear only the first time it is proposed to the user. To display the notice again, change this UID. + When left empty, the notice will appear every time. + +splashScreen.buttonAcknowledgeLabel +: Optional label for the acknowledge button shown below the notice. + *Defaults to "Acknowledge"* + +splashScreen.style +: Optional CSS attributes for the information notice's container. + String or JSON formats are supported. + + [GFM]: https://github.github.com/gfm/ + +# CONFIGURATION EXAMPLE + +Viewer __config.json__: + +```json +{ + "galleryRoot": "./gallery/", + "galleryIndex": "index.json", + "initialItemSort": "date_desc", + "initialTagDisplayLimit": 10, + "splashScreen": { + "resource": "./splashscreen.md", + "dontshowagainUID": "v001", + "buttonAcknowledgeLabel": "I agree", + "style": { + "max-width": "45em", + "font-size": "20px", + "padding-top": "20vh" + } + } +} +``` # PROGRESSIVE WEB APPLICATION -- cgit v1.2.3