diff options
| author | leiyu3 <s444814187@gmail.com> | 2025-07-23 17:08:09 -0400 |
|---|---|---|
| committer | leiyu3 <s444814187@gmail.com> | 2025-07-23 17:08:09 -0400 |
| commit | d3a4460ef83613008a00cf9602dac03627a8724f (patch) | |
| tree | a0ffdf2a8257bf7bc873cf8f867c421d25a43afd /layouts/partials | |
| parent | afce9b2bce88d6f07b8abec4c0bc1263a87f376d (diff) | |
| download | letsworship-d3a4460ef83613008a00cf9602dac03627a8724f.tar.gz letsworship-d3a4460ef83613008a00cf9602dac03627a8724f.zip | |
bigger setlist on mobile
Diffstat (limited to 'layouts/partials')
| -rw-r--r-- | layouts/partials/head.html | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 24d9d52..a232ff5 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html | |||
| @@ -15,11 +15,11 @@ | |||
| 15 | <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> | 15 | <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> |
| 16 | 16 | ||
| 17 | <title> | 17 | <title> |
| 18 | {{ if .IsHome}} | 18 | {{ if .IsHome}} |
| 19 | {{ site.Title }} | 19 | {{ site.Title }} |
| 20 | {{ else }} | 20 | {{ else }} |
| 21 | {{ .Title }} | 21 | {{ .Title }} |
| 22 | {{ end }} | 22 | {{ end }} |
| 23 | </title> | 23 | </title> |
| 24 | 24 | ||
| 25 | {{ partialCached "head/css.html" . }} | 25 | {{ partialCached "head/css.html" . }} |
| @@ -27,15 +27,27 @@ | |||
| 27 | 27 | ||
| 28 | <script> | 28 | <script> |
| 29 | 29 | ||
| 30 | if ('serviceWorker' in navigator) { | 30 | if ('serviceWorker' in navigator) { |
| 31 | 31 | ||
| 32 | navigator.serviceWorker.register('/sw.js'); | 32 | navigator.serviceWorker.register('/sw.js').then(reg => { |
| 33 | 33 | reg.onupdatefound = () => { | |
| 34 | }; | 34 | const installingWorker = reg.installing; |
| 35 | installingWorker.onstatechange = () => { | ||
| 36 | if (installingWorker.state === 'installed') { | ||
| 37 | if (navigator.serviceWorker.controller) { | ||
| 38 | // New content is available | ||
| 39 | alert("New version available! Refreshing..."); | ||
| 40 | window.location.reload(); | ||
| 41 | } | ||
| 42 | } | ||
| 43 | }; | ||
| 44 | }; | ||
| 45 | }); | ||
| 46 | }; | ||
| 35 | 47 | ||
| 36 | </script> | 48 | </script> |
| 37 | 49 | ||
| 38 | 50 | ||
| 39 | {{ if hugo.IsProduction }} | 51 | {{ if hugo.IsProduction }} |
| 40 | {{ template "_internal/google_analytics.html" . }} | 52 | {{ template "_internal/google_analytics.html" . }} |
| 41 | {{ end }} \ No newline at end of file | 53 | {{ end }} |
