summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/css/custom.css4
-rw-r--r--layouts/partials/head.html18
-rw-r--r--static/manifest.webmanifest73
-rw-r--r--static/sw.js3
4 files changed, 95 insertions, 3 deletions
diff --git a/assets/css/custom.css b/assets/css/custom.css
index addb33a..d5f4fab 100644
--- a/assets/css/custom.css
+++ b/assets/css/custom.css
@@ -456,8 +456,8 @@ button#clear-search svg {
456 456
457#setlist-tab { 457#setlist-tab {
458 position: fixed; 458 position: fixed;
459 bottom: 5px; 459 bottom: 10px;
460 right: 3px; 460 right: 10px;
461 background: rgba(0, 0, 0, 0.5); /* translucent black */ 461 background: rgba(0, 0, 0, 0.5); /* translucent black */
462 color: white; 462 color: white;
463 padding: 3px 5px; 463 padding: 3px 5px;
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 60b1dc2..24d9d52 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -9,17 +9,33 @@
9 9
10<meta property="og:type" content="website"> 10<meta property="og:type" content="website">
11 11
12<link rel="manifest" href="/manifest.webmanifest">
13<meta name="mobile-web-app-capable" content="yes" />
14<meta name="apple-mobile-web-app-title" content="Let's Worship!" />
15<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
16
12<title> 17<title>
13 {{ if .IsHome}} 18 {{ if .IsHome}}
14 {{ site.Title }} 19 {{ site.Title }}
15 {{ else }} 20 {{ else }}
16 {{ printf "%s | %s" .Title site.Title }} 21 {{ .Title }}
17 {{ end }} 22 {{ end }}
18</title> 23</title>
19 24
20{{ partialCached "head/css.html" . }} 25{{ partialCached "head/css.html" . }}
21{{ partialCached "head/js.html" . }} 26{{ partialCached "head/js.html" . }}
22 27
28<script>
29
30if ('serviceWorker' in navigator) {
31
32navigator.serviceWorker.register('/sw.js');
33
34};
35
36</script>
37
38
23{{ if hugo.IsProduction }} 39{{ if hugo.IsProduction }}
24{{ template "_internal/google_analytics.html" . }} 40{{ template "_internal/google_analytics.html" . }}
25{{ end }} \ No newline at end of file 41{{ end }} \ No newline at end of file
diff --git a/static/manifest.webmanifest b/static/manifest.webmanifest
new file mode 100644
index 0000000..99b4ef2
--- /dev/null
+++ b/static/manifest.webmanifest
@@ -0,0 +1,73 @@
1{
2 "lang": "en",
3 "short_name": "Let's Worship!",
4 "name": "🎶Let's Worship!🎵",
5 "description": "Distraction Free Worship Song Book",
6 "icons": [
7 {
8 "src": "/favicon-192.png",
9 "type": "image/png",
10 "sizes": "192x192"
11 },
12 {
13 "src": "/maskable_favicon-192.png",
14 "type": "image/png",
15 "sizes": "192x192",
16 "purpose": "maskable"
17 },
18 {
19 "src": "/favicon-512.png",
20 "type": "image/png",
21 "sizes": "512x512"
22 },
23 {
24 "src": "/maskable_favicon-512.png",
25 "type": "image/png",
26 "sizes": "512x512",
27 "purpose": "maskable"
28 }
29 ],
30 "start_url": "/?utm_source=pwa",
31 "scope": "/",
32 "background_color": "#29241E",
33 "theme_color": "#29241E",
34 "display": "standalone",
35 "shortcuts": [
36 {
37 "name": "Shortcut 1",
38 "description": "Shortcut to important page in my PWA",
39 "url": "/shortcut1/?utm_source=pwa",
40 "icons": [
41 {
42 "src": "/favicon-192.png",
43 "type": "image/png",
44 "sizes": "192x192"
45 },
46 {
47 "src": "/maskable_favicon-192.png",
48 "type": "image/png",
49 "sizes": "192x192",
50 "purpose": "maskable"
51 }
52 ]
53 },
54 {
55 "name": "Shortcut 2",
56 "description": "Shortcut to another important page in my PWA",
57 "url": "/shortcut2/?utm_source=pwa",
58 "icons": [
59 {
60 "src": "/favicon-192.png",
61 "type": "image/png",
62 "sizes": "192x192"
63 },
64 {
65 "src": "/maskable_favicon-192.png",
66 "type": "image/png",
67 "sizes": "192x192",
68 "purpose": "maskable"
69 }
70 ]
71 }
72 ]
73} \ No newline at end of file
diff --git a/static/sw.js b/static/sw.js
new file mode 100644
index 0000000..258caf0
--- /dev/null
+++ b/static/sw.js
@@ -0,0 +1,3 @@
1self.addEventListener ('fetch', function(event) {
2
3});