home to your local SPACEGIRL 💫 arimelody.space
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

add release credits update UI

Signed-off-by: ari melody <ari@arimelody.me>

+628 -338
+48
admin/components/credits/addcredit.html
··· 1 + <dialog id="addcredit"> 2 + <header> 3 + <h2>Add artist credit</h2> 4 + </header> 5 + 6 + <ul> 7 + {{range $Artist := .Artists}} 8 + <li class="new-artist" 9 + data-id="{{$Artist.ID}}" 10 + hx-get="/admin/release/{{$.ReleaseID}}/newcredit/{{$Artist.ID}}" 11 + hx-target="#editcredits ul" 12 + hx-swap="beforeend" 13 + > 14 + <img src="{{$Artist.GetAvatar}}" alt="" width="16" loading="lazy" class="artist-avatar"> 15 + <span class="artist-name">{{$Artist.Name}}</span> 16 + <span class="artist-id">({{$Artist.ID}})</span> 17 + </li> 18 + {{end}} 19 + </ul> 20 + 21 + {{if not .Artists}} 22 + <p class="empty">There are no more artists to add.</p> 23 + {{end}} 24 + 25 + <div class="dialog-actions"> 26 + <button id="cancel" type="button">Cancel</button> 27 + </div> 28 + 29 + <script type="text/javascript"> 30 + (() => { 31 + const newCreditModal = document.getElementById("addcredit") 32 + const editCreditsModal = document.getElementById("editcredits") 33 + const cancelBtn = newCreditModal.querySelector("#cancel"); 34 + 35 + editCreditsModal.addEventListener("htmx:afterSwap", () => { 36 + newCreditModal.close(); 37 + newCreditModal.remove(); 38 + }); 39 + 40 + cancelBtn.addEventListener("click", () => { 41 + newCreditModal.close(); 42 + newCreditModal.remove(); 43 + }); 44 + 45 + newCreditModal.showModal(); 46 + })(); 47 + </script> 48 + </dialog>
+119
admin/components/credits/editcredits.html
··· 1 + <dialog id="editcredits"> 2 + <header> 3 + <h2>Editing: Credits</h2> 4 + <a id="add-credit" 5 + class="button new" 6 + href="/admin/release/{{.ID}}/addcredit" 7 + hx-get="/admin/release/{{.ID}}/addcredit" 8 + hx-target="body" 9 + hx-swap="beforeend" 10 + >Add</a> 11 + </header> 12 + 13 + <form action="/api/v1/music/{{.ID}}/credits"> 14 + <ul> 15 + {{range .Credits}} 16 + <li class="credit" data-artist="{{.Artist.ID}}"> 17 + <div> 18 + <img src="{{.Artist.GetAvatar}}" alt="" width="64" loading="lazy" class="artist-avatar"> 19 + <div class="credit-info"> 20 + <p class="artist-name">{{.Artist.Name}}</p> 21 + <div class="credit-attribute"> 22 + <label for="role">Role:</label> 23 + <input type="text" name="role" value="{{.Role}}"> 24 + </div> 25 + <div class="credit-attribute"> 26 + <label for="primary">Primary:</label> 27 + <input type="checkbox" name="primary" {{if .Primary}}checked{{end}}> 28 + </div> 29 + </div> 30 + <button type="button" class="delete">Delete</button> 31 + </div> 32 + </li> 33 + {{end}} 34 + </ul> 35 + 36 + <div class="dialog-actions"> 37 + <button id="discard" type="button">Discard</button> 38 + <button id="save" type="submit" class="save">Save</button> 39 + </div> 40 + </form> 41 + 42 + <script type="module"> 43 + (() => { 44 + const container = document.getElementById("editcredits"); 45 + const form = document.querySelector("#editcredits form"); 46 + const creditList = form.querySelector("ul"); 47 + const addCreditBtn = document.getElementById("add-credit"); 48 + const discardBtn = form.querySelector("button#discard"); 49 + 50 + function creditFromElement(el) { 51 + const artistID = el.dataset.artist; 52 + const roleInput = el.querySelector(`input[name="role"]`) 53 + const primaryInput = el.querySelector(`input[name="primary"]`) 54 + const deleteBtn = el.querySelector("button.delete"); 55 + 56 + let credit = { 57 + "artist": artistID, 58 + "role": roleInput.value, 59 + "primary": primaryInput.checked, 60 + }; 61 + 62 + roleInput.addEventListener("change", () => { 63 + credit.role = roleInput.value; 64 + }); 65 + primaryInput.addEventListener("change", () => { 66 + credit.primary = primaryInput.checked; 67 + }); 68 + deleteBtn.addEventListener("click", e => { 69 + if (!confirm("Are you sure you want to delete " + artistID + "'s credit?")) return; 70 + el.remove(); 71 + credits = credits.filter(credit => credit.artist != artistID); 72 + }); 73 + 74 + return credit; 75 + } 76 + 77 + let credits = [...form.querySelectorAll(".credit")].map(el => creditFromElement(el)); 78 + 79 + creditList.addEventListener("htmx:afterSwap", e => { 80 + const el = creditList.children[creditList.children.length - 1]; 81 + const credit = creditFromElement(el); 82 + credits.push(credit); 83 + }); 84 + 85 + container.showModal(); 86 + 87 + container.addEventListener("close", () => { 88 + container.remove(); 89 + }); 90 + 91 + form.addEventListener("submit", e => { 92 + e.preventDefault(); 93 + fetch(form.action, { 94 + method: "PUT", 95 + headers: { 96 + "Content-Type": "application/json", 97 + }, 98 + body: JSON.stringify(credits) 99 + }).then(res => { 100 + if (res.ok) location = location; 101 + else { 102 + res.text().then(err => { 103 + alert(err); 104 + console.error(err); 105 + }); 106 + } 107 + }).catch(err => { 108 + alert("Failed to update credits. Check the console for details"); 109 + console.error(err); 110 + }); 111 + }); 112 + 113 + discardBtn.addEventListener("click", e => { 114 + e.preventDefault(); 115 + container.close(); 116 + }); 117 + })(); 118 + </script> 119 + </dialog>
+17
admin/components/credits/newcredit.html
··· 1 + <li class="credit" data-artist="{{.ID}}"> 2 + <div> 3 + <img src="{{.GetAvatar}}" alt="" width="64" loading="lazy" class="artist-avatar"> 4 + <div class="credit-info"> 5 + <p class="artist-name">{{.Name}}</p> 6 + <div class="credit-attribute"> 7 + <label for="role">Role:</label> 8 + <input type="text" name="role" value=""> 9 + </div> 10 + <div class="credit-attribute"> 11 + <label for="primary">Primary:</label> 12 + <input type="checkbox" name="primary"> 13 + </div> 14 + </div> 15 + <button type="button" class="delete">Delete</button> 16 + </div> 17 + </li>
admin/components/links/addlink.html

This is a binary file and will not be displayed.

admin/components/links/editlinks.html

This is a binary file and will not be displayed.

admin/components/links/newlink.html

This is a binary file and will not be displayed.

admin/components/tracks/addtrack.html

This is a binary file and will not be displayed.

admin/components/tracks/edittracks.html

This is a binary file and will not be displayed.

admin/components/tracks/newtrack.html

This is a binary file and will not be displayed.

