diff options
| -rw-r--r-- | assets/css/custom.css | 17 | ||||
| -rw-r--r-- | layouts/partials/head.html | 34 |
2 files changed, 33 insertions, 18 deletions
diff --git a/assets/css/custom.css b/assets/css/custom.css index d5f4fab..60b93a4 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css | |||
| @@ -283,7 +283,7 @@ body.hide-chords .chord { | |||
| 283 | display: none; | 283 | display: none; |
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | body.hide-chords .key-selector{ | 286 | body.hide-chords .key-selector { |
| 287 | display: none; | 287 | display: none; |
| 288 | } | 288 | } |
| 289 | 289 | ||
| @@ -465,7 +465,9 @@ button#clear-search svg { | |||
| 465 | font-size: 14px; | 465 | font-size: 14px; |
| 466 | cursor: pointer; | 466 | cursor: pointer; |
| 467 | z-index: 9999; | 467 | z-index: 9999; |
| 468 | transition: opacity 0.2s ease-in-out, background 0.2s; | 468 | transition: |
| 469 | opacity 0.2s ease-in-out, | ||
| 470 | background 0.2s; | ||
| 469 | opacity: 0.6; | 471 | opacity: 0.6; |
| 470 | } | 472 | } |
| 471 | 473 | ||
| @@ -478,16 +480,17 @@ button#clear-search svg { | |||
| 478 | position: fixed; | 480 | position: fixed; |
| 479 | bottom: 50px; | 481 | bottom: 50px; |
| 480 | right: 10px; | 482 | right: 10px; |
| 481 | width: 250px; | 483 | width: 80%; |
| 482 | background: #241E1A; | 484 | max-width: 600px; |
| 485 | background: #241e1a; | ||
| 483 | border: 2px solid #ccc; | 486 | border: 2px solid #ccc; |
| 484 | padding: 12px; | 487 | padding: 12px; |
| 485 | border-radius: 8px; | 488 | border-radius: 8px; |
| 486 | box-shadow: 0 0 8px rgba(0,0,0,0.2); | 489 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.2); |
| 487 | z-index: 9998; | 490 | z-index: 9998; |
| 488 | } | 491 | } |
| 489 | 492 | ||
| 490 | #setlist-sidebar h6{ | 493 | #setlist-sidebar h6 { |
| 491 | margin-top: 5px; | 494 | margin-top: 5px; |
| 492 | } | 495 | } |
| 493 | 496 | ||
| @@ -507,4 +510,4 @@ button#clear-search svg { | |||
| 507 | color: red; | 510 | color: red; |
| 508 | font-size: 1rem; | 511 | font-size: 1rem; |
| 509 | cursor: pointer; | 512 | cursor: pointer; |
| 510 | } \ No newline at end of file | 513 | } |
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 }} |
