diff options
Diffstat (limited to 'templates/layouts')
-rw-r--r-- | templates/layouts/default.html.ep | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index a43d9f1..4877488 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -5,6 +5,7 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="theme-color" content="#673ab7"> + <link rel="manifest" href="/static/manifest.json"> % my $av = 'v10'; # asset version %= stylesheet "/static/${av}/css/materialize.min.css" %= stylesheet "/static/${av}/css/material-icons.css" @@ -55,5 +56,16 @@ %= content </div> +<script> +if ('serviceWorker' in navigator) { + window.addEventListener('load', () => { + navigator.serviceWorker.register('/service-worker.js') + .then((reg) => { + console.log('Service worker registered.', reg); + }); + }); +} +</script> + </body> </html> |