diff options
| author | leiyu3 <s444814187@gmail.com> | 2025-07-17 13:51:48 -0400 |
|---|---|---|
| committer | leiyu3 <s444814187@gmail.com> | 2025-07-17 13:51:48 -0400 |
| commit | ce3c9ac0ee5609ae6a42f8729cfcb10e395c0e08 (patch) | |
| tree | 563ce229e4f183d160d7d4d8b23b3df6576f4575 | |
| parent | 00433bb63d22294fcb9adf94dc9980c28e3cb423 (diff) | |
| download | letsworship-ce3c9ac0ee5609ae6a42f8729cfcb10e395c0e08.tar.gz letsworship-ce3c9ac0ee5609ae6a42f8729cfcb10e395c0e08.zip | |
deploy
| -rwxr-xr-x | deploy.sh | 10 | ||||
| -rw-r--r-- | hugo.toml | 5 | ||||
| -rw-r--r-- | layouts/_default/list.html | 81 |
3 files changed, 94 insertions, 2 deletions
diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..c6e5996 --- /dev/null +++ b/deploy.sh | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | USER=root | ||
| 3 | HOST=letsworship.xyz | ||
| 4 | DIR=/var/www/letsworship | ||
| 5 | |||
| 6 | rm -rf public | ||
| 7 | |||
| 8 | hugo && rsync -avz --delete public/ ${USER}@${HOST}:${DIR} | ||
| 9 | |||
| 10 | exit 0 \ No newline at end of file | ||
| @@ -12,9 +12,10 @@ colorPalette = 'primary' | |||
| 12 | hideHeader = false | 12 | hideHeader = false |
| 13 | 13 | ||
| 14 | # Lists parameters | 14 | # Lists parameters |
| 15 | paginationSize = 15 | ||
| 16 | listSummaries = false | 15 | listSummaries = false |
| 17 | listDateFormat = '2006 Jan 02' | 16 | listDateFormat = '2006 Jan 02' |
| 18 | 17 | ||
| 19 | # Breadcrumbs | 18 | # Breadcrumbs |
| 20 | breadcrumbs = false \ No newline at end of file | 19 | breadcrumbs = false |
| 20 | |||
| 21 | disableKinds = ["taxonomy", "tags"] \ No newline at end of file | ||
diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..52db7eb --- /dev/null +++ b/layouts/_default/list.html | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | {{ define "main" }} | ||
| 2 | <script> | ||
| 3 | document.addEventListener("DOMContentLoaded", () => { | ||
| 4 | for (const e of document.getElementsByClassName("js-only")) { | ||
| 5 | e.classList.remove("js-only"); | ||
| 6 | } | ||
| 7 | |||
| 8 | const songs = document.querySelectorAll("li"); | ||
| 9 | const search = document.getElementById("search"); | ||
| 10 | const songlist = document.getElementById("song-list"); | ||
| 11 | |||
| 12 | const normalize = str => str.normalize('NFD').replace(/\p{Diacritic}/gu, ""); | ||
| 13 | |||
| 14 | search.addEventListener("input", () => { | ||
| 15 | const searchText = search.value.toLowerCase().trim(); | ||
| 16 | const searchTerms = normalize(searchText).split(" "); | ||
| 17 | const hasFilter = searchText.length > 0; | ||
| 18 | songlist.classList.toggle("list-searched", hasFilter); | ||
| 19 | |||
| 20 | songs.forEach(song => { | ||
| 21 | const songText = normalize(`${song.textContent} ${song.dataset.alias}`).toLowerCase(); | ||
| 22 | const isMatch = searchTerms.every(term => songText.includes(term)); | ||
| 23 | song.hidden = !isMatch; | ||
| 24 | }); | ||
| 25 | }); | ||
| 26 | |||
| 27 | const clearSearch = document.getElementById("clear-search"); | ||
| 28 | clearSearch.addEventListener("click", () => { | ||
| 29 | search.value = ""; | ||
| 30 | songs.forEach(song => { | ||
| 31 | song.hidden = false; | ||
| 32 | }); | ||
| 33 | songlist.classList.remove("list-searched"); | ||
| 34 | }); | ||
| 35 | }); | ||
| 36 | </script> | ||
| 37 | |||
| 38 | <div class="list-container"> | ||
| 39 | |||
| 40 | |||
| 41 | {{ $tagsPage := eq .Title "Tags"}} | ||
| 42 | |||
| 43 | <h2 class="center">What do you want to sing?</h2> | ||
| 44 | <div class="search-bar-container"> | ||
| 45 | <div class="search-wrapper"> | ||
| 46 | <input type="text" id="search" class="search-bar" placeholder="Search ALL Songs..."> | ||
| 47 | <button id="clear-search" class="js-only"> | ||
| 48 | <svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"> | ||
| 49 | <title>Backspace</title> | ||
| 50 | <path | ||
| 51 | d="M135.19 390.14a28.79 28.79 0 0021.68 9.86h246.26A29 29 0 00432 371.13V140.87A29 29 0 00403.13 112H156.87a28.84 28.84 0 00-21.67 9.84v0L46.33 256l88.86 134.11z" | ||
| 52 | fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"></path> | ||
| 53 | <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" | ||
| 54 | d="M336.67 192.33L206.66 322.34M336.67 322.34L206.66 192.33M336.67 192.33L206.66 322.34M336.67 322.34L206.66 192.33"> | ||
| 55 | </path> | ||
| 56 | </svg></button> | ||
| 57 | </div> | ||
| 58 | </div> | ||
| 59 | |||
| 60 | <ul id="song-list"> | ||
| 61 | {{ range .Pages }} | ||
| 62 | <li data-alias={{ if .Params.alias }}{{ .Params.alias }}{{ else }}{{ .Params.title }}{{ end }}> | ||
| 63 | <a href="{{ .RelPermalink }}"> | ||
| 64 | {{ .Title }} | ||
| 65 | </a> | ||
| 66 | </li> | ||
| 67 | {{ end }} | ||
| 68 | </ul> | ||
| 69 | </div> | ||
| 70 | |||
| 71 | <div class="about"> | ||
| 72 | {{ .Content }} | ||
| 73 | </div> | ||
| 74 | |||
| 75 | <div class="back-to-top"> | ||
| 76 | <a href="#top"> | ||
| 77 | back to top | ||
| 78 | </a> | ||
| 79 | </div> | ||
| 80 | |||
| 81 | {{ end }} \ No newline at end of file | ||
