some cleanup, attempting to fix htmx bug

Signed-off-by: ari melody <ari@arimelody.me>
This commit is contained in:
ari melody 2024-03-22 08:13:32 +00:00
parent c1ff03c4e5
commit cddd5656f2
4 changed files with 43 additions and 47 deletions

View file

@ -53,7 +53,7 @@ var placeholders = []MusicRelease{
Buyname: "go get it!!",
Buylink: "https://arimelody.me/",
Links: []MusicLink{
MusicLink{
{
Name: "youtube",
Url: "https://youtu.be/dQw4w9WgXcQ",
},
@ -61,19 +61,19 @@ var placeholders = []MusicRelease{
Description:
`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas viverra ligula interdum, tempor metus venenatis, tempus est. Praesent semper vulputate nulla, a venenatis libero elementum id. Proin maximus aliquet accumsan. Integer eu orci congue, ultrices leo sed, maximus risus. Integer laoreet non urna non accumsan. Cras ut sollicitudin justo. Vivamus eu orci tempus, aliquet est rhoncus, tempus neque. Aliquam tempor sit amet nibh sed tempus. Nulla vitae bibendum purus. Sed in mi enim. Nam pharetra enim lorem, vel tristique diam malesuada a. Duis dignissim nunc mi, id semper ex tincidunt a. Sed laoreet consequat lacus a consectetur. Nulla est diam, tempus eget lacus ullamcorper, tincidunt faucibus ex. Duis consectetur felis sit amet ante fermentum interdum. Sed pulvinar laoreet tellus.`,
Credits: []MusicCredit{
MusicCredit{
{
Artist: &ari,
Role: "having the swag",
},
MusicCredit{
{
Artist: &zaire,
Role: "having the swag",
},
MusicCredit{
{
Artist: &mae,
Role: "having the swag",
},
MusicCredit{
{
Artist: &loudar,
Role: "having the swag",
},
@ -184,34 +184,34 @@ var placeholders = []MusicRelease{
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_Dream.webp",
Buylink: "https://arimelody.bandcamp.com/track/dream",
Links: []MusicLink{
MusicLink{
{
Name: "spotify",
Url: "https://open.spotify.com/album/5talRpqzjExP1w6j5LFIAh",
},
MusicLink{
{
Name: "apple music",
Url: "https://music.apple.com/ie/album/dream-single/1650037132",
},
MusicLink{
{
Name: "soundcloud",
Url: "https://soundcloud.com/arimelody/dream2022",
},
MusicLink{
{
Name: "youtube",
Url: "https://www.youtube.com/watch?v=nfFgtMuYAx8",
},
},
Description: "living the dream 🌌 ✨",
Credits: []MusicCredit{
MusicCredit{
{
Artist: &mellodoot,
Role: "vocals",
},
MusicCredit{
{
Artist: &mellodoot,
Role: "production",
},
MusicCredit{
{
Artist: &mellodoot,
Role: "artwork",
},
@ -252,34 +252,34 @@ var placeholders = []MusicRelease{
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_Go_My_Way.webp",
Buylink: "https://arimelody.bandcamp.com/track/go-my-way",
Links: []MusicLink{
MusicLink{
{
Name: "spotify",
Url: "https://open.spotify.com/album/35WNtxK12IDHCUoXHDePGE",
},
MusicLink{
{
Name: "apple music",
Url: "https://music.apple.com/ie/album/go-my-way-single/1547145699",
},
MusicLink{
{
Name: "soundcloud",
Url: "https://soundcloud.com/arimelody/go-my-way",
},
MusicLink{
{
Name: "youtube",
Url: "https://www.youtube.com/watch?v=CNptNQdLkl0",
},
},
Description: "hey! go my way! 💥 ✨",
Credits: []MusicCredit{
MusicCredit{
{
Artist: &mellodoot,
Role: "vocals",
},
MusicCredit{
{
Artist: &mellodoot,
Role: "production",
},
MusicCredit{
{
Artist: &mellodoot,
Role: "artwork",
},
@ -312,15 +312,15 @@ var placeholders = []MusicRelease{
},
Description: "let's take a trip. i've got a goddamn boat ⛵️",
Credits: []MusicCredit{
MusicCredit{
{
Artist: &mellodoot,
Role: "vocals",
},
MusicCredit{
{
Artist: &mellodoot,
Role: "production",
},
MusicCredit{
{
Artist: &mellodoot,
Role: "artwork",
},
@ -353,15 +353,15 @@ var placeholders = []MusicRelease{
},
Description: "we'll dawn a new frontier! 👾",
Credits: []MusicCredit{
MusicCredit{
{
Artist: &mellodoot,
Role: "vocals",
},
MusicCredit{
{
Artist: &mellodoot,
Role: "production",
},
MusicCredit{
{
Artist: &mellodoot,
Role: "artwork",
},
@ -388,11 +388,11 @@ var placeholders = []MusicRelease{
},
},
Credits: []MusicCredit{
MusicCredit{
{
Artist: &zaire,
Role: "production",
},
MusicCredit{
{
Artist: &mellodoot,
Role: "production",
},
@ -424,11 +424,11 @@ var placeholders = []MusicRelease{
},
},
Credits: []MusicCredit{
MusicCredit{
{
Artist: &mellodoot,
Role: "production",
},
MusicCredit{
{
Artist: &mellodoot,
Role: "artwork",
},
@ -460,15 +460,15 @@ var placeholders = []MusicRelease{
},
},
Credits: []MusicCredit{
MusicCredit{
{
Artist: &mellodoot,
Role: "vocals",
},
MusicCredit{
{
Artist: &mellodoot,
Role: "production",
},
MusicCredit{
{
Artist: &mellodoot,
Role: "artwork",
},
@ -500,11 +500,11 @@ var placeholders = []MusicRelease{
},
},
Credits: []MusicCredit{
MusicCredit{
{
Artist: &mellodoot,
Role: "production",
},
MusicCredit{
{
Artist: &mellodoot,
Role: "artwork",
},
@ -546,11 +546,11 @@ var placeholders = []MusicRelease{
},
},
Credits: []MusicCredit{
MusicCredit{
{
Artist: &mellodoot,
Role: "production",
},
MusicCredit{
{
Artist: &red,
Role: "artwork",
Meta: true,
@ -576,11 +576,11 @@ var placeholders = []MusicRelease{
},
},
Credits: []MusicCredit{
MusicCredit{
{
Artist: &mellodoot,
Role: "production",
},
MusicCredit{
{
Artist: &red,
Role: "artwork",
Meta: true,
@ -607,11 +607,11 @@ var placeholders = []MusicRelease{
},
Description: "an 8-bit expedition! ⚔️🛡️",
Credits: []MusicCredit{
MusicCredit{
{
Artist: &mellodoot,
Role: "production",
},
MusicCredit{
{
Artist: &mellodoot,
Role: "artwork",
},

View file

@ -85,7 +85,7 @@ func handle_request(writer http.ResponseWriter, req *http.Request) {
return index_handler(writer, root)
}
if uri == "/music" {
if uri == "/music" || uri == "/music/" {
return music_directory_handler(writer, root)
}
@ -121,11 +121,6 @@ func music_directory_handler(writer http.ResponseWriter, root *template.Template
}
func music_gateway_handler(writer http.ResponseWriter, req *http.Request, root *template.Template) int {
if len(req.URL.Path) <= len("/music/") {
http.Error(writer, "400 bad request", http.StatusBadRequest)
return 400
}
id := req.URL.Path[len("/music/"):]
// http.Redirect(writer, req, "https://mellodoot.com/music/"+title, 302)
// return

View file

@ -3,6 +3,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{block "head" .}}{{end}}
<meta name="htmx-config" content='{"htmx.config.scrollIntoViewOnBoost":false}'>
<script type="application/javascript" src="/script/lib/htmx.min.js"></script>
<script type="application/javascript" src="/script/lib/htmx-head-support.js"></script>

View file

@ -24,8 +24,8 @@
<meta name="twitter:image" content="https://arimelody.me{{.ResolveArtwork}}">
<meta name="twitter:image:alt" content="Cover art for &quot;{{.Title}}&quot;">
<script type="module" src="/script/music-gateway.js" defer></script>
<link rel="stylesheet" href="/style/music-gateway.css">
<script type="module" src="/script/music-gateway.js" defer></script>
{{end}}
{{define "content"}}