+37 -13
admin/http.go
··· 85 85 } 86 86 87 87 func GetSession(r *http.Request) *Session { 88 - // if ADMIN_BYPASS { 89 - // return &Session{} 90 - // } 88 + if ADMIN_BYPASS { 89 + return &Session{} 90 + } 91 91 92 92 var token = "" 93 93 // is the session token in context? ··· 177 177 cookie.Name = "token" 178 178 cookie.Value = session.Token 179 179 cookie.Expires = time.Now().Add(24 * time.Hour) 180 + // TODO: uncomment this probably that might be nice i think 180 181 // cookie.Secure = true 181 182 cookie.HttpOnly = true 182 183 cookie.Path = "/" 183 184 http.SetCookie(w, &cookie) 184 185 185 186 serveTemplate("login.html", loginData{Token: session.Token}).ServeHTTP(w, r) 186 - // w.WriteHeader(http.StatusOK) 187 - // w.Header().Add("Content-Type", "text/html") 188 - // w.Write([]byte( 189 - // "<!DOCTYPE html><html><head>"+ 190 - // "<meta http-equiv=\"refresh\" content=\"5;url=/admin/\" />"+ 191 - // "</head><body>"+ 192 - // "Logged in successfully. "+ 193 - // "You should be redirected to <a href=\"/admin/\">/admin/</a> in 5 seconds."+ 194 - // "</body></html>"), 195 - // ) 196 187 }) 197 188 } 198 189 ··· 247 238 } 248 239 249 240 err = template.ExecuteTemplate(w, "layout.html", data) 241 + if err != nil { 242 + fmt.Printf("Error executing template: %s\n", err) 243 + http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) 244 + return 245 + } 246 + }) 247 + } 248 + 249 + func serveComponent(page string, data any) http.Handler { 250 + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 251 + fp := filepath.Join("admin", "components", filepath.Clean(page)) 252 + 253 + info, err := os.Stat(fp) 254 + if err != nil { 255 + if os.IsNotExist(err) { 256 + http.NotFound(w, r) 257 + return 258 + } 259 + } 260 + 261 + if info.IsDir() { 262 + http.NotFound(w, r) 263 + return 264 + } 265 + 266 + template, err := template.ParseFiles(fp) 267 + if err != nil { 268 + fmt.Printf("Error parsing template files: %s\n", err) 269 + http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) 270 + return 271 + } 272 + 273 + err = template.Execute(w, data); 250 274 if err != nil { 251 275 fmt.Printf("Error executing template: %s\n", err) 252 276 http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
+69 -4
admin/releasehttp.go
··· 4 4 "fmt" 5 5 "html/template" 6 6 "net/http" 7 + "path" 7 8 "strings" 8 9 9 10 "arimelody.me/arimelody.me/global" ··· 25 26 26 27 func serveRelease() http.Handler { 27 28 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 28 - if r.URL.Path == "/" { 29 + slices := strings.Split(r.URL.Path[1:], "/") 30 + id := slices[0] 31 + release := global.GetRelease(id) 32 + if release == nil { 29 33 http.NotFound(w, r) 30 34 return 31 35 } 32 36 33 - id := r.URL.Path[1:] 34 - release := global.GetRelease(id) 35 - if release == nil { 37 + if len(slices) > 1 { 38 + switch slices[1] { 39 + case "editcredits": 40 + serveEditCredits(release).ServeHTTP(w, r) 41 + return 42 + case "addcredit": 43 + serveAddCredit(release).ServeHTTP(w, r) 44 + return 45 + case "newcredit": 46 + serveNewCredit().ServeHTTP(w, r) 47 + return 48 + } 36 49 http.NotFound(w, r) 37 50 return 38 51 } ··· 56 69 } 57 70 }) 58 71 } 72 + 73 + func serveEditCredits(release *model.Release) http.Handler { 74 + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 75 + w.Header().Set("Content-Type", "text/html") 76 + serveComponent(path.Join("credits", "editcredits.html"), release).ServeHTTP(w, r) 77 + return 78 + }) 79 + } 80 + 81 + func serveAddCredit(release *model.Release) http.Handler { 82 + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 83 + var artists = []*model.Artist{} 84 + for _, artist := range global.Artists { 85 + var exists = false 86 + for _, credit := range release.Credits { 87 + if credit.Artist == artist { 88 + exists = true 89 + break 90 + } 91 + } 92 + if !exists { 93 + artists = append(artists, artist) 94 + } 95 + } 96 + 97 + type response struct { 98 + ReleaseID string; 99 + Artists []*model.Artist 100 + } 101 + 102 + w.Header().Set("Content-Type", "text/html") 103 + serveComponent(path.Join("credits", "addcredit.html"), response{ 104 + ReleaseID: release.ID, 105 + Artists: artists, 106 + }).ServeHTTP(w, r) 107 + return 108 + }) 109 + } 110 + 111 + func serveNewCredit() http.Handler { 112 + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 113 + artist := global.GetArtist(strings.Split(r.URL.Path, "/")[3]) 114 + if artist == nil { 115 + http.NotFound(w, r) 116 + return 117 + } 118 + 119 + w.Header().Set("Content-Type", "text/html") 120 + serveComponent(path.Join("credits", "newcredit.html"), artist).ServeHTTP(w, r) 121 + return 122 + }) 123 + }
+11 -6
admin/static/admin.css
··· 15 15 background: #f0f0f0; 16 16 } 17 17 18 - header { 18 + nav { 19 19 width: min(720px, calc(100% - 2em)); 20 20 height: 2em; 21 21 margin: 1em auto; ··· 27 27 border-radius: .5em; 28 28 border: 1px solid #808080; 29 29 } 30 - header .icon { 30 + nav .icon { 31 31 height: 100%; 32 32 } 33 - header .title { 33 + nav .title { 34 34 width: auto; 35 35 height: 100%; 36 36 ··· 43 43 44 44 color: inherit; 45 45 } 46 - header a { 46 + nav a { 47 47 width: auto; 48 48 height: 100%; 49 49 ··· 57 57 58 58 color: inherit; 59 59 } 60 - header a:hover { 60 + nav a:hover { 61 61 background: #00000010; 62 62 text-decoration: none; 63 63 } 64 - header #logout { 64 + nav #logout { 65 65 margin-left: auto; 66 66 } 67 67 ··· 78 78 79 79 a:hover { 80 80 text-decoration: underline; 81 + } 82 + 83 + a img { 84 + height: .9em; 85 + transform: translateY(.1em); 81 86 } 82 87 83 88 .card {
+104 -18
admin/static/release.css
··· 1 1 #release { 2 2 margin-bottom: 1em; 3 - padding: 1em; 3 + padding: 1.5em; 4 4 display: flex; 5 5 flex-direction: row; 6 6 gap: 1.2em; ··· 28 28 } 29 29 30 30 .release-info { 31 - margin: .5em 0; 31 + margin: 0; 32 32 flex-grow: 1; 33 33 display: flex; 34 34 flex-direction: column; ··· 96 96 border-color: #808080; 97 97 } 98 98 99 - button.edit { 99 + button { 100 100 color: inherit; 101 + } 102 + button.new { 101 103 background: #c4ff6a; 102 104 border-color: #84b141; 103 105 } 104 - button.edit:hover { 105 - background: #fff; 106 - border-color: #d0d0d0; 107 - } 108 - button.edit:active { 109 - background: #d0d0d0; 110 - border-color: #808080; 111 - } 112 - 113 106 button.save { 114 107 background: #6fd7ff; 115 108 border-color: #6f9eb0; 116 109 } 117 - button.save:hover { 110 + button.delete { 111 + background: #ff7171; 112 + border-color: #7d3535; 113 + } 114 + button:hover { 118 115 background: #fff; 119 116 border-color: #d0d0d0; 120 117 } 121 - button.save:active { 118 + button:active { 122 119 background: #d0d0d0; 123 120 border-color: #808080; 124 121 } ··· 137 134 justify-content: right; 138 135 } 139 136 140 - .credit { 137 + .card.credits .credit { 141 138 margin-bottom: .5em; 142 139 padding: .5em; 143 140 display: flex; ··· 150 147 border: 1px solid #808080; 151 148 } 152 149 153 - .credit .artist-avatar { 150 + .card.credits .credit .artist-avatar { 154 151 border-radius: .5em; 155 152 } 156 153 157 - .credit .artist-name { 154 + .card.credits .credit .artist-name { 158 155 font-weight: bold; 159 156 } 160 157 161 - .credit .artist-role small { 158 + .card.credits .credit .artist-role small { 162 159 font-size: inherit; 163 160 opacity: .66; 164 161 } ··· 180 177 display: flex; 181 178 flex-direction: row; 182 179 justify-content: space-between; 180 + } 181 + 182 + .card-title a.button { 183 + text-decoration: none; 183 184 } 184 185 185 186 .track-id { ··· 217 218 opacity: 0.75; 218 219 } 219 220 221 + dialog { 222 + width: min(720px, calc(100% - 2em)); 223 + padding: 2em; 224 + border: 1px solid #101010; 225 + border-radius: 8px; 226 + } 227 + 228 + dialog header { 229 + margin-bottom: 1em; 230 + background: none; 231 + display: flex; 232 + flex-direction: row; 233 + justify-content: space-between; 234 + } 235 + 236 + dialog header h2 { 237 + margin: 0; 238 + } 239 + 240 + dialog div.dialog-actions { 241 + margin-top: 1em; 242 + display: flex; 243 + flex-direction: row; 244 + justify-content: end; 245 + gap: .5em; 246 + } 247 + 248 + dialog#editcredits ul { 249 + margin: 0; 250 + padding: 0; 251 + list-style: none; 252 + } 253 + 254 + dialog#editcredits .credit>div { 255 + margin-bottom: .5em; 256 + padding: .5em; 257 + display: flex; 258 + flex-direction: row; 259 + align-items: center; 260 + gap: 1em; 261 + 262 + border-radius: .5em; 263 + background: #f8f8f8f8; 264 + border: 1px solid #808080; 265 + } 266 + 267 + dialog#editcredits .credit p { 268 + margin: 0; 269 + } 270 + 271 + dialog#editcredits .credit .artist-avatar { 272 + border-radius: .5em; 273 + } 274 + 275 + dialog#editcredits .credit .credit-info { 276 + width: 100%; 277 + } 278 + 279 + dialog#editcredits .credit .credit-info .credit-attribute { 280 + width: 100%; 281 + display: flex; 282 + } 283 + 284 + dialog#editcredits .credit .credit-info .credit-attribute input[type="text"] { 285 + margin-left: .25em; 286 + padding: .2em .4em; 287 + flex-grow: 1; 288 + font-family: inherit; 289 + border: 1px solid #8888; 290 + border-radius: 4px; 291 + color: inherit; 292 + } 293 + 294 + dialog#editcredits .credit .artist-name { 295 + font-weight: bold; 296 + } 297 + 298 + dialog#editcredits .credit .artist-role small { 299 + font-size: inherit; 300 + opacity: .66; 301 + } 302 + 303 + dialog#editcredits .credit button.delete { 304 + margin-left: auto; 305 + }
+44 -17
admin/views/edit-release.html
··· 52 52 placeholder="No description provided." 53 53 rows="3" 54 54 id="description" 55 - >{{.Description}}</textarea> 55 + >{{.Description}}</textarea> 56 56 </td> 57 57 </tr> 58 58 <tr> ··· 84 84 </tr> 85 85 </table> 86 86 <div class="release-actions"> 87 - <a href="/music/{{.ID}}" class="button">Gateway</a> 87 + <a href="/music/{{.ID}}" class="button" target="_blank">Gateway <img src="/img/external-link.svg"/></a> 88 88 <button type="submit" class="save" id="save" disabled>Save</button> 89 89 </div> 90 90 </div> ··· 92 92 93 93 <div class="card-title"> 94 94 <h2>Credits ({{len .Credits}})</h2> 95 - <button id="update-credits" class="edit">Edit</button> 95 + <a class="button edit" 96 + href="/admin/release/{{.ID}}/editcredits" 97 + hx-get="/admin/release/{{.ID}}/editcredits" 98 + hx-target="body" 99 + hx-swap="beforeend" 100 + >Edit</a> 96 101 </div> 97 102 <div class="card credits"> 98 - {{range $Credit := .Credits}} 103 + {{range .Credits}} 99 104 <div class="credit"> 100 - <img src="{{$Credit.Artist.GetAvatar}}" alt="" width="64" loading="lazy" class="artist-avatar"> 105 + <img src="{{.Artist.GetAvatar}}" alt="" width="64" loading="lazy" class="artist-avatar"> 101 106 <div class="credit-info"> 102 - <p class="artist-name"><a href="/admin/artists/{{$Credit.Artist.ID}}">{{$Credit.Artist.Name}}</a></p> 107 + <p class="artist-name"><a href="/admin/artists/{{.Artist.ID}}">{{.Artist.Name}}</a></p> 103 108 <p class="artist-role"> 104 - {{$Credit.Role}} 105 - {{if $Credit.Primary}} 109 + {{.Role}} 110 + {{if .Primary}} 106 111 <small>(Primary)</small> 107 112 {{end}} 108 113 </p> ··· 115 120 </div> 116 121 117 122 <div class="card-title"> 123 + <h2>Links ({{len .Links}})</h2> 124 + <a class="button edit" 125 + href="/admin/release/{{.ID}}/editlinks" 126 + hx-get="/admin/release/{{.ID}}/editlinks" 127 + hx-target="body" 128 + hx-swap="beforeend" 129 + >Edit</a> 130 + </div> 131 + <div class="card links"> 132 + {{range .Links}} 133 + <div class="release-link" data-id="{{.Name}}"> 134 + <a href="{{.URL}}" class="button">{{.Name}} <img src="/img/external-link.svg"/></a></p> 135 + </div> 136 + {{end}} 137 + </div> 138 + 139 + <div class="card-title"> 118 140 <h2>Tracklist ({{len .Tracks}})</h2> 119 - <button id="update-tracks" class="edit">Edit</button> 141 + <a class="button edit" 142 + href="/admin/release/{{.ID}}/edittracks" 143 + hx-get="/admin/release/{{.ID}}/edittracks" 144 + hx-target="body" 145 + hx-swap="beforeend" 146 + >Edit</a> 120 147 </div> 121 148 <div class="card tracks"> 122 - {{range $Track := .Tracks}} 123 - <div class="track" data-id="{{$Track.ID}}"> 124 - <h2 class="track-title">{{$Track.Number}}. {{$Track.Title}}</h2> 125 - <p class="track-id">{{$Track.ID}}</p> 126 - {{if $Track.Description}} 127 - <p class="track-description">{{$Track.Description}}</p> 149 + {{range .Tracks}} 150 + <div class="track" data-id="{{.ID}}"> 151 + <h2 class="track-title">{{.Number}}. {{.Title}}</h2> 152 + <p class="track-id">{{.ID}}</p> 153 + {{if .Description}} 154 + <p class="track-description">{{.Description}}</p> 128 155 {{else}} 129 156 <p class="track-description empty">No description provided.</p> 130 157 {{end}} 131 - {{if $Track.Lyrics}} 132 - <p class="track-lyrics">{{$Track.Lyrics}}</p> 158 + {{if .Lyrics}} 159 + <p class="track-lyrics">{{.Lyrics}}</p> 133 160 {{else}} 134 161 <p class="track-lyrics empty">There are no lyrics.</p> 135 162 {{end}}
+7 -4
admin/views/layout.html
··· 10 10 {{block "head" .}}{{end}} 11 11 12 12 <link rel="stylesheet" href="/admin/static/admin.css"> 13 + <script type="module" src="/script/vendor/htmx.min.js"></script> 13 14 </head> 14 15 15 16 <body> 16 17 <header> 17 - <img src="/img/favicon.png" alt="" class="icon"> 18 - <a href="/">arimelody.me</a> 19 - <a href="/admin">home</a> 20 - <a href="/admin/logout" id="logout">log out</a> 18 + <nav> 19 + <img src="/img/favicon.png" alt="" class="icon"> 20 + <a href="/">arimelody.me</a> 21 + <a href="/admin">home</a> 22 + <a href="/admin/logout" id="logout">log out</a> 23 + </nav> 21 24 </header> 22 25 23 26 {{block "content" .}}
+9
public/img/external-link.svg
··· 1 + <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 + <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> 3 + <svg width="100%" height="100%" viewBox="0 0 128 128" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"> 4 + <g transform="matrix(1,0,0,1,-8,-8)"> 5 + <g transform="matrix(0.9375,0,0,0.9375,8,16)"> 6 + <path d="M110.222,70.621C110.222,68.866 111.298,67.289 112.932,66.649C114.567,66.008 116.427,66.434 117.62,67.723L126.864,77.707C127.594,78.495 128,79.53 128,80.605L128,96C128,113.661 113.661,128 96,128L32,128C14.339,128 0,113.661 0,96L0,32C0,14.339 14.339,0 32,0L47.395,0C48.47,-0 49.505,0.406 50.293,1.136L60.277,10.38C61.566,11.573 61.992,13.433 61.351,15.068C60.711,16.702 59.134,17.778 57.379,17.778L32,17.778C24.151,17.778 17.778,24.151 17.778,32L17.778,96C17.778,103.849 24.151,110.222 32,110.222L96,110.222C103.849,110.222 110.222,103.849 110.222,96L110.222,70.621ZM65.524,82.956C64.724,83.756 63.638,84.206 62.507,84.206C61.375,84.206 60.29,83.757 59.49,82.956L45.044,68.51C44.243,67.71 43.794,66.625 43.794,65.493C43.794,64.362 44.244,63.276 45.044,62.476L92.16,15.36L75.55,-1.25C74.33,-2.47 73.965,-4.305 74.625,-5.899C75.286,-7.494 76.842,-8.533 78.567,-8.533L132.267,-8.533C133.398,-8.533 134.484,-8.084 135.284,-7.284C136.084,-6.483 136.533,-5.398 136.533,-4.267L136.533,49.433C136.533,51.158 135.494,52.714 133.899,53.375C132.305,54.035 130.47,53.67 129.25,52.45L112.64,35.84L65.524,82.956Z"/> 7 + </g> 8 + </g> 9 + </svg>
+54 -66
public/script/main.js
··· 2 2 import "./config.js"; 3 3 4 4 function type_out(e) { 5 - const text = e.innerText; 6 - const original = e.innerHTML; 7 - e.innerText = ""; 8 - const delay = 25; 9 - let chars = 0; 5 + const text = e.innerText; 6 + const original = e.innerHTML; 7 + const delay = 25; 8 + let chars = 0; 10 9 11 - function insert_char(character, parent) { 12 - const c = document.createElement("span"); 13 - c.innerText = character; 14 - parent.appendChild(c); 15 - c.classList.add("newchar"); 16 - } 10 + function insert_char(character, parent) { 11 + if (chars == 0) parent.innerHTML = ""; 12 + const c = document.createElement("span"); 13 + c.innerText = character; 14 + parent.appendChild(c); 15 + c.classList.add("newchar"); 16 + } 17 17 18 - function normalize() { 19 - e.innerHTML = original; 20 - } 18 + function normalize() { 19 + e.innerHTML = original; 20 + } 21 21 22 - function increment_char() { 23 - const newchar = text.substring(chars - 1, chars); 24 - insert_char(newchar, e); 25 - chars++; 26 - if (chars <= text.length) { 27 - setTimeout(increment_char, delay); 28 - } else { 29 - setTimeout(normalize, 250); 30 - } 22 + function increment_char() { 23 + const newchar = text.substring(chars, chars + 1); 24 + insert_char(newchar, e); 25 + chars++; 26 + if (chars <= text.length) { 27 + setTimeout(increment_char, delay); 28 + } else { 29 + setTimeout(normalize, 250); 31 30 } 31 + } 32 32 33 - increment_char(); 33 + increment_char(); 34 34 } 35 35 36 36 function fill_list(list) { 37 - const items = list.querySelectorAll("li a, li span"); 38 - items.innerText = ""; 39 - const delay = 100; 37 + const items = list.querySelectorAll("li a, li span"); 38 + items.innerText = ""; 39 + const delay = 100; 40 40 41 - items.forEach((item, iter) => { 42 - item.style.animationDelay = `${iter * delay}ms`; 43 - item.style.animationPlayState = "playing"; 44 - }); 41 + items.forEach((item, iter) => { 42 + item.style.animationDelay = `${iter * delay}ms`; 43 + item.style.animationPlayState = "playing"; 44 + }); 45 45 } 46 46 47 - function start() { 48 - [...document.querySelectorAll("h1, h2, h3, h4, h5, h6")] 49 - .filter((e) => e.innerText != "") 50 - .forEach((e) => { 51 - type_out(e); 52 - }); 53 - [...document.querySelectorAll("ol, ul")] 54 - .filter((e) => e.innerText != "") 55 - .forEach((e) => { 56 - fill_list(e); 57 - }); 58 - 59 - document.addEventListener("htmx:afterSwap", async event => { 60 - const res = await event.detail.xhr.response; 61 - var new_head = res.substring(res.indexOf("<head>")+1, res.indexOf("</head>")); 62 - if (new_head) { 63 - document.head.innerHTML = new_head; 64 - } 65 - window.scrollY = 0; 47 + document.addEventListener("DOMContentLoaded", () => { 48 + [...document.querySelectorAll(".typeout")] 49 + .filter((e) => e.innerText != "") 50 + .forEach((e) => { 51 + type_out(e); 52 + console.log(e); 53 + }); 54 + [...document.querySelectorAll("ol, ul")] 55 + .filter((e) => e.innerText != "") 56 + .forEach((e) => { 57 + fill_list(e); 66 58 }); 67 59 68 - const top_button = document.getElementById("backtotop"); 69 - window.onscroll = () => { 70 - if (!top_button) return; 71 - const btt_threshold = 100; 72 - if ( 73 - document.body.scrollTop > btt_threshold || 74 - document.documentElement.scrollTop > btt_threshold 75 - ) { 76 - top_button.classList.add("active"); 77 - } else { 78 - top_button.classList.remove("active"); 79 - } 60 + const top_button = document.getElementById("backtotop"); 61 + window.onscroll = () => { 62 + if (!top_button) return; 63 + const btt_threshold = 100; 64 + if ( 65 + document.body.scrollTop > btt_threshold || 66 + document.documentElement.scrollTop > btt_threshold 67 + ) { 68 + top_button.classList.add("active"); 69 + } else { 70 + top_button.classList.remove("active"); 80 71 } 81 - } 82 - 83 - document.addEventListener("swap", () => { 84 - start(); 72 + } 85 73 });
-117
public/script/swap.js
··· 1 - const swap_event = new Event("swap"); 2 - 3 - let caches = {}; 4 - 5 - async function cached_fetch(url) { 6 - let cached = caches[url]; 7 - 8 - const res = cached === undefined ? await fetch(url) : await fetch(url, { 9 - headers: { 10 - "If-Modified-Since": cached.last_modified 11 - } 12 - }); 13 - 14 - if (res.status === 304 && cached !== undefined) { 15 - return cached.content; 16 - } 17 - if (res.status !== 200) return; 18 - if (!res.headers.get("content-type").startsWith("text/html")) return; 19 - 20 - const text = await res.text(); 21 - if (res.headers.get("last-modified")) { 22 - caches[url] = { 23 - content: text, 24 - last_modified: res.headers.get("last-modified") 25 - } 26 - } 27 - return text; 28 - } 29 - 30 - async function swap(url, stateful) { 31 - if (typeof url !== 'string') return; 32 - 33 - const segments = window.location.href.split("/"); 34 - if (url.startsWith(window.location.origin) && segments[segments.length - 1].includes("#")) { 35 - window.location.href = url; 36 - return; 37 - } 38 - 39 - if (stateful && window.location.href.endsWith(url)) return; 40 - 41 - const text = await cached_fetch(url); 42 - const content = new DOMParser().parseFromString(text, "text/html"); 43 - 44 - const stylesheets = [...content.querySelectorAll("link[rel='stylesheet']")]; 45 - 46 - // swap title 47 - document.title = content.title; 48 - // swap body html 49 - document.body.innerHTML = content.body.innerHTML; 50 - // swap stylesheets 51 - const old_sheets = document.head.querySelectorAll("link[rel='stylesheet']"); 52 - stylesheets.forEach(stylesheet => { 53 - let exists = false; 54 - old_sheets.forEach(old_sheet => { 55 - if (old_sheet.href === stylesheet.href) exists = true; 56 - }); 57 - if (!exists) document.head.appendChild(stylesheet); 58 - }); 59 - old_sheets.forEach(old_sheet => { 60 - let exists = false; 61 - stylesheets.forEach(stylesheet => { 62 - if (stylesheet.href === old_sheet.href) exists = true; 63 - }); 64 - if (!exists) old_sheet.remove(); 65 - }); 66 - // push history 67 - if (stateful) history.pushState(url, "", url); 68 - 69 - bind(document.body); 70 - } 71 - 72 - function bind(content) { 73 - if (typeof content !== 'object' || content.nodeType !== Node.ELEMENT_NODE) return; 74 - 75 - content.querySelectorAll("[swap-url]").forEach(element => { 76 - const href = element.attributes.getNamedItem('swap-url').value; 77 - 78 - element.addEventListener("click", event => { 79 - event.preventDefault(); 80 - swap(href, true); 81 - }); 82 - 83 - [...element.querySelectorAll("a[href], [swap-url]")].forEach(element => { 84 - if (element.href) { 85 - if (!element.href.endsWith(href)) return; 86 - element.attributes.removeNamedItem("href"); 87 - } 88 - const swap_url = element.attributes.getNamedItem("swap-url"); 89 - if (swap_url) { 90 - if (!swap_url.endsWith(href)) return; 91 - element.attributes.removeNamedItem("swap-url"); 92 - } 93 - }); 94 - }); 95 - 96 - content.querySelectorAll("a[href]:not([swap-url])").forEach(element => { 97 - if (element.href.includes("#")) return; 98 - if (!element.href.startsWith(window.location.origin)) return; 99 - const href = element.href.substring(window.location.origin.length); 100 - if (href.includes(".")) return; 101 - 102 - element.addEventListener("click", event => { 103 - event.preventDefault(); 104 - swap(element.href, true); 105 - }); 106 - }); 107 - 108 - document.dispatchEvent(swap_event); 109 - } 110 - 111 - window.addEventListener("popstate", event => { 112 - swap(event.state, false); 113 - }); 114 - 115 - document.addEventListener("DOMContentLoaded", () => { 116 - bind(document.body); 117 - });
+1
public/script/vendor/htmx.min.js
··· 1 + var htmx=function(){"use strict";const Q={onLoad:null,process:null,on:null,off:null,trigger:null,ajax:null,find:null,findAll:null,closest:null,values:function(e,t){const n=cn(e,t||"post");return n.values},remove:null,addClass:null,removeClass:null,toggleClass:null,takeClass:null,swap:null,defineExtension:null,removeExtension:null,logAll:null,logNone:null,logger:null,config:{historyEnabled:true,historyCacheSize:10,refreshOnHistoryMiss:false,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:true,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:true,allowScriptTags:true,inlineScriptNonce:"",inlineStyleNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:false,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",scrollBehavior:"instant",defaultFocusScroll:false,getCacheBusterParam:false,globalViewTransitions:false,methodsThatUseUrlParams:["get","delete"],selfRequestsOnly:true,ignoreTitle:false,scrollIntoViewOnBoost:true,triggerSpecsCache:null,disableInheritance:false,responseHandling:[{code:"204",swap:false},{code:"[23]..",swap:true},{code:"[45]..",swap:false,error:true}],allowNestedOobSwaps:true},parseInterval:null,_:null,version:"2.0.0"};Q.onLoad=$;Q.process=Dt;Q.on=be;Q.off=we;Q.trigger=he;Q.ajax=Hn;Q.find=r;Q.findAll=p;Q.closest=g;Q.remove=K;Q.addClass=W;Q.removeClass=o;Q.toggleClass=Y;Q.takeClass=ge;Q.swap=ze;Q.defineExtension=Un;Q.removeExtension=Bn;Q.logAll=z;Q.logNone=J;Q.parseInterval=d;Q._=_;const n={addTriggerHandler:Et,bodyContains:le,canAccessLocalStorage:j,findThisElement:Ee,filterValues:dn,swap:ze,hasAttribute:s,getAttributeValue:te,getClosestAttributeValue:re,getClosestMatch:T,getExpressionVars:Cn,getHeaders:hn,getInputValues:cn,getInternalData:ie,getSwapSpecification:pn,getTriggerSpecs:lt,getTarget:Ce,makeFragment:D,mergeObjects:ue,makeSettleInfo:xn,oobSwap:Te,querySelectorExt:fe,settleImmediately:Gt,shouldCancel:dt,triggerEvent:he,triggerErrorEvent:ae,withExtensions:Ut};const v=["get","post","put","delete","patch"];const R=v.map(function(e){return"[hx-"+e+"], [data-hx-"+e+"]"}).join(", ");const O=e("head");function e(e,t=false){return new RegExp(`<${e}(\\s[^>]*>|>)([\\s\\S]*?)<\\/${e}>`,t?"gim":"im")}function d(e){if(e==undefined){return undefined}let t=NaN;if(e.slice(-2)=="ms"){t=parseFloat(e.slice(0,-2))}else if(e.slice(-1)=="s"){t=parseFloat(e.slice(0,-1))*1e3}else if(e.slice(-1)=="m"){t=parseFloat(e.slice(0,-1))*1e3*60}else{t=parseFloat(e)}return isNaN(t)?undefined:t}function ee(e,t){return e instanceof Element&&e.getAttribute(t)}function s(e,t){return!!e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute("data-"+t))}function te(e,t){return ee(e,t)||ee(e,"data-"+t)}function u(e){const t=e.parentElement;if(!t&&e.parentNode instanceof ShadowRoot)return e.parentNode;return t}function ne(){return document}function H(e,t){return e.getRootNode?e.getRootNode({composed:t}):ne()}function T(e,t){while(e&&!t(e)){e=u(e)}return e||null}function q(e,t,n){const r=te(t,n);const o=te(t,"hx-disinherit");var i=te(t,"hx-inherit");if(e!==t){if(Q.config.disableInheritance){if(i&&(i==="*"||i.split(" ").indexOf(n)>=0)){return r}else{return null}}if(o&&(o==="*"||o.split(" ").indexOf(n)>=0)){return"unset"}}return r}function re(t,n){let r=null;T(t,function(e){return!!(r=q(t,ce(e),n))});if(r!=="unset"){return r}}function a(e,t){const n=e instanceof Element&&(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector);return!!n&&n.call(e,t)}function L(e){const t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i;const n=t.exec(e);if(n){return n[1].toLowerCase()}else{return""}}function N(e){const t=new DOMParser;return t.parseFromString(e,"text/html")}function A(e,t){while(t.childNodes.length>0){e.append(t.childNodes[0])}}function I(e){const t=ne().createElement("script");se(e.attributes,function(e){t.setAttribute(e.name,e.value)});t.textContent=e.textContent;t.async=false;if(Q.config.inlineScriptNonce){t.nonce=Q.config.inlineScriptNonce}return t}function P(e){return e.matches("script")&&(e.type==="text/javascript"||e.type==="module"||e.type==="")}function k(e){Array.from(e.querySelectorAll("script")).forEach(e=>{if(P(e)){const t=I(e);const n=e.parentNode;try{n.insertBefore(t,e)}catch(e){w(e)}finally{e.remove()}}})}function D(e){const t=e.replace(O,"");const n=L(t);let r;if(n==="html"){r=new DocumentFragment;const i=N(e);A(r,i.body);r.title=i.title}else if(n==="body"){r=new DocumentFragment;const i=N(t);A(r,i.body);r.title=i.title}else{const i=N('<body><template class="internal-htmx-wrapper">'+t+"</template></body>");r=i.querySelector("template").content;r.title=i.title;var o=r.querySelector("title");if(o&&o.parentNode===r){o.remove();r.title=o.innerText}}if(r){if(Q.config.allowScriptTags){k(r)}else{r.querySelectorAll("script").forEach(e=>e.remove())}}return r}function oe(e){if(e){e()}}function t(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function M(e){return typeof e==="function"}function X(e){return t(e,"Object")}function ie(e){const t="htmx-internal-data";let n=e[t];if(!n){n=e[t]={}}return n}function F(t){const n=[];if(t){for(let e=0;e<t.length;e++){n.push(t[e])}}return n}function se(t,n){if(t){for(let e=0;e<t.length;e++){n(t[e])}}}function U(e){const t=e.getBoundingClientRect();const n=t.top;const r=t.bottom;return n<window.innerHeight&&r>=0}function le(e){const t=e.getRootNode&&e.getRootNode();if(t&&t instanceof window.ShadowRoot){return ne().body.contains(t.host)}else{return ne().body.contains(e)}}function B(e){return e.trim().split(/\s+/)}function ue(e,t){for(const n in t){if(t.hasOwnProperty(n)){e[n]=t[n]}}return e}function S(e){try{return JSON.parse(e)}catch(e){w(e);return null}}function j(){const e="htmx:localStorageTest";try{localStorage.setItem(e,e);localStorage.removeItem(e);return true}catch(e){return false}}function V(t){try{const e=new URL(t);if(e){t=e.pathname+e.search}if(!/^\/$/.test(t)){t=t.replace(/\/+$/,"")}return t}catch(e){return t}}function _(e){return vn(ne().body,function(){return eval(e)})}function $(t){const e=Q.on("htmx:load",function(e){t(e.detail.elt)});return e}function z(){Q.logger=function(e,t,n){if(console){console.log(t,e,n)}}}function J(){Q.logger=null}function r(e,t){if(typeof e!=="string"){return e.querySelector(t)}else{return r(ne(),e)}}function p(e,t){if(typeof e!=="string"){return e.querySelectorAll(t)}else{return p(ne(),e)}}function E(){return window}function K(e,t){e=y(e);if(t){E().setTimeout(function(){K(e);e=null},t)}else{u(e).removeChild(e)}}function ce(e){return e instanceof Element?e:null}function G(e){return e instanceof HTMLElement?e:null}function Z(e){return typeof e==="string"?e:null}function h(e){return e instanceof Element||e instanceof Document||e instanceof DocumentFragment?e:null}function W(e,t,n){e=ce(y(e));if(!e){return}if(n){E().setTimeout(function(){W(e,t);e=null},n)}else{e.classList&&e.classList.add(t)}}function o(e,t,n){let r=ce(y(e));if(!r){return}if(n){E().setTimeout(function(){o(r,t);r=null},n)}else{if(r.classList){r.classList.remove(t);if(r.classList.length===0){r.removeAttribute("class")}}}}function Y(e,t){e=y(e);e.classList.toggle(t)}function ge(e,t){e=y(e);se(e.parentElement.children,function(e){o(e,t)});W(ce(e),t)}function g(e,t){e=ce(y(e));if(e&&e.closest){return e.closest(t)}else{do{if(e==null||a(e,t)){return e}}while(e=e&&ce(u(e)));return null}}function l(e,t){return e.substring(0,t.length)===t}function pe(e,t){return e.substring(e.length-t.length)===t}function i(e){const t=e.trim();if(l(t,"<")&&pe(t,"/>")){return t.substring(1,t.length-2)}else{return t}}function m(e,t,n){e=y(e);if(t.indexOf("closest ")===0){return[g(ce(e),i(t.substr(8)))]}else if(t.indexOf("find ")===0){return[r(h(e),i(t.substr(5)))]}else if(t==="next"){return[ce(e).nextElementSibling]}else if(t.indexOf("next ")===0){return[me(e,i(t.substr(5)),!!n)]}else if(t==="previous"){return[ce(e).previousElementSibling]}else if(t.indexOf("previous ")===0){return[ye(e,i(t.substr(9)),!!n)]}else if(t==="document"){return[document]}else if(t==="window"){return[window]}else if(t==="body"){return[document.body]}else if(t==="root"){return[H(e,!!n)]}else if(t.indexOf("global ")===0){return m(e,t.slice(7),true)}else{return F(h(H(e,!!n)).querySelectorAll(i(t)))}}var me=function(t,e,n){const r=h(H(t,n)).querySelectorAll(e);for(let e=0;e<r.length;e++){const o=r[e];if(o.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_PRECEDING){return o}}};var ye=function(t,e,n){const r=h(H(t,n)).querySelectorAll(e);for(let e=r.length-1;e>=0;e--){const o=r[e];if(o.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_FOLLOWING){return o}}};function fe(e,t){if(typeof e!=="string"){return m(e,t)[0]}else{return m(ne().body,e)[0]}}function y(e,t){if(typeof e==="string"){return r(h(t)||document,e)}else{return e}}function xe(e,t,n){if(M(t)){return{target:ne().body,event:Z(e),listener:t}}else{return{target:y(e),event:Z(t),listener:n}}}function be(t,n,r){_n(function(){const e=xe(t,n,r);e.target.addEventListener(e.event,e.listener)});const e=M(n);return e?n:r}function we(t,n,r){_n(function(){const e=xe(t,n,r);e.target.removeEventListener(e.event,e.listener)});return M(n)?n:r}const ve=ne().createElement("output");function Se(e,t){const n=re(e,t);if(n){if(n==="this"){return[Ee(e,t)]}else{const r=m(e,n);if(r.length===0){w('The selector "'+n+'" on '+t+" returned no matches!");return[ve]}else{return r}}}}function Ee(e,t){return ce(T(e,function(e){return te(ce(e),t)!=null}))}function Ce(e){const t=re(e,"hx-target");if(t){if(t==="this"){return Ee(e,"hx-target")}else{return fe(e,t)}}else{const n=ie(e);if(n.boosted){return ne().body}else{return e}}}function Re(t){const n=Q.config.attributesToSettle;for(let e=0;e<n.length;e++){if(t===n[e]){return true}}return false}function Oe(t,n){se(t.attributes,function(e){if(!n.hasAttribute(e.name)&&Re(e.name)){t.removeAttribute(e.name)}});se(n.attributes,function(e){if(Re(e.name)){t.setAttribute(e.name,e.value)}})}function He(t,e){const n=jn(e);for(let e=0;e<n.length;e++){const r=n[e];try{if(r.isInlineSwap(t)){return true}}catch(e){w(e)}}return t==="outerHTML"}function Te(e,o,i){let t="#"+ee(o,"id");let s="outerHTML";if(e==="true"){}else if(e.indexOf(":")>0){s=e.substr(0,e.indexOf(":"));t=e.substr(e.indexOf(":")+1,e.length)}else{s=e}const n=ne().querySelectorAll(t);if(n){se(n,function(e){let t;const n=o.cloneNode(true);t=ne().createDocumentFragment();t.appendChild(n);if(!He(s,e)){t=h(n)}const r={shouldSwap:true,target:e,fragment:t};if(!he(e,"htmx:oobBeforeSwap",r))return;e=r.target;if(r.shouldSwap){_e(s,e,e,t,i)}se(i.elts,function(e){he(e,"htmx:oobAfterSwap",r)})});o.parentNode.removeChild(o)}else{o.parentNode.removeChild(o);ae(ne().body,"htmx:oobErrorNoTarget",{content:o})}return e}function qe(e){se(p(e,"[hx-preserve], [data-hx-preserve]"),function(e){const t=te(e,"id");const n=ne().getElementById(t);if(n!=null){e.parentNode.replaceChild(n,e)}})}function Le(l,e,u){se(e.querySelectorAll("[id]"),function(t){const n=ee(t,"id");if(n&&n.length>0){const r=n.replace("'","\\'");const o=t.tagName.replace(":","\\:");const e=h(l);const i=e&&e.querySelector(o+"[id='"+r+"']");if(i&&i!==e){const s=t.cloneNode();Oe(t,i);u.tasks.push(function(){Oe(t,s)})}}})}function Ne(e){return function(){o(e,Q.config.addedClass);Dt(ce(e));Ae(h(e));he(e,"htmx:load")}}function Ae(e){const t="[autofocus]";const n=G(a(e,t)?e:e.querySelector(t));if(n!=null){n.focus()}}function c(e,t,n,r){Le(e,n,r);while(n.childNodes.length>0){const o=n.firstChild;W(ce(o),Q.config.addedClass);e.insertBefore(o,t);if(o.nodeType!==Node.TEXT_NODE&&o.nodeType!==Node.COMMENT_NODE){r.tasks.push(Ne(o))}}}function Ie(e,t){let n=0;while(n<e.length){t=(t<<5)-t+e.charCodeAt(n++)|0}return t}function Pe(t){let n=0;if(t.attributes){for(let e=0;e<t.attributes.length;e++){const r=t.attributes[e];if(r.value){n=Ie(r.name,n);n=Ie(r.value,n)}}}return n}function ke(t){const n=ie(t);if(n.onHandlers){for(let e=0;e<n.onHandlers.length;e++){const r=n.onHandlers[e];we(t,r.event,r.listener)}delete n.onHandlers}}function De(e){const t=ie(e);if(t.timeout){clearTimeout(t.timeout)}if(t.listenerInfos){se(t.listenerInfos,function(e){if(e.on){we(e.on,e.trigger,e.listener)}})}ke(e);se(Object.keys(t),function(e){delete t[e]})}function f(e){he(e,"htmx:beforeCleanupElement");De(e);if(e.children){se(e.children,function(e){f(e)})}}function Me(t,e,n){let r;const o=t.previousSibling;c(u(t),t,e,n);if(o==null){r=u(t).firstChild}else{r=o.nextSibling}n.elts=n.elts.filter(function(e){return e!==t});while(r&&r!==t){if(r instanceof Element){n.elts.push(r);r=r.nextElementSibling}else{r=null}}f(t);if(t instanceof Element){t.remove()}else{t.parentNode.removeChild(t)}}function Xe(e,t,n){return c(e,e.firstChild,t,n)}function Fe(e,t,n){return c(u(e),e,t,n)}function Ue(e,t,n){return c(e,null,t,n)}function Be(e,t,n){return c(u(e),e.nextSibling,t,n)}function je(e){f(e);return u(e).removeChild(e)}function Ve(e,t,n){const r=e.firstChild;c(e,r,t,n);if(r){while(r.nextSibling){f(r.nextSibling);e.removeChild(r.nextSibling)}f(r);e.removeChild(r)}}function _e(t,e,n,r,o){switch(t){case"none":return;case"outerHTML":Me(n,r,o);return;case"afterbegin":Xe(n,r,o);return;case"beforebegin":Fe(n,r,o);return;case"beforeend":Ue(n,r,o);return;case"afterend":Be(n,r,o);return;case"delete":je(n);return;default:var i=jn(e);for(let e=0;e<i.length;e++){const s=i[e];try{const l=s.handleSwap(t,n,r,o);if(l){if(typeof l.length!=="undefined"){for(let e=0;e<l.length;e++){const u=l[e];if(u.nodeType!==Node.TEXT_NODE&&u.nodeType!==Node.COMMENT_NODE){o.tasks.push(Ne(u))}}}return}}catch(e){w(e)}}if(t==="innerHTML"){Ve(n,r,o)}else{_e(Q.config.defaultSwapStyle,e,n,r,o)}}}function $e(e,n){se(p(e,"[hx-swap-oob], [data-hx-swap-oob]"),function(e){if(Q.config.allowNestedOobSwaps||e.parentElement===null){const t=te(e,"hx-swap-oob");if(t!=null){Te(t,e,n)}}else{e.removeAttribute("hx-swap-oob");e.removeAttribute("data-hx-swap-oob")}})}function ze(e,t,r,o){if(!o){o={}}e=y(e);const n=document.activeElement;let i={};try{i={elt:n,start:n?n.selectionStart:null,end:n?n.selectionEnd:null}}catch(e){}const s=xn(e);if(r.swapStyle==="textContent"){e.textContent=t}else{let n=D(t);s.title=n.title;if(o.selectOOB){const u=o.selectOOB.split(",");for(let t=0;t<u.length;t++){const c=u[t].split(":",2);let e=c[0].trim();if(e.indexOf("#")===0){e=e.substring(1)}const f=c[1]||"true";const a=n.querySelector("#"+e);if(a){Te(f,a,s)}}}$e(n,s);se(p(n,"template"),function(e){$e(e.content,s);if(e.content.childElementCount===0){e.remove()}});if(o.select){const h=ne().createDocumentFragment();se(n.querySelectorAll(o.select),function(e){h.appendChild(e)});n=h}qe(n);_e(r.swapStyle,o.contextElement,e,n,s)}if(i.elt&&!le(i.elt)&&ee(i.elt,"id")){const d=document.getElementById(ee(i.elt,"id"));const g={preventScroll:r.focusScroll!==undefined?!r.focusScroll:!Q.config.defaultFocusScroll};if(d){if(i.start&&d.setSelectionRange){try{d.setSelectionRange(i.start,i.end)}catch(e){}}d.focus(g)}}e.classList.remove(Q.config.swappingClass);se(s.elts,function(e){if(e.classList){e.classList.add(Q.config.settlingClass)}he(e,"htmx:afterSwap",o.eventInfo)});if(o.afterSwapCallback){o.afterSwapCallback()}if(!r.ignoreTitle){Dn(s.title)}const l=function(){se(s.tasks,function(e){e.call()});se(s.elts,function(e){if(e.classList){e.classList.remove(Q.config.settlingClass)}he(e,"htmx:afterSettle",o.eventInfo)});if(o.anchor){const e=ce(y("#"+o.anchor));if(e){e.scrollIntoView({block:"start",behavior:"auto"})}}bn(s.elts,r);if(o.afterSettleCallback){o.afterSettleCallback()}};if(r.settleDelay>0){E().setTimeout(l,r.settleDelay)}else{l()}}function Je(e,t,n){const r=e.getResponseHeader(t);if(r.indexOf("{")===0){const o=S(r);for(const i in o){if(o.hasOwnProperty(i)){let e=o[i];if(!X(e)){e={value:e}}he(n,i,e)}}}else{const s=r.split(",");for(let e=0;e<s.length;e++){he(n,s[e].trim(),[])}}}const Ke=/\s/;const x=/[\s,]/;const Ge=/[_$a-zA-Z]/;const Ze=/[_$a-zA-Z0-9]/;const We=['"',"'","/"];const Ye=/[^\s]/;const Qe=/[{(]/;const et=/[})]/;function tt(e){const t=[];let n=0;while(n<e.length){if(Ge.exec(e.charAt(n))){var r=n;while(Ze.exec(e.charAt(n+1))){n++}t.push(e.substr(r,n-r+1))}else if(We.indexOf(e.charAt(n))!==-1){const o=e.charAt(n);var r=n;n++;while(n<e.length&&e.charAt(n)!==o){if(e.charAt(n)==="\\"){n++}n++}t.push(e.substr(r,n-r+1))}else{const i=e.charAt(n);t.push(i)}n++}return t}function nt(e,t,n){return Ge.exec(e.charAt(0))&&e!=="true"&&e!=="false"&&e!=="this"&&e!==n&&t!=="."}function rt(r,o,i){if(o[0]==="["){o.shift();let e=1;let t=" return (function("+i+"){ return (";let n=null;while(o.length>0){const s=o[0];if(s==="]"){e--;if(e===0){if(n===null){t=t+"true"}o.shift();t+=")})";try{const l=vn(r,function(){return Function(t)()},function(){return true});l.source=t;return l}catch(e){ae(ne().body,"htmx:syntax:error",{error:e,source:t});return null}}}else if(s==="["){e++}if(nt(s,n,i)){t+="(("+i+"."+s+") ? ("+i+"."+s+") : (window."+s+"))"}else{t=t+s}n=o.shift()}}}function b(e,t){let n="";while(e.length>0&&!t.test(e[0])){n+=e.shift()}return n}function ot(e){let t;if(e.length>0&&Qe.test(e[0])){e.shift();t=b(e,et).trim();e.shift()}else{t=b(e,x)}return t}const it="input, textarea, select";function st(e,t,n){const r=[];const o=tt(t);do{b(o,Ye);const l=o.length;const u=b(o,/[,\[\s]/);if(u!==""){if(u==="every"){const c={trigger:"every"};b(o,Ye);c.pollInterval=d(b(o,/[,\[\s]/));b(o,Ye);var i=rt(e,o,"event");if(i){c.eventFilter=i}r.push(c)}else{const f={trigger:u};var i=rt(e,o,"event");if(i){f.eventFilter=i}while(o.length>0&&o[0]!==","){b(o,Ye);const a=o.shift();if(a==="changed"){f.changed=true}else if(a==="once"){f.once=true}else if(a==="consume"){f.consume=true}else if(a==="delay"&&o[0]===":"){o.shift();f.delay=d(b(o,x))}else if(a==="from"&&o[0]===":"){o.shift();if(Qe.test(o[0])){var s=ot(o)}else{var s=b(o,x);if(s==="closest"||s==="find"||s==="next"||s==="previous"){o.shift();const h=ot(o);if(h.length>0){s+=" "+h}}}f.from=s}else if(a==="target"&&o[0]===":"){o.shift();f.target=ot(o)}else if(a==="throttle"&&o[0]===":"){o.shift();f.throttle=d(b(o,x))}else if(a==="queue"&&o[0]===":"){o.shift();f.queue=b(o,x)}else if(a==="root"&&o[0]===":"){o.shift();f[a]=ot(o)}else if(a==="threshold"&&o[0]===":"){o.shift();f[a]=b(o,x)}else{ae(e,"htmx:syntax:error",{token:o.shift()})}}r.push(f)}}if(o.length===l){ae(e,"htmx:syntax:error",{token:o.shift()})}b(o,Ye)}while(o[0]===","&&o.shift());if(n){n[t]=r}return r}function lt(e){const t=te(e,"hx-trigger");let n=[];if(t){const r=Q.config.triggerSpecsCache;n=r&&r[t]||st(e,t,r)}if(n.length>0){return n}else if(a(e,"form")){return[{trigger:"submit"}]}else if(a(e,'input[type="button"], input[type="submit"]')){return[{trigger:"click"}]}else if(a(e,it)){return[{trigger:"change"}]}else{return[{trigger:"click"}]}}function ut(e){ie(e).cancelled=true}function ct(e,t,n){const r=ie(e);r.timeout=E().setTimeout(function(){if(le(e)&&r.cancelled!==true){if(!pt(n,e,Xt("hx:poll:trigger",{triggerSpec:n,target:e}))){t(e)}ct(e,t,n)}},n.pollInterval)}function ft(e){return location.hostname===e.hostname&&ee(e,"href")&&ee(e,"href").indexOf("#")!==0}function at(e){return g(e,Q.config.disableSelector)}function ht(t,n,e){if(t instanceof HTMLAnchorElement&&ft(t)&&(t.target===""||t.target==="_self")||t.tagName==="FORM"){n.boosted=true;let r,o;if(t.tagName==="A"){r="get";o=ee(t,"href")}else{const i=ee(t,"method");r=i?i.toLowerCase():"get";if(r==="get"){}o=ee(t,"action")}e.forEach(function(e){mt(t,function(e,t){const n=ce(e);if(at(n)){f(n);return}de(r,o,n,t)},n,e,true)})}}function dt(e,t){const n=ce(t);if(!n){return false}if(e.type==="submit"||e.type==="click"){if(n.tagName==="FORM"){return true}if(a(n,'input[type="submit"], button')&&g(n,"form")!==null){return true}if(n instanceof HTMLAnchorElement&&n.href&&(n.getAttribute("href")==="#"||n.getAttribute("href").indexOf("#")!==0)){return true}}return false}function gt(e,t){return ie(e).boosted&&e instanceof HTMLAnchorElement&&t.type==="click"&&(t.ctrlKey||t.metaKey)}function pt(e,t,n){const r=e.eventFilter;if(r){try{return r.call(t,n)!==true}catch(e){const o=r.source;ae(ne().body,"htmx:eventFilter:error",{error:e,source:o});return true}}return false}function mt(s,l,e,u,c){const f=ie(s);let t;if(u.from){t=m(s,u.from)}else{t=[s]}if(u.changed){t.forEach(function(e){const t=ie(e);t.lastValue=e.value})}se(t,function(o){const i=function(e){if(!le(s)){o.removeEventListener(u.trigger,i);return}if(gt(s,e)){return}if(c||dt(e,s)){e.preventDefault()}if(pt(u,s,e)){return}const t=ie(e);t.triggerSpec=u;if(t.handledFor==null){t.handledFor=[]}if(t.handledFor.indexOf(s)<0){t.handledFor.push(s);if(u.consume){e.stopPropagation()}if(u.target&&e.target){if(!a(ce(e.target),u.target)){return}}if(u.once){if(f.triggeredOnce){return}else{f.triggeredOnce=true}}if(u.changed){const n=ie(o);const r=o.value;if(n.lastValue===r){return}n.lastValue=r}if(f.delayed){clearTimeout(f.delayed)}if(f.throttle){return}if(u.throttle>0){if(!f.throttle){l(s,e);f.throttle=E().setTimeout(function(){f.throttle=null},u.throttle)}}else if(u.delay>0){f.delayed=E().setTimeout(function(){l(s,e)},u.delay)}else{he(s,"htmx:trigger");l(s,e)}}};if(e.listenerInfos==null){e.listenerInfos=[]}e.listenerInfos.push({trigger:u.trigger,listener:i,on:o});o.addEventListener(u.trigger,i)})}let yt=false;let xt=null;function bt(){if(!xt){xt=function(){yt=true};window.addEventListener("scroll",xt);setInterval(function(){if(yt){yt=false;se(ne().querySelectorAll("[hx-trigger*='revealed'],[data-hx-trigger*='revealed']"),function(e){wt(e)})}},200)}}function wt(e){if(!s(e,"data-hx-revealed")&&U(e)){e.setAttribute("data-hx-revealed","true");const t=ie(e);if(t.initHash){he(e,"revealed")}else{e.addEventListener("htmx:afterProcessNode",function(){he(e,"revealed")},{once:true})}}}function vt(e,t,n,r){const o=function(){if(!n.loaded){n.loaded=true;t(e)}};if(r>0){E().setTimeout(o,r)}else{o()}}function St(t,n,e){let i=false;se(v,function(r){if(s(t,"hx-"+r)){const o=te(t,"hx-"+r);i=true;n.path=o;n.verb=r;e.forEach(function(e){Et(t,e,n,function(e,t){const n=ce(e);if(g(n,Q.config.disableSelector)){f(n);return}de(r,o,n,t)})})}});return i}function Et(r,e,t,n){if(e.trigger==="revealed"){bt();mt(r,n,t,e);wt(ce(r))}else if(e.trigger==="intersect"){const o={};if(e.root){o.root=fe(r,e.root)}if(e.threshold){o.threshold=parseFloat(e.threshold)}const i=new IntersectionObserver(function(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.isIntersecting){he(r,"intersect");break}}},o);i.observe(ce(r));mt(ce(r),n,t,e)}else if(e.trigger==="load"){if(!pt(e,r,Xt("load",{elt:r}))){vt(ce(r),n,t,e.delay)}}else if(e.pollInterval>0){t.polling=true;ct(ce(r),n,e)}else{mt(r,n,t,e)}}function Ct(e){const t=ce(e);if(!t){return false}const n=t.attributes;for(let e=0;e<n.length;e++){const r=n[e].name;if(l(r,"hx-on:")||l(r,"data-hx-on:")||l(r,"hx-on-")||l(r,"data-hx-on-")){return true}}return false}const Rt=(new XPathEvaluator).createExpression('.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or'+' starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]');function Ot(e,t){if(Ct(e)){t.push(ce(e))}const n=Rt.evaluate(e);let r=null;while(r=n.iterateNext())t.push(ce(r))}function Ht(e){const t=[];if(e instanceof DocumentFragment){for(const n of e.childNodes){Ot(n,t)}}else{Ot(e,t)}return t}function Tt(e){if(e.querySelectorAll){const n=", [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]";const r=[];for(const i in Xn){const s=Xn[i];if(s.getSelectors){var t=s.getSelectors();if(t){r.push(t)}}}const o=e.querySelectorAll(R+n+", form, [type='submit'],"+" [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger]"+r.flat().map(e=>", "+e).join(""));return o}else{return[]}}function qt(e){const t=g(ce(e.target),"button, input[type='submit']");const n=Nt(e);if(n){n.lastButtonClicked=t}}function Lt(e){const t=Nt(e);if(t){t.lastButtonClicked=null}}function Nt(e){const t=g(ce(e.target),"button, input[type='submit']");if(!t){return}const n=y("#"+ee(t,"form"),t.getRootNode())||g(t,"form");if(!n){return}return ie(n)}function At(e){e.addEventListener("click",qt);e.addEventListener("focusin",qt);e.addEventListener("focusout",Lt)}function It(t,e,n){const r=ie(t);if(!Array.isArray(r.onHandlers)){r.onHandlers=[]}let o;const i=function(e){vn(t,function(){if(at(t)){return}if(!o){o=new Function("event",n)}o.call(t,e)})};t.addEventListener(e,i);r.onHandlers.push({event:e,listener:i})}function Pt(t){ke(t);for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;const r=t.attributes[e].value;if(l(n,"hx-on")||l(n,"data-hx-on")){const o=n.indexOf("-on")+3;const i=n.slice(o,o+1);if(i==="-"||i===":"){let e=n.slice(o+1);if(l(e,":")){e="htmx"+e}else if(l(e,"-")){e="htmx:"+e.slice(1)}else if(l(e,"htmx-")){e="htmx:"+e.slice(5)}It(t,e,r)}}}}function kt(t){if(g(t,Q.config.disableSelector)){f(t);return}const n=ie(t);if(n.initHash!==Pe(t)){De(t);n.initHash=Pe(t);he(t,"htmx:beforeProcessNode");if(t.value){n.lastValue=t.value}const e=lt(t);const r=St(t,n,e);if(!r){if(re(t,"hx-boost")==="true"){ht(t,n,e)}else if(s(t,"hx-trigger")){e.forEach(function(e){Et(t,e,n,function(){})})}}if(t.tagName==="FORM"||ee(t,"type")==="submit"&&s(t,"form")){At(t)}he(t,"htmx:afterProcessNode")}}function Dt(e){e=y(e);if(g(e,Q.config.disableSelector)){f(e);return}kt(e);se(Tt(e),function(e){kt(e)});se(Ht(e),Pt)}function Mt(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Xt(e,t){let n;if(window.CustomEvent&&typeof window.CustomEvent==="function"){n=new CustomEvent(e,{bubbles:true,cancelable:true,composed:true,detail:t})}else{n=ne().createEvent("CustomEvent");n.initCustomEvent(e,true,true,t)}return n}function ae(e,t,n){he(e,t,ue({error:t},n))}function Ft(e){return e==="htmx:afterProcessNode"}function Ut(e,t){se(jn(e),function(e){try{t(e)}catch(e){w(e)}})}function w(e){if(console.error){console.error(e)}else if(console.log){console.log("ERROR: ",e)}}function he(e,t,n){e=y(e);if(n==null){n={}}n.elt=e;const r=Xt(t,n);if(Q.logger&&!Ft(t)){Q.logger(e,t,n)}if(n.error){w(n.error);he(e,"htmx:error",{errorInfo:n})}let o=e.dispatchEvent(r);const i=Mt(t);if(o&&i!==t){const s=Xt(i,r.detail);o=o&&e.dispatchEvent(s)}Ut(ce(e),function(e){o=o&&(e.onEvent(t,r)!==false&&!r.defaultPrevented)});return o}let Bt=location.pathname+location.search;function jt(){const e=ne().querySelector("[hx-history-elt],[data-hx-history-elt]");return e||ne().body}function Vt(t,e){if(!j()){return}const n=$t(e);const r=ne().title;const o=window.scrollY;if(Q.config.historyCacheSize<=0){localStorage.removeItem("htmx-history-cache");return}t=V(t);const i=S(localStorage.getItem("htmx-history-cache"))||[];for(let e=0;e<i.length;e++){if(i[e].url===t){i.splice(e,1);break}}const s={url:t,content:n,title:r,scroll:o};he(ne().body,"htmx:historyItemCreated",{item:s,cache:i});i.push(s);while(i.length>Q.config.historyCacheSize){i.shift()}while(i.length>0){try{localStorage.setItem("htmx-history-cache",JSON.stringify(i));break}catch(e){ae(ne().body,"htmx:historyCacheError",{cause:e,cache:i});i.shift()}}}function _t(t){if(!j()){return null}t=V(t);const n=S(localStorage.getItem("htmx-history-cache"))||[];for(let e=0;e<n.length;e++){if(n[e].url===t){return n[e]}}return null}function $t(e){const t=Q.config.requestClass;const n=e.cloneNode(true);se(p(n,"."+t),function(e){o(e,t)});return n.innerHTML}function zt(){const e=jt();const t=Bt||location.pathname+location.search;let n;try{n=ne().querySelector('[hx-history="false" i],[data-hx-history="false" i]')}catch(e){n=ne().querySelector('[hx-history="false"],[data-hx-history="false"]')}if(!n){he(ne().body,"htmx:beforeHistorySave",{path:t,historyElt:e});Vt(t,e)}if(Q.config.historyEnabled)history.replaceState({htmx:true},ne().title,window.location.href)}function Jt(e){if(Q.config.getCacheBusterParam){e=e.replace(/org\.htmx\.cache-buster=[^&]*&?/,"");if(pe(e,"&")||pe(e,"?")){e=e.slice(0,-1)}}if(Q.config.historyEnabled){history.pushState({htmx:true},"",e)}Bt=e}function Kt(e){if(Q.config.historyEnabled)history.replaceState({htmx:true},"",e);Bt=e}function Gt(e){se(e,function(e){e.call(undefined)})}function Zt(o){const e=new XMLHttpRequest;const i={path:o,xhr:e};he(ne().body,"htmx:historyCacheMiss",i);e.open("GET",o,true);e.setRequestHeader("HX-Request","true");e.setRequestHeader("HX-History-Restore-Request","true");e.setRequestHeader("HX-Current-URL",ne().location.href);e.onload=function(){if(this.status>=200&&this.status<400){he(ne().body,"htmx:historyCacheMissLoad",i);const e=D(this.response);const t=e.querySelector("[hx-history-elt],[data-hx-history-elt]")||e;const n=jt();const r=xn(n);Dn(e.title);Ve(n,t,r);Gt(r.tasks);Bt=o;he(ne().body,"htmx:historyRestore",{path:o,cacheMiss:true,serverResponse:this.response})}else{ae(ne().body,"htmx:historyCacheMissLoadError",i)}};e.send()}function Wt(e){zt();e=e||location.pathname+location.search;const t=_t(e);if(t){const n=D(t.content);const r=jt();const o=xn(r);Dn(n.title);Ve(r,n,o);Gt(o.tasks);E().setTimeout(function(){window.scrollTo(0,t.scroll)},0);Bt=e;he(ne().body,"htmx:historyRestore",{path:e,item:t})}else{if(Q.config.refreshOnHistoryMiss){window.location.reload(true)}else{Zt(e)}}}function Yt(e){let t=Se(e,"hx-indicator");if(t==null){t=[e]}se(t,function(e){const t=ie(e);t.requestCount=(t.requestCount||0)+1;e.classList.add.call(e.classList,Q.config.requestClass)});return t}function Qt(e){let t=Se(e,"hx-disabled-elt");if(t==null){t=[]}se(t,function(e){const t=ie(e);t.requestCount=(t.requestCount||0)+1;e.setAttribute("disabled","")});return t}function en(e,t){se(e,function(e){const t=ie(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.classList.remove.call(e.classList,Q.config.requestClass)}});se(t,function(e){const t=ie(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.removeAttribute("disabled")}})}function tn(t,n){for(let e=0;e<t.length;e++){const r=t[e];if(r.isSameNode(n)){return true}}return false}function nn(e){const t=e;if(t.name===""||t.name==null||t.disabled||g(t,"fieldset[disabled]")){return false}if(t.type==="button"||t.type==="submit"||t.tagName==="image"||t.tagName==="reset"||t.tagName==="file"){return false}if(t.type==="checkbox"||t.type==="radio"){return t.checked}return true}function rn(t,e,n){if(t!=null&&e!=null){if(Array.isArray(e)){e.forEach(function(e){n.append(t,e)})}else{n.append(t,e)}}}function on(t,n,r){if(t!=null&&n!=null){let e=r.getAll(t);if(Array.isArray(n)){e=e.filter(e=>n.indexOf(e)<0)}else{e=e.filter(e=>e!==n)}r.delete(t);se(e,e=>r.append(t,e))}}function sn(t,n,r,o,i){if(o==null||tn(t,o)){return}else{t.push(o)}if(nn(o)){const s=ee(o,"name");let e=o.value;if(o instanceof HTMLSelectElement&&o.multiple){e=F(o.querySelectorAll("option:checked")).map(function(e){return e.value})}if(o instanceof HTMLInputElement&&o.files){e=F(o.files)}rn(s,e,n);if(i){ln(o,r)}}if(o instanceof HTMLFormElement){se(o.elements,function(e){if(t.indexOf(e)>=0){on(e.name,e.value,n)}else{t.push(e)}if(i){ln(e,r)}});new FormData(o).forEach(function(e,t){if(e instanceof File&&e.name===""){return}rn(t,e,n)})}}function ln(e,t){const n=e;if(n.willValidate){he(n,"htmx:validation:validate");if(!n.checkValidity()){t.push({elt:n,message:n.validationMessage,validity:n.validity});he(n,"htmx:validation:failed",{message:n.validationMessage,validity:n.validity})}}}function un(t,e){for(const n of e.keys()){t.delete(n);e.getAll(n).forEach(function(e){t.append(n,e)})}return t}function cn(e,t){const n=[];const r=new FormData;const o=new FormData;const i=[];const s=ie(e);if(s.lastButtonClicked&&!le(s.lastButtonClicked)){s.lastButtonClicked=null}let l=e instanceof HTMLFormElement&&e.noValidate!==true||te(e,"hx-validate")==="true";if(s.lastButtonClicked){l=l&&s.lastButtonClicked.formNoValidate!==true}if(t!=="get"){sn(n,o,i,g(e,"form"),l)}sn(n,r,i,e,l);if(s.lastButtonClicked||e.tagName==="BUTTON"||e.tagName==="INPUT"&&ee(e,"type")==="submit"){const c=s.lastButtonClicked||e;const f=ee(c,"name");rn(f,c.value,o)}const u=Se(e,"hx-include");se(u,function(e){sn(n,r,i,ce(e),l);if(!a(e,"form")){se(h(e).querySelectorAll(it),function(e){sn(n,r,i,e,l)})}});un(r,o);return{errors:i,formData:r,values:An(r)}}function fn(e,t,n){if(e!==""){e+="&"}if(String(n)==="[object Object]"){n=JSON.stringify(n)}const r=encodeURIComponent(n);e+=encodeURIComponent(t)+"="+r;return e}function an(e){e=Ln(e);let n="";e.forEach(function(e,t){n=fn(n,t,e)});return n}function hn(e,t,n){const r={"HX-Request":"true","HX-Trigger":ee(e,"id"),"HX-Trigger-Name":ee(e,"name"),"HX-Target":te(t,"id"),"HX-Current-URL":ne().location.href};wn(e,"hx-headers",false,r);if(n!==undefined){r["HX-Prompt"]=n}if(ie(e).boosted){r["HX-Boosted"]="true"}return r}function dn(n,e){const t=re(e,"hx-params");if(t){if(t==="none"){return new FormData}else if(t==="*"){return n}else if(t.indexOf("not ")===0){se(t.substr(4).split(","),function(e){e=e.trim();n.delete(e)});return n}else{const r=new FormData;se(t.split(","),function(t){t=t.trim();if(n.has(t)){n.getAll(t).forEach(function(e){r.append(t,e)})}});return r}}else{return n}}function gn(e){return!!ee(e,"href")&&ee(e,"href").indexOf("#")>=0}function pn(e,t){const n=t||re(e,"hx-swap");const r={swapStyle:ie(e).boosted?"innerHTML":Q.config.defaultSwapStyle,swapDelay:Q.config.defaultSwapDelay,settleDelay:Q.config.defaultSettleDelay};if(Q.config.scrollIntoViewOnBoost&&ie(e).boosted&&!gn(e)){r.show="top"}if(n){const s=B(n);if(s.length>0){for(let e=0;e<s.length;e++){const l=s[e];if(l.indexOf("swap:")===0){r.swapDelay=d(l.substr(5))}else if(l.indexOf("settle:")===0){r.settleDelay=d(l.substr(7))}else if(l.indexOf("transition:")===0){r.transition=l.substr(11)==="true"}else if(l.indexOf("ignoreTitle:")===0){r.ignoreTitle=l.substr(12)==="true"}else if(l.indexOf("scroll:")===0){const u=l.substr(7);var o=u.split(":");const c=o.pop();var i=o.length>0?o.join(":"):null;r.scroll=c;r.scrollTarget=i}else if(l.indexOf("show:")===0){const f=l.substr(5);var o=f.split(":");const a=o.pop();var i=o.length>0?o.join(":"):null;r.show=a;r.showTarget=i}else if(l.indexOf("focus-scroll:")===0){const h=l.substr("focus-scroll:".length);r.focusScroll=h=="true"}else if(e==0){r.swapStyle=l}else{w("Unknown modifier in hx-swap: "+l)}}}}return r}function mn(e){return re(e,"hx-encoding")==="multipart/form-data"||a(e,"form")&&ee(e,"enctype")==="multipart/form-data"}function yn(t,n,r){let o=null;Ut(n,function(e){if(o==null){o=e.encodeParameters(t,r,n)}});if(o!=null){return o}else{if(mn(n)){return un(new FormData,Ln(r))}else{return an(r)}}}function xn(e){return{tasks:[],elts:[e]}}function bn(e,t){const n=e[0];const r=e[e.length-1];if(t.scroll){var o=null;if(t.scrollTarget){o=ce(fe(n,t.scrollTarget))}if(t.scroll==="top"&&(n||o)){o=o||n;o.scrollTop=0}if(t.scroll==="bottom"&&(r||o)){o=o||r;o.scrollTop=o.scrollHeight}}if(t.show){var o=null;if(t.showTarget){let e=t.showTarget;if(t.showTarget==="window"){e="body"}o=ce(fe(n,e))}if(t.show==="top"&&(n||o)){o=o||n;o.scrollIntoView({block:"start",behavior:Q.config.scrollBehavior})}if(t.show==="bottom"&&(r||o)){o=o||r;o.scrollIntoView({block:"end",behavior:Q.config.scrollBehavior})}}}function wn(r,e,o,i){if(i==null){i={}}if(r==null){return i}const s=te(r,e);if(s){let e=s.trim();let t=o;if(e==="unset"){return null}if(e.indexOf("javascript:")===0){e=e.substr(11);t=true}else if(e.indexOf("js:")===0){e=e.substr(3);t=true}if(e.indexOf("{")!==0){e="{"+e+"}"}let n;if(t){n=vn(r,function(){return Function("return ("+e+")")()},{})}else{n=S(e)}for(const l in n){if(n.hasOwnProperty(l)){if(i[l]==null){i[l]=n[l]}}}}return wn(ce(u(r)),e,o,i)}function vn(e,t,n){if(Q.config.allowEval){return t()}else{ae(e,"htmx:evalDisallowedError");return n}}function Sn(e,t){return wn(e,"hx-vars",true,t)}function En(e,t){return wn(e,"hx-vals",false,t)}function Cn(e){return ue(Sn(e),En(e))}function Rn(t,n,r){if(r!==null){try{t.setRequestHeader(n,r)}catch(e){t.setRequestHeader(n,encodeURIComponent(r));t.setRequestHeader(n+"-URI-AutoEncoded","true")}}}function On(t){if(t.responseURL&&typeof URL!=="undefined"){try{const e=new URL(t.responseURL);return e.pathname+e.search}catch(e){ae(ne().body,"htmx:badResponseUrl",{url:t.responseURL})}}}function C(e,t){return t.test(e.getAllResponseHeaders())}function Hn(e,t,n){e=e.toLowerCase();if(n){if(n instanceof Element||typeof n==="string"){return de(e,t,null,null,{targetOverride:y(n),returnPromise:true})}else{return de(e,t,y(n.source),n.event,{handler:n.handler,headers:n.headers,values:n.values,targetOverride:y(n.target),swapOverride:n.swap,select:n.select,returnPromise:true})}}else{return de(e,t,null,null,{returnPromise:true})}}function Tn(e){const t=[];while(e){t.push(e);e=e.parentElement}return t}function qn(e,t,n){let r;let o;if(typeof URL==="function"){o=new URL(t,document.location.href);const i=document.location.origin;r=i===o.origin}else{o=t;r=l(t,document.location.origin)}if(Q.config.selfRequestsOnly){if(!r){return false}}return he(e,"htmx:validateUrl",ue({url:o,sameHost:r},n))}function Ln(e){if(e instanceof FormData)return e;const t=new FormData;for(const n in e){if(e.hasOwnProperty(n)){if(typeof e[n].forEach==="function"){e[n].forEach(function(e){t.append(n,e)})}else if(typeof e[n]==="object"){t.append(n,JSON.stringify(e[n]))}else{t.append(n,e[n])}}}return t}function Nn(r,o,e){return new Proxy(e,{get:function(t,e){if(typeof e==="number")return t[e];if(e==="length")return t.length;if(e==="push"){return function(e){t.push(e);r.append(o,e)}}if(typeof t[e]==="function"){return function(){t[e].apply(t,arguments);r.delete(o);t.forEach(function(e){r.append(o,e)})}}if(t[e]&&t[e].length===1){return t[e][0]}else{return t[e]}},set:function(e,t,n){e[t]=n;r.delete(o);e.forEach(function(e){r.append(o,e)});return true}})}function An(r){return new Proxy(r,{get:function(e,t){if(typeof t==="symbol"){return Reflect.get(e,t)}if(t==="toJSON"){return()=>Object.fromEntries(r)}if(t in e){if(typeof e[t]==="function"){return function(){return r[t].apply(r,arguments)}}else{return e[t]}}const n=r.getAll(t);if(n.length===0){return undefined}else if(n.length===1){return n[0]}else{return Nn(e,t,n)}},set:function(t,n,e){if(typeof n!=="string"){return false}t.delete(n);if(typeof e.forEach==="function"){e.forEach(function(e){t.append(n,e)})}else{t.append(n,e)}return true},deleteProperty:function(e,t){if(typeof t==="string"){e.delete(t)}return true},ownKeys:function(e){return Reflect.ownKeys(Object.fromEntries(e))},getOwnPropertyDescriptor:function(e,t){return Reflect.getOwnPropertyDescriptor(Object.fromEntries(e),t)}})}function de(t,n,r,o,i,D){let s=null;let l=null;i=i!=null?i:{};if(i.returnPromise&&typeof Promise!=="undefined"){var e=new Promise(function(e,t){s=e;l=t})}if(r==null){r=ne().body}const M=i.handler||Mn;const X=i.select||null;if(!le(r)){oe(s);return e}const u=i.targetOverride||ce(Ce(r));if(u==null||u==ve){ae(r,"htmx:targetError",{target:te(r,"hx-target")});oe(l);return e}let c=ie(r);const f=c.lastButtonClicked;if(f){const L=ee(f,"formaction");if(L!=null){n=L}const N=ee(f,"formmethod");if(N!=null){if(N.toLowerCase()!=="dialog"){t=N}}}const a=re(r,"hx-confirm");if(D===undefined){const K=function(e){return de(t,n,r,o,i,!!e)};const G={target:u,elt:r,path:n,verb:t,triggeringEvent:o,etc:i,issueRequest:K,question:a};if(he(r,"htmx:confirm",G)===false){oe(s);return e}}let h=r;let d=re(r,"hx-sync");let g=null;let F=false;if(d){const A=d.split(":");const I=A[0].trim();if(I==="this"){h=Ee(r,"hx-sync")}else{h=ce(fe(r,I))}d=(A[1]||"drop").trim();c=ie(h);if(d==="drop"&&c.xhr&&c.abortable!==true){oe(s);return e}else if(d==="abort"){if(c.xhr){oe(s);return e}else{F=true}}else if(d==="replace"){he(h,"htmx:abort")}else if(d.indexOf("queue")===0){const Z=d.split(" ");g=(Z[1]||"last").trim()}}if(c.xhr){if(c.abortable){he(h,"htmx:abort")}else{if(g==null){if(o){const P=ie(o);if(P&&P.triggerSpec&&P.triggerSpec.queue){g=P.triggerSpec.queue}}if(g==null){g="last"}}if(c.queuedRequests==null){c.queuedRequests=[]}if(g==="first"&&c.queuedRequests.length===0){c.queuedRequests.push(function(){de(t,n,r,o,i)})}else if(g==="all"){c.queuedRequests.push(function(){de(t,n,r,o,i)})}else if(g==="last"){c.queuedRequests=[];c.queuedRequests.push(function(){de(t,n,r,o,i)})}oe(s);return e}}const p=new XMLHttpRequest;c.xhr=p;c.abortable=F;const m=function(){c.xhr=null;c.abortable=false;if(c.queuedRequests!=null&&c.queuedRequests.length>0){const e=c.queuedRequests.shift();e()}};const U=re(r,"hx-prompt");if(U){var y=prompt(U);if(y===null||!he(r,"htmx:prompt",{prompt:y,target:u})){oe(s);m();return e}}if(a&&!D){if(!confirm(a)){oe(s);m();return e}}let x=hn(r,u,y);if(t!=="get"&&!mn(r)){x["Content-Type"]="application/x-www-form-urlencoded"}if(i.headers){x=ue(x,i.headers)}const B=cn(r,t);let b=B.errors;const j=B.formData;if(i.values){un(j,Ln(i.values))}const V=Ln(Cn(r));const w=un(j,V);let v=dn(w,r);if(Q.config.getCacheBusterParam&&t==="get"){v.set("org.htmx.cache-buster",ee(u,"id")||"true")}if(n==null||n===""){n=ne().location.href}const S=wn(r,"hx-request");const _=ie(r).boosted;let E=Q.config.methodsThatUseUrlParams.indexOf(t)>=0;const C={boosted:_,useUrlParams:E,formData:v,parameters:An(v),unfilteredFormData:w,unfilteredParameters:An(w),headers:x,target:u,verb:t,errors:b,withCredentials:i.credentials||S.credentials||Q.config.withCredentials,timeout:i.timeout||S.timeout||Q.config.timeout,path:n,triggeringEvent:o};if(!he(r,"htmx:configRequest",C)){oe(s);m();return e}n=C.path;t=C.verb;x=C.headers;v=Ln(C.parameters);b=C.errors;E=C.useUrlParams;if(b&&b.length>0){he(r,"htmx:validation:halted",C);oe(s);m();return e}const $=n.split("#");const z=$[0];const R=$[1];let O=n;if(E){O=z;const W=!v.keys().next().done;if(W){if(O.indexOf("?")<0){O+="?"}else{O+="&"}O+=an(v);if(R){O+="#"+R}}}if(!qn(r,O,C)){ae(r,"htmx:invalidPath",C);oe(l);return e}p.open(t.toUpperCase(),O,true);p.overrideMimeType("text/html");p.withCredentials=C.withCredentials;p.timeout=C.timeout;if(S.noHeaders){}else{for(const k in x){if(x.hasOwnProperty(k)){const Y=x[k];Rn(p,k,Y)}}}const H={xhr:p,target:u,requestConfig:C,etc:i,boosted:_,select:X,pathInfo:{requestPath:n,finalRequestPath:O,responsePath:null,anchor:R}};p.onload=function(){try{const t=Tn(r);H.pathInfo.responsePath=On(p);M(r,H);en(T,q);he(r,"htmx:afterRequest",H);he(r,"htmx:afterOnLoad",H);if(!le(r)){let e=null;while(t.length>0&&e==null){const n=t.shift();if(le(n)){e=n}}if(e){he(e,"htmx:afterRequest",H);he(e,"htmx:afterOnLoad",H)}}oe(s);m()}catch(e){ae(r,"htmx:onLoadError",ue({error:e},H));throw e}};p.onerror=function(){en(T,q);ae(r,"htmx:afterRequest",H);ae(r,"htmx:sendError",H);oe(l);m()};p.onabort=function(){en(T,q);ae(r,"htmx:afterRequest",H);ae(r,"htmx:sendAbort",H);oe(l);m()};p.ontimeout=function(){en(T,q);ae(r,"htmx:afterRequest",H);ae(r,"htmx:timeout",H);oe(l);m()};if(!he(r,"htmx:beforeRequest",H)){oe(s);m();return e}var T=Yt(r);var q=Qt(r);se(["loadstart","loadend","progress","abort"],function(t){se([p,p.upload],function(e){e.addEventListener(t,function(e){he(r,"htmx:xhr:"+t,{lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total})})})});he(r,"htmx:beforeSend",H);const J=E?null:yn(p,r,v);p.send(J);return e}function In(e,t){const n=t.xhr;let r=null;let o=null;if(C(n,/HX-Push:/i)){r=n.getResponseHeader("HX-Push");o="push"}else if(C(n,/HX-Push-Url:/i)){r=n.getResponseHeader("HX-Push-Url");o="push"}else if(C(n,/HX-Replace-Url:/i)){r=n.getResponseHeader("HX-Replace-Url");o="replace"}if(r){if(r==="false"){return{}}else{return{type:o,path:r}}}const i=t.pathInfo.finalRequestPath;const s=t.pathInfo.responsePath;const l=re(e,"hx-push-url");const u=re(e,"hx-replace-url");const c=ie(e).boosted;let f=null;let a=null;if(l){f="push";a=l}else if(u){f="replace";a=u}else if(c){f="push";a=s||i}if(a){if(a==="false"){return{}}if(a==="true"){a=s||i}if(t.pathInfo.anchor&&a.indexOf("#")===-1){a=a+"#"+t.pathInfo.anchor}return{type:f,path:a}}else{return{}}}function Pn(e,t){var n=new RegExp(e.code);return n.test(t.toString(10))}function kn(e){for(var t=0;t<Q.config.responseHandling.length;t++){var n=Q.config.responseHandling[t];if(Pn(n,e.status)){return n}}return{swap:false}}function Dn(e){if(e){const t=r("title");if(t){t.innerHTML=e}else{window.document.title=e}}}function Mn(o,i){const s=i.xhr;let l=i.target;const e=i.etc;const u=i.select;if(!he(o,"htmx:beforeOnLoad",i))return;if(C(s,/HX-Trigger:/i)){Je(s,"HX-Trigger",o)}if(C(s,/HX-Location:/i)){zt();let e=s.getResponseHeader("HX-Location");var t;if(e.indexOf("{")===0){t=S(e);e=t.path;delete t.path}Hn("get",e,t).then(function(){Jt(e)});return}const n=C(s,/HX-Refresh:/i)&&s.getResponseHeader("HX-Refresh")==="true";if(C(s,/HX-Redirect:/i)){location.href=s.getResponseHeader("HX-Redirect");n&&location.reload();return}if(n){location.reload();return}if(C(s,/HX-Retarget:/i)){if(s.getResponseHeader("HX-Retarget")==="this"){i.target=o}else{i.target=ce(fe(o,s.getResponseHeader("HX-Retarget")))}}const c=In(o,i);const r=kn(s);const f=r.swap;let a=!!r.error;let h=Q.config.ignoreTitle||r.ignoreTitle;let d=r.select;if(r.target){i.target=ce(fe(o,r.target))}var g=e.swapOverride;if(g==null&&r.swapOverride){g=r.swapOverride}if(C(s,/HX-Retarget:/i)){if(s.getResponseHeader("HX-Retarget")==="this"){i.target=o}else{i.target=ce(fe(o,s.getResponseHeader("HX-Retarget")))}}if(C(s,/HX-Reswap:/i)){g=s.getResponseHeader("HX-Reswap")}var p=s.response;var m=ue({shouldSwap:f,serverResponse:p,isError:a,ignoreTitle:h,selectOverride:d},i);if(r.event&&!he(l,r.event,m))return;if(!he(l,"htmx:beforeSwap",m))return;l=m.target;p=m.serverResponse;a=m.isError;h=m.ignoreTitle;d=m.selectOverride;i.target=l;i.failed=a;i.successful=!a;if(m.shouldSwap){if(s.status===286){ut(o)}Ut(o,function(e){p=e.transformResponse(p,s,o)});if(c.type){zt()}if(C(s,/HX-Reswap:/i)){g=s.getResponseHeader("HX-Reswap")}var y=pn(o,g);if(!y.hasOwnProperty("ignoreTitle")){y.ignoreTitle=h}l.classList.add(Q.config.swappingClass);let n=null;let r=null;if(u){d=u}if(C(s,/HX-Reselect:/i)){d=s.getResponseHeader("HX-Reselect")}const x=re(o,"hx-select-oob");const b=re(o,"hx-select");let e=function(){try{if(c.type){he(ne().body,"htmx:beforeHistoryUpdate",ue({history:c},i));if(c.type==="push"){Jt(c.path);he(ne().body,"htmx:pushedIntoHistory",{path:c.path})}else{Kt(c.path);he(ne().body,"htmx:replacedInHistory",{path:c.path})}}ze(l,p,y,{select:d||b,selectOOB:x,eventInfo:i,anchor:i.pathInfo.anchor,contextElement:o,afterSwapCallback:function(){if(C(s,/HX-Trigger-After-Swap:/i)){let e=o;if(!le(o)){e=ne().body}Je(s,"HX-Trigger-After-Swap",e)}},afterSettleCallback:function(){if(C(s,/HX-Trigger-After-Settle:/i)){let e=o;if(!le(o)){e=ne().body}Je(s,"HX-Trigger-After-Settle",e)}oe(n)}})}catch(e){ae(o,"htmx:swapError",i);oe(r);throw e}};let t=Q.config.globalViewTransitions;if(y.hasOwnProperty("transition")){t=y.transition}if(t&&he(o,"htmx:beforeTransition",i)&&typeof Promise!=="undefined"&&document.startViewTransition){const w=new Promise(function(e,t){n=e;r=t});const v=e;e=function(){document.startViewTransition(function(){v();return w})}}if(y.swapDelay>0){E().setTimeout(e,y.swapDelay)}else{e()}}if(a){ae(o,"htmx:responseError",ue({error:"Response Status Error Code "+s.status+" from "+i.pathInfo.requestPath},i))}}const Xn={};function Fn(){return{init:function(e){return null},getSelectors:function(){return null},onEvent:function(e,t){return true},transformResponse:function(e,t,n){return e},isInlineSwap:function(e){return false},handleSwap:function(e,t,n,r){return false},encodeParameters:function(e,t,n){return null}}}function Un(e,t){if(t.init){t.init(n)}Xn[e]=ue(Fn(),t)}function Bn(e){delete Xn[e]}function jn(e,n,r){if(n==undefined){n=[]}if(e==undefined){return n}if(r==undefined){r=[]}const t=te(e,"hx-ext");if(t){se(t.split(","),function(e){e=e.replace(/ /g,"");if(e.slice(0,7)=="ignore:"){r.push(e.slice(7));return}if(r.indexOf(e)<0){const t=Xn[e];if(t&&n.indexOf(t)<0){n.push(t)}}})}return jn(ce(u(e)),n,r)}var Vn=false;ne().addEventListener("DOMContentLoaded",function(){Vn=true});function _n(e){if(Vn||ne().readyState==="complete"){e()}else{ne().addEventListener("DOMContentLoaded",e)}}function $n(){if(Q.config.includeIndicatorStyles!==false){const e=Q.config.inlineStyleNonce?` nonce="${Q.config.inlineStyleNonce}"`:"";ne().head.insertAdjacentHTML("beforeend","<style"+e+"> ."+Q.config.indicatorClass+"{opacity:0} ."+Q.config.requestClass+" ."+Q.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;} ."+Q.config.requestClass+"."+Q.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;} </style>")}}function zn(){const e=ne().querySelector('meta[name="htmx-config"]');if(e){return S(e.content)}else{return null}}function Jn(){const e=zn();if(e){Q.config=ue(Q.config,e)}}_n(function(){Jn();$n();let e=ne().body;Dt(e);const t=ne().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(e){const t=e.target;const n=ie(t);if(n&&n.xhr){n.xhr.abort()}});const n=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(e){if(e.state&&e.state.htmx){Wt();se(t,function(e){he(e,"htmx:restored",{document:ne(),triggerEvent:he})})}else{if(n){n(e)}}};E().setTimeout(function(){he(e,"htmx:load",{});e=null},0)});return Q}();
+84 -79
public/style/main.css
··· 4 4 @import url("/style/prideflag.css"); 5 5 6 6 @font-face { 7 - font-family: "Monaspace Argon"; 8 - src: url("/font/monaspace-argon/MonaspaceArgonVarVF[wght,wdth,slnt].woff2") format("woff2-variations"); 9 - font-weight: 125 950; 10 - font-stretch: 75% 125%; 11 - font-style: oblique 0deg 20deg; 7 + font-family: "Monaspace Argon"; 8 + src: url("/font/monaspace-argon/MonaspaceArgonVarVF[wght,wdth,slnt].woff2") format("woff2-variations"); 9 + font-weight: 125 950; 10 + font-stretch: 75% 125%; 11 + font-style: oblique 0deg 20deg; 12 12 } 13 13 14 14 body { 15 - margin: 0; 16 - padding: 0; 17 - background: #080808; 18 - color: #eee; 19 - font-family: "Monaspace Argon", monospace; 20 - font-size: 18px; 21 - text-shadow: 0 0 3em; 22 - scroll-behavior: smooth; 15 + margin: 0; 16 + padding: 0; 17 + background: #080808; 18 + color: #eee; 19 + font-family: "Monaspace Argon", monospace; 20 + font-size: 18px; 21 + text-shadow: 0 0 3em; 22 + scroll-behavior: smooth; 23 23 } 24 24 25 25 main { 26 26 } 27 27 28 28 a { 29 - color: var(--links); 30 - text-decoration: none; 29 + color: var(--links); 30 + text-decoration: none; 31 31 } 32 32 33 33 a:hover { 34 - text-decoration: underline; 34 + text-decoration: underline; 35 35 } 36 36 37 37 a.link-button { 38 - padding: .3em .5em; 39 - border: 1px solid var(--links); 40 - color: var(--links); 41 - border-radius: 2px; 42 - background-color: transparent; 43 - transition-property: color, border-color, background-color; 44 - transition-duration: .2s; 45 - animation-delay: 0s; 46 - animation: list-item-fadein .2s forwards; 47 - opacity: 0; 38 + padding: .3em .5em; 39 + border: 1px solid var(--links); 40 + color: var(--links); 41 + border-radius: 2px; 42 + background-color: transparent; 43 + transition-property: color, border-color, background-color; 44 + transition-duration: .2s; 45 + animation-delay: 0s; 46 + animation: list-item-fadein .2s forwards; 47 + opacity: 0; 48 48 } 49 49 50 50 a.link-button:hover { 51 - color: #eee; 52 - border-color: #eee; 53 - background-color: var(--links) !important; 54 - text-decoration: none; 55 - box-shadow: 0 0 1em var(--links); 51 + color: #eee; 52 + border-color: #eee; 53 + background-color: var(--links) !important; 54 + text-decoration: none; 55 + box-shadow: 0 0 1em var(--links); 56 + } 57 + 58 + a img { 59 + height: .9em; 60 + transform: translateY(.1em); 56 61 } 57 62 58 63 small { 59 - font-size: 1em; 60 - color: #aaa; 64 + font-size: 1em; 65 + color: #aaa; 61 66 } 62 67 63 68 span.newchar { 64 - animation: newchar 0.25s; 69 + animation: newchar 0.25s; 65 70 } 66 71 67 72 a#backtotop { 68 - position: fixed; 69 - left: 50%; 70 - transform: translateX(-50%); 71 - padding: .5em .8em; 72 - display: block; 73 - border-radius: 2px; 74 - border: 1px solid transparent; 75 - text-decoration: none; 76 - opacity: .5; 77 - transition-property: opacity, transform, border-color, background-color, color; 78 - transition-duration: .2s; 73 + position: fixed; 74 + left: 50%; 75 + transform: translateX(-50%); 76 + padding: .5em .8em; 77 + display: block; 78 + border-radius: 2px; 79 + border: 1px solid transparent; 80 + text-decoration: none; 81 + opacity: .5; 82 + transition-property: opacity, transform, border-color, background-color, color; 83 + transition-duration: .2s; 79 84 } 80 85 81 86 a#backtotop.active { 82 - top: 4rem; 87 + top: 4rem; 83 88 } 84 89 85 90 a#backtotop:hover { 86 - color: #eee; 87 - border-color: #eee; 88 - background-color: var(--links); 89 - box-shadow: 0 0 1em var(--links); 90 - opacity: 1; 91 + color: #eee; 92 + border-color: #eee; 93 + background-color: var(--links); 94 + box-shadow: 0 0 1em var(--links); 95 + opacity: 1; 91 96 } 92 97 93 98 @keyframes newchar { 94 - from { 95 - background: #fff8; 96 - } 99 + from { 100 + background: #fff8; 101 + } 97 102 } 98 103 99 104 @keyframes list-item-fadein { 100 - from { 101 - opacity: 1; 102 - background: #fff8; 103 - } 105 + from { 106 + opacity: 1; 107 + background: #fff8; 108 + } 104 109 105 - to { 106 - opacity: 1; 107 - background: transparent; 108 - } 110 + to { 111 + opacity: 1; 112 + background: transparent; 113 + } 109 114 } 110 115 111 116 #overlay { 112 - position: fixed; 113 - top: 0; 114 - left: 0; 115 - width: 100vw; 116 - height: 100vh; 117 - background-image: linear-gradient(180deg, rgba(0,0,0,0) 15%, rgb(0, 0, 0) 40%, rgb(0, 0, 0) 60%, rgba(0,0,0,0) 85%); 118 - background-size: 100vw .2em; 119 - background-repeat: repeat; 120 - opacity: .5; 121 - pointer-events: none; 122 - mix-blend-mode: overlay; 117 + position: fixed; 118 + top: 0; 119 + left: 0; 120 + width: 100vw; 121 + height: 100vh; 122 + background-image: linear-gradient(180deg, rgba(0,0,0,0) 15%, rgb(0, 0, 0) 40%, rgb(0, 0, 0) 60%, rgba(0,0,0,0) 85%); 123 + background-size: 100vw .2em; 124 + background-repeat: repeat; 125 + opacity: .5; 126 + pointer-events: none; 127 + mix-blend-mode: overlay; 123 128 } 124 129 125 130 @media screen and (max-width: 780px) { 126 - body { 127 - font-size: 14px; 128 - } 131 + body { 132 + font-size: 14px; 133 + } 129 134 130 - main { 131 - margin-top: 4rem; 132 - } 135 + main { 136 + margin-top: 4rem; 137 + } 133 138 } 134 139
+6
public/style/music-gateway.css
··· 459 459 display: none; 460 460 } 461 461 462 + .album-track-subheading { 463 + width: fit-content; 464 + padding: .3em 1em; 465 + background: #101010; 466 + } 467 + 462 468 footer { 463 469 position: fixed; 464 470 left: 0;
res/external-link.afdesign

This is a binary file and will not be displayed.

+2 -2
views/header.html
··· 2 2 3 3 <header> 4 4 <nav> 5 - <div id="header-home" hx-get="/" hx-on="click" hx-target="body" hx-swap="outerHTML show:window:top" preload="mouseover" hx-push-url="true"> 5 + <div id="header-home"> 6 6 <img src="/img/favicon.png" id="header-icon" width="100" height="100" alt=""> 7 7 <div id="header-text"> 8 8 <h1>ari melody</h1> ··· 16 16 <rect y="40" width="70" height="10" rx="5" fill="#eee" /> 17 17 </svg> 18 18 </a> 19 - <ul id="header-links" hx-boost="true" hx-target="body" hx-swap="outerHTML show:window:top"> 19 + <ul id="header-links"> 20 20 <li> 21 21 <a href="/" preload="mouseover">home</a> 22 22 </li>
+3 -3
views/index.html
··· 20 20 21 21 {{define "content"}} 22 22 <main> 23 - <h1> 23 + <h1 class="typeout"> 24 24 # hello, world! 25 25 </h1> 26 26 ··· 58 58 59 59 <hr> 60 60 61 - <h2> 61 + <h2 class="typeout"> 62 62 ## metadata 63 63 </h2> 64 64 ··· 133 133 134 134 <hr> 135 135 136 - <h2> 136 + <h2 class="typeout"> 137 137 ## cool people 138 138 </h2> 139 139
+1 -5
views/layout.html
··· 9 9 10 10 {{block "head" .}}{{end}} 11 11 12 - <!-- <meta name="htmx-config" content='{"htmx.config.scrollIntoViewOnBoost":false}'> --> 13 - <!-- <script type="application/javascript" src="/script/lib/htmx.js"></script> --> 14 - <!-- <script type="application/javascript" src="/script/lib/htmx.min.js"></script> --> 15 - <!-- <script type="application/javascript" src="/script/lib/htmx-preload.js"></script> --> 16 - <!-- <script type="application/javascript" src="/script/swap.js"></script> --> 12 + <script type="module", src="/script/main.js"></script> 17 13 </head> 18 14 19 15 <body>
+9 -1
views/music-gateway.html
··· 34 34 35 35 <div id="background" style="background-image: url({{.GetArtwork}})"></div> 36 36 37 - <a href="/music" swap-url="/music" id="go-back" title="back to arimelody.me">&lt;</a> 37 + <a href="/music" id="go-back" title="back to arimelody.me">&lt;</a> 38 38 <br><br> 39 39 40 40 <div id="music-container"> ··· 61 61 <p id="type" class="{{.ReleaseType}}">{{.ReleaseType}}</p> 62 62 {{else}} 63 63 <p id="type" class="upcoming">upcoming</p> 64 + <p>Releases: {{.PrintReleaseDate}}</p> 64 65 {{end}} 65 66 66 67 <ul id="links"> ··· 118 119 {{range $i, $track := .Tracks}} 119 120 <details> 120 121 <summary class="album-track-title">{{$track.Number}}. {{$track.Title}}</summary> 122 + 123 + {{if $track.Description}} 124 + <p class="album-track-subheading">DESCRIPTION</p> 125 + {{$track.Description}} 126 + {{end}} 127 + 128 + <p class="album-track-subheading">LYRICS</p> 121 129 {{if $track.Lyrics}} 122 130 {{$track.Lyrics}} 123 131 {{else}}
+3 -3
views/music.html
··· 20 20 <main> 21 21 <script type="module" src="/script/music.js"></script> 22 22 23 - <h1> 23 + <h1 class="typeout"> 24 24 # my music 25 25 </h1> 26 26 27 27 <div id="music-container"> 28 28 {{range $Release := .}} 29 - <div class="music" id="{{$Release.ID}}" swap-url="/music/{{$Release.ID}}"> 29 + <div class="music" id="{{$Release.ID}}"> 30 30 <div class="music-artwork"> 31 31 <img src="{{$Release.GetArtwork}}" alt="{{$Release.Title}} artwork" width="128" loading="lazy"> 32 32 </div> ··· 50 50 {{end}} 51 51 </div> 52 52 53 - <h2 id="usage" class="question"> 53 + <h2 id="usage" class="question typeout"> 54 54 <a href="#usage"> 55 55 &gt; "can i use your music in my content?" 56 56 </a>