diff options
-rw-r--r-- | compiler/app/Main.hs | 8 | ||||
-rw-r--r-- | viewer/public/defaulticon.png | bin | 0 -> 3363 bytes | |||
-rw-r--r-- | viewer/public/index.html | 4 | ||||
-rw-r--r-- | viewer/public/manifest.json.example | 13 | ||||
-rw-r--r-- | viewer/src/assets/defaulticon.svg | 63 |
5 files changed, 80 insertions, 8 deletions
diff --git a/compiler/app/Main.hs b/compiler/app/Main.hs index 594a5b7..753f281 100644 --- a/compiler/app/Main.hs +++ b/compiler/app/Main.hs | |||
@@ -22,9 +22,7 @@ import GHC.Generics (Generic) | |||
22 | import Paths_ldgallery_compiler (version, getDataFileName) | 22 | import Paths_ldgallery_compiler (version, getDataFileName) |
23 | import Control.Monad (when) | 23 | import Control.Monad (when) |
24 | import Data.Version (showVersion) | 24 | import Data.Version (showVersion) |
25 | import Data.Int (Int64) | ||
26 | import Data.Aeson (ToJSON) | 25 | import Data.Aeson (ToJSON) |
27 | import Data.Time.Clock.System (getSystemTime, systemSeconds) | ||
28 | import System.FilePath ((</>)) | 26 | import System.FilePath ((</>)) |
29 | import System.Directory (canonicalizePath) | 27 | import System.Directory (canonicalizePath) |
30 | import System.Console.CmdArgs | 28 | import System.Console.CmdArgs |
@@ -35,7 +33,6 @@ import Files (readDirectory, copyTo) | |||
35 | 33 | ||
36 | data ViewerConfig = ViewerConfig | 34 | data ViewerConfig = ViewerConfig |
37 | { galleryRoot :: String | 35 | { galleryRoot :: String |
38 | , generationTimestamp :: Int64 | ||
39 | } deriving (Generic, Show, ToJSON) | 36 | } deriving (Generic, Show, ToJSON) |
40 | 37 | ||
41 | 38 | ||
@@ -126,7 +123,4 @@ main = | |||
126 | >>= copyTo target | 123 | >>= copyTo target |
127 | 124 | ||
128 | writeViewerConfig :: FilePath -> IO () | 125 | writeViewerConfig :: FilePath -> IO () |
129 | writeViewerConfig fileName = | 126 | writeViewerConfig fileName = writeJSON fileName $ ViewerConfig gallerySubdir |
130 | getSystemTime | ||
131 | >>= return . ViewerConfig gallerySubdir . systemSeconds | ||
132 | >>= writeJSON fileName | ||
diff --git a/viewer/public/defaulticon.png b/viewer/public/defaulticon.png new file mode 100644 index 0000000..0194e29 --- /dev/null +++ b/viewer/public/defaulticon.png | |||
Binary files differ | |||
diff --git a/viewer/public/index.html b/viewer/public/index.html index 8176ab8..cadbc72 100644 --- a/viewer/public/index.html +++ b/viewer/public/index.html | |||
@@ -23,9 +23,11 @@ | |||
23 | <head> | 23 | <head> |
24 | <meta charset="utf-8"> | 24 | <meta charset="utf-8"> |
25 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 25 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
26 | <meta name="mobile-web-app-capable" content="yes"> | ||
26 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> | 27 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
27 | <meta name="generator" content="ldgallery"> | 28 | <meta name="generator" content="ldgallery"> |
28 | 29 | ||
30 | <link rel="manifest" href="manifest.json"> | ||
29 | <link rel="icon" href="<%= BASE_URL %>favicon.ico"> | 31 | <link rel="icon" href="<%= BASE_URL %>favicon.ico"> |
30 | <title>ldgallery</title> | 32 | <title>ldgallery</title> |
31 | </head> | 33 | </head> |
@@ -39,4 +41,4 @@ | |||
39 | <!-- built files will be auto injected --> | 41 | <!-- built files will be auto injected --> |
40 | </body> | 42 | </body> |
41 | 43 | ||
42 | </html> | 44 | </html> \ No newline at end of file |
diff --git a/viewer/public/manifest.json.example b/viewer/public/manifest.json.example new file mode 100644 index 0000000..8c43fbb --- /dev/null +++ b/viewer/public/manifest.json.example | |||
@@ -0,0 +1,13 @@ | |||
1 | { | ||
2 | "short_name": "LdGallery", | ||
3 | "name": "LdGallery", | ||
4 | "icons": [ | ||
5 | { | ||
6 | "src": "defaulticon.png", | ||
7 | "type": "image/png", | ||
8 | "sizes": "192x192" | ||
9 | } | ||
10 | ], | ||
11 | "display": "standalone", | ||
12 | "_comment": "https://developer.mozilla.org/en-US/docs/Web/Manifest" | ||
13 | } | ||
diff --git a/viewer/src/assets/defaulticon.svg b/viewer/src/assets/defaulticon.svg new file mode 100644 index 0000000..cc7f9f9 --- /dev/null +++ b/viewer/src/assets/defaulticon.svg | |||
@@ -0,0 +1,63 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | <svg | ||
3 | xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
4 | xmlns:cc="http://creativecommons.org/ns#" | ||
5 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
6 | xmlns:svg="http://www.w3.org/2000/svg" | ||
7 | xmlns="http://www.w3.org/2000/svg" | ||
8 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
9 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
10 | aria-hidden="true" | ||
11 | focusable="false" | ||
12 | data-prefix="fas" | ||
13 | data-icon="images" | ||
14 | class="svg-inline--fa fa-images fa-w-18" | ||
15 | role="img" | ||
16 | viewBox="0 0 192 192" | ||
17 | version="1.1" | ||
18 | id="svg3763" | ||
19 | sodipodi:docname="images-solid.svg" | ||
20 | width="192" | ||
21 | height="192" | ||
22 | inkscape:version="0.92.4 (5da689c313, 2019-01-14)"> | ||
23 | <metadata | ||
24 | id="metadata3769"> | ||
25 | <rdf:RDF> | ||
26 | <cc:Work | ||
27 | rdf:about=""> | ||
28 | <dc:format>image/svg+xml</dc:format> | ||
29 | <dc:type | ||
30 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
31 | <dc:title></dc:title> | ||
32 | </cc:Work> | ||
33 | </rdf:RDF> | ||
34 | </metadata> | ||
35 | <defs | ||
36 | id="defs3767" /> | ||
37 | <sodipodi:namedview | ||
38 | pagecolor="#ffffff" | ||
39 | bordercolor="#666666" | ||
40 | borderopacity="1" | ||
41 | objecttolerance="10" | ||
42 | gridtolerance="10" | ||
43 | guidetolerance="10" | ||
44 | inkscape:pageopacity="0" | ||
45 | inkscape:pageshadow="2" | ||
46 | inkscape:window-width="1358" | ||
47 | inkscape:window-height="745" | ||
48 | id="namedview3765" | ||
49 | showgrid="false" | ||
50 | inkscape:snap-object-midpoints="false" | ||
51 | inkscape:zoom="2.2070312" | ||
52 | inkscape:cx="138.07797" | ||
53 | inkscape:cy="100.54828" | ||
54 | inkscape:window-x="0" | ||
55 | inkscape:window-y="15" | ||
56 | inkscape:window-maximized="0" | ||
57 | inkscape:current-layer="svg3763" /> | ||
58 | <path | ||
59 | d="M 160,149.66667 V 155 c 0,8.83667 -7.16333,16 -16,16 H 16 C 7.1633333,171 0,163.83667 0,155 V 69.66667 c 0,-8.83667 7.1633333,-16 16,-16 h 5.333333 V 123 c 0,14.704 11.962667,26.66667 26.666667,26.66667 z M 192,123 V 37.66667 c 0,-8.83667 -7.16333,-16 -16,-16 H 48 c -8.836667,0 -16,7.16333 -16,16 V 123 c 0,8.83667 7.163333,16 16,16 h 128 c 8.83667,0 16,-7.16333 16,-16 z M 85.333333,53.66667 c 0,8.83666 -7.163333,16 -16,16 -8.836666,0 -16,-7.16334 -16,-16 0,-8.83667 7.163334,-16 16,-16 8.836667,0 16,7.16333 16,16 z m -32,48 18.505,-18.505 c 1.562,-1.562 4.094667,-1.562 5.657,0 L 90.666667,96.33333 135.83833,51.16167 c 1.562,-1.562 4.09467,-1.562 5.657,0 l 29.17134,29.17166 v 37.33334 H 53.333333 Z" | ||
60 | id="path3761" | ||
61 | inkscape:connector-curvature="0" | ||
62 | style="fill:#78909c;stroke-width:0.33333334;fill-opacity:1" /> | ||
63 | </svg> | ||