diff options
Diffstat (limited to 'viewer')
52 files changed, 10508 insertions, 14562 deletions
diff --git a/viewer/.browserslistrc b/viewer/.browserslistrc index d6471a3..d9789a7 100644 --- a/viewer/.browserslistrc +++ b/viewer/.browserslistrc | |||
@@ -1,2 +1,5 @@ | |||
1 | > 1% | 1 | # Polyfills for ES2020+ |
2 | last 2 versions | 2 | |
3 | chrome > 78 | ||
4 | firefox > 72 | ||
5 | edge > 78 | ||
diff --git a/viewer/.prettierrc.js b/viewer/.prettierrc.js index ee0cb9b..36c85bc 100644 --- a/viewer/.prettierrc.js +++ b/viewer/.prettierrc.js | |||
@@ -6,4 +6,5 @@ module.exports = { | |||
6 | printWidth: 120, | 6 | printWidth: 120, |
7 | bracketSpacing: true, | 7 | bracketSpacing: true, |
8 | arrowParens: "avoid", | 8 | arrowParens: "avoid", |
9 | endOfLine: "auto", | ||
9 | }; | 10 | }; |
diff --git a/viewer/ldgallery-viewer.7.md b/viewer/ldgallery-viewer.7.md index 96070dc..1e914ff 100644 --- a/viewer/ldgallery-viewer.7.md +++ b/viewer/ldgallery-viewer.7.md | |||
@@ -92,11 +92,58 @@ initialTagDisplayLimit | |||
92 | Set to -1 to disable the limit on suggestions. | 92 | Set to -1 to disable the limit on suggestions. |
93 | Defaults to 10. | 93 | Defaults to 10. |
94 | 94 | ||
95 | splashScreen | ||
96 | : Displays an information notice before opening the gallery (see below). | ||
97 | |||
95 | An alternative viewer configuration file located in the viewer's directory can be loaded by specifying its name, | 98 | An alternative viewer configuration file located in the viewer's directory can be loaded by specifying its name, |
96 | without the ".json" extension, as a query parameter given before the page anchor; | 99 | without the ".json" extension, as a query parameter given before the page anchor; |
97 | for example, some alternative configuration named "config_2.json" can be loaded with "http://gallery/?config_2#". | 100 | for example, some alternative configuration named "config_2.json" can be loaded with "http://gallery/?config_2#". |
98 | 101 | ||
99 | 102 | ||
103 | # SPLASH SCREEN CONFIGURATION | ||
104 | |||
105 | splashScreen.resource | ||
106 | : Absolute or relative path to the information notice. The user is prompted to explicitly acknowledge such notice before being allowed to browse the gallery. | ||
107 | Rich text formatting is possible through the use of the [GitHub Flavoured Markdown syntax][GFM]. | ||
108 | Inline HTML and CSS are also supported. | ||
109 | [GFM]: https://github.github.com/gfm/ | ||
110 | |||
111 | splashScreen.acknowledgmentKey | ||
112 | : Optional key; when set to an arbitrary string, the information notice will appear only the first time it is proposed to the user. Once the notice acknowledged, the key is saved to the device's local storage. To display the notice again, change this key to another value. | ||
113 | When left empty, the notice will appear every time. | ||
114 | |||
115 | splashScreen.buttonAcknowledgeLabel | ||
116 | : Optional label for the acknowledge button shown below the notice. | ||
117 | *Defaults to "Acknowledge"* | ||
118 | |||
119 | splashScreen.style | ||
120 | : Optional CSS attributes for the information notice's container. | ||
121 | String or JSON formats are supported. | ||
122 | |||
123 | |||
124 | # CONFIGURATION EXAMPLE | ||
125 | |||
126 | Viewer __config.json__: | ||
127 | |||
128 | ```json | ||
129 | { | ||
130 | "galleryRoot": "./gallery/", | ||
131 | "galleryIndex": "index.json", | ||
132 | "initialItemSort": "date_desc", | ||
133 | "initialTagDisplayLimit": 10, | ||
134 | "splashScreen": { | ||
135 | "resource": "./splashscreen.md", | ||
136 | "acknowledgmentKey": "v001", | ||
137 | "buttonAcknowledgeLabel": "I agree", | ||
138 | "style": { | ||
139 | "max-width": "45em", | ||
140 | "font-size": "20px", | ||
141 | "padding-top": "20vh" | ||
142 | } | ||
143 | } | ||
144 | } | ||
145 | ``` | ||
146 | |||
100 | # PROGRESSIVE WEB APPLICATION | 147 | # PROGRESSIVE WEB APPLICATION |
101 | 148 | ||
102 | This web application can be "installed" on some user's mobile device as a progressive web application, i.e. a shortcut giving the web page the appearance of a native application. | 149 | This web application can be "installed" on some user's mobile device as a progressive web application, i.e. a shortcut giving the web page the appearance of a native application. |
diff --git a/viewer/package-lock.json b/viewer/package-lock.json deleted file mode 100644 index 4785b3e..0000000 --- a/viewer/package-lock.json +++ /dev/null | |||
@@ -1,14182 +0,0 @@ | |||
1 | { | ||
2 | "name": "ldgallery-viewer", | ||
3 | "version": "2.0.0", | ||
4 | "lockfileVersion": 1, | ||
5 | "requires": true, | ||
6 | "dependencies": { | ||
7 | "@babel/code-frame": { | ||
8 | "version": "7.5.5", | ||
9 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", | ||
10 | "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", | ||
11 | "dev": true, | ||
12 | "requires": { | ||
13 | "@babel/highlight": "^7.0.0" | ||
14 | } | ||
15 | }, | ||
16 | "@babel/compat-data": { | ||
17 | "version": "7.10.3", | ||
18 | "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.10.3.tgz", | ||
19 | "integrity": "sha512-BDIfJ9uNZuI0LajPfoYV28lX8kyCPMHY6uY4WH1lJdcicmAfxCK5ASzaeV0D/wsUaRH/cLk+amuxtC37sZ8TUg==", | ||
20 | "dev": true, | ||
21 | "requires": { | ||
22 | "browserslist": "^4.12.0", | ||
23 | "invariant": "^2.2.4", | ||
24 | "semver": "^5.5.0" | ||
25 | }, | ||
26 | "dependencies": { | ||
27 | "browserslist": { | ||
28 | "version": "4.12.2", | ||
29 | "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.2.tgz", | ||
30 | "integrity": "sha512-MfZaeYqR8StRZdstAK9hCKDd2StvePCYp5rHzQCPicUjfFliDgmuaBNPHYUTpAywBN8+Wc/d7NYVFkO0aqaBUw==", | ||
31 | "dev": true, | ||
32 | "requires": { | ||
33 | "caniuse-lite": "^1.0.30001088", | ||
34 | "electron-to-chromium": "^1.3.483", | ||
35 | "escalade": "^3.0.1", | ||
36 | "node-releases": "^1.1.58" | ||
37 | } | ||
38 | }, | ||
39 | "caniuse-lite": { | ||
40 | "version": "1.0.30001090", | ||
41 | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001090.tgz", | ||
42 | "integrity": "sha512-QzPRKDCyp7RhjczTPZaqK3CjPA5Ht2UnXhZhCI4f7QiB5JK6KEuZBxIzyWnB3wO4hgAj4GMRxAhuiacfw0Psjg==", | ||
43 | "dev": true | ||
44 | }, | ||
45 | "electron-to-chromium": { | ||
46 | "version": "1.3.483", | ||
47 | "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.483.tgz", | ||
48 | "integrity": "sha512-+05RF8S9rk8S0G8eBCqBRBaRq7+UN3lDs2DAvnG8SBSgQO3hjy0+qt4CmRk5eiuGbTcaicgXfPmBi31a+BD3lg==", | ||
49 | "dev": true | ||
50 | }, | ||
51 | "node-releases": { | ||
52 | "version": "1.1.58", | ||
53 | "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.58.tgz", | ||