some cleanup, attempting to fix htmx bug
Signed-off-by: ari melody <ari@arimelody.me>
This commit is contained in:
parent
c1ff03c4e5
commit
cddd5656f2
|
@ -53,7 +53,7 @@ var placeholders = []MusicRelease{
|
||||||
Buyname: "go get it!!",
|
Buyname: "go get it!!",
|
||||||
Buylink: "https://arimelody.me/",
|
Buylink: "https://arimelody.me/",
|
||||||
Links: []MusicLink{
|
Links: []MusicLink{
|
||||||
MusicLink{
|
{
|
||||||
Name: "youtube",
|
Name: "youtube",
|
||||||
Url: "https://youtu.be/dQw4w9WgXcQ",
|
Url: "https://youtu.be/dQw4w9WgXcQ",
|
||||||
},
|
},
|
||||||
|
@ -61,19 +61,19 @@ var placeholders = []MusicRelease{
|
||||||
Description:
|
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.`,
|
`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{
|
Credits: []MusicCredit{
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &ari,
|
Artist: &ari,
|
||||||
Role: "having the swag",
|
Role: "having the swag",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &zaire,
|
Artist: &zaire,
|
||||||
Role: "having the swag",
|
Role: "having the swag",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mae,
|
Artist: &mae,
|
||||||
Role: "having the swag",
|
Role: "having the swag",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &loudar,
|
Artist: &loudar,
|
||||||
Role: "having the swag",
|
Role: "having the swag",
|
||||||
},
|
},
|
||||||
|
@ -184,34 +184,34 @@ var placeholders = []MusicRelease{
|
||||||
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_Dream.webp",
|
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_Dream.webp",
|
||||||
Buylink: "https://arimelody.bandcamp.com/track/dream",
|
Buylink: "https://arimelody.bandcamp.com/track/dream",
|
||||||
Links: []MusicLink{
|
Links: []MusicLink{
|
||||||
MusicLink{
|
{
|
||||||
Name: "spotify",
|
Name: "spotify",
|
||||||
Url: "https://open.spotify.com/album/5talRpqzjExP1w6j5LFIAh",
|
Url: "https://open.spotify.com/album/5talRpqzjExP1w6j5LFIAh",
|
||||||
},
|
},
|
||||||
MusicLink{
|
{
|
||||||
Name: "apple music",
|
Name: "apple music",
|
||||||
Url: "https://music.apple.com/ie/album/dream-single/1650037132",
|
Url: "https://music.apple.com/ie/album/dream-single/1650037132",
|
||||||
},
|
},
|
||||||
MusicLink{
|
{
|
||||||
Name: "soundcloud",
|
Name: "soundcloud",
|
||||||
Url: "https://soundcloud.com/arimelody/dream2022",
|
Url: "https://soundcloud.com/arimelody/dream2022",
|
||||||
},
|
},
|
||||||
MusicLink{
|
{
|
||||||
Name: "youtube",
|
Name: "youtube",
|
||||||
Url: "https://www.youtube.com/watch?v=nfFgtMuYAx8",
|
Url: "https://www.youtube.com/watch?v=nfFgtMuYAx8",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Description: "living the dream 🌌 ✨",
|
Description: "living the dream 🌌 ✨",
|
||||||
Credits: []MusicCredit{
|
Credits: []MusicCredit{
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "vocals",
|
Role: "vocals",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "production",
|
Role: "production",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "artwork",
|
Role: "artwork",
|
||||||
},
|
},
|
||||||
|
@ -252,34 +252,34 @@ var placeholders = []MusicRelease{
|
||||||
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_Go_My_Way.webp",
|
Artwork: "https://mellodoot.com/img/music_artwork/mellodoot_-_Go_My_Way.webp",
|
||||||
Buylink: "https://arimelody.bandcamp.com/track/go-my-way",
|
Buylink: "https://arimelody.bandcamp.com/track/go-my-way",
|
||||||
Links: []MusicLink{
|
Links: []MusicLink{
|
||||||
MusicLink{
|
{
|
||||||
Name: "spotify",
|
Name: "spotify",
|
||||||
Url: "https://open.spotify.com/album/35WNtxK12IDHCUoXHDePGE",
|
Url: "https://open.spotify.com/album/35WNtxK12IDHCUoXHDePGE",
|
||||||
},
|
},
|
||||||
MusicLink{
|
{
|
||||||
Name: "apple music",
|
Name: "apple music",
|
||||||
Url: "https://music.apple.com/ie/album/go-my-way-single/1547145699",
|
Url: "https://music.apple.com/ie/album/go-my-way-single/1547145699",
|
||||||
},
|
},
|
||||||
MusicLink{
|
{
|
||||||
Name: "soundcloud",
|
Name: "soundcloud",
|
||||||
Url: "https://soundcloud.com/arimelody/go-my-way",
|
Url: "https://soundcloud.com/arimelody/go-my-way",
|
||||||
},
|
},
|
||||||
MusicLink{
|
{
|
||||||
Name: "youtube",
|
Name: "youtube",
|
||||||
Url: "https://www.youtube.com/watch?v=CNptNQdLkl0",
|
Url: "https://www.youtube.com/watch?v=CNptNQdLkl0",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Description: "hey! go my way! 💥 ✨",
|
Description: "hey! go my way! 💥 ✨",
|
||||||
Credits: []MusicCredit{
|
Credits: []MusicCredit{
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "vocals",
|
Role: "vocals",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "production",
|
Role: "production",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "artwork",
|
Role: "artwork",
|
||||||
},
|
},
|
||||||
|
@ -312,15 +312,15 @@ var placeholders = []MusicRelease{
|
||||||
},
|
},
|
||||||
Description: "let's take a trip. i've got a goddamn boat ⛵️",
|
Description: "let's take a trip. i've got a goddamn boat ⛵️",
|
||||||
Credits: []MusicCredit{
|
Credits: []MusicCredit{
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "vocals",
|
Role: "vocals",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "production",
|
Role: "production",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "artwork",
|
Role: "artwork",
|
||||||
},
|
},
|
||||||
|
@ -353,15 +353,15 @@ var placeholders = []MusicRelease{
|
||||||
},
|
},
|
||||||
Description: "we'll dawn a new frontier! 👾",
|
Description: "we'll dawn a new frontier! 👾",
|
||||||
Credits: []MusicCredit{
|
Credits: []MusicCredit{
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "vocals",
|
Role: "vocals",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "production",
|
Role: "production",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "artwork",
|
Role: "artwork",
|
||||||
},
|
},
|
||||||
|
@ -388,11 +388,11 @@ var placeholders = []MusicRelease{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Credits: []MusicCredit{
|
Credits: []MusicCredit{
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &zaire,
|
Artist: &zaire,
|
||||||
Role: "production",
|
Role: "production",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "production",
|
Role: "production",
|
||||||
},
|
},
|
||||||
|
@ -424,11 +424,11 @@ var placeholders = []MusicRelease{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Credits: []MusicCredit{
|
Credits: []MusicCredit{
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "production",
|
Role: "production",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "artwork",
|
Role: "artwork",
|
||||||
},
|
},
|
||||||
|
@ -460,15 +460,15 @@ var placeholders = []MusicRelease{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Credits: []MusicCredit{
|
Credits: []MusicCredit{
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "vocals",
|
Role: "vocals",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "production",
|
Role: "production",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "artwork",
|
Role: "artwork",
|
||||||
},
|
},
|
||||||
|
@ -500,11 +500,11 @@ var placeholders = []MusicRelease{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Credits: []MusicCredit{
|
Credits: []MusicCredit{
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "production",
|
Role: "production",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "artwork",
|
Role: "artwork",
|
||||||
},
|
},
|
||||||
|
@ -546,11 +546,11 @@ var placeholders = []MusicRelease{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Credits: []MusicCredit{
|
Credits: []MusicCredit{
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "production",
|
Role: "production",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &red,
|
Artist: &red,
|
||||||
Role: "artwork",
|
Role: "artwork",
|
||||||
Meta: true,
|
Meta: true,
|
||||||
|
@ -576,11 +576,11 @@ var placeholders = []MusicRelease{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Credits: []MusicCredit{
|
Credits: []MusicCredit{
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "production",
|
Role: "production",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &red,
|
Artist: &red,
|
||||||
Role: "artwork",
|
Role: "artwork",
|
||||||
Meta: true,
|
Meta: true,
|
||||||
|
@ -607,11 +607,11 @@ var placeholders = []MusicRelease{
|
||||||
},
|
},
|
||||||
Description: "an 8-bit expedition! ⚔️🛡️",
|
Description: "an 8-bit expedition! ⚔️🛡️",
|
||||||
Credits: []MusicCredit{
|
Credits: []MusicCredit{
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "production",
|
Role: "production",
|
||||||
},
|
},
|
||||||
MusicCredit{
|
{
|
||||||
Artist: &mellodoot,
|
Artist: &mellodoot,
|
||||||
Role: "artwork",
|
Role: "artwork",
|
||||||
},
|
},
|
||||||
|
|
7
main.go
7
main.go
|
@ -85,7 +85,7 @@ func handle_request(writer http.ResponseWriter, req *http.Request) {
|
||||||
return index_handler(writer, root)
|
return index_handler(writer, root)
|
||||||
}
|
}
|
||||||
|
|
||||||
if uri == "/music" {
|
if uri == "/music" || uri == "/music/" {
|
||||||
return music_directory_handler(writer, root)
|
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 {
|
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/"):]
|
id := req.URL.Path[len("/music/"):]
|
||||||
// http.Redirect(writer, req, "https://mellodoot.com/music/"+title, 302)
|
// http.Redirect(writer, req, "https://mellodoot.com/music/"+title, 302)
|
||||||
// return
|
// return
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
{{block "head" .}}{{end}}
|
{{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.min.js"></script>
|
||||||
<script type="application/javascript" src="/script/lib/htmx-head-support.js"></script>
|
<script type="application/javascript" src="/script/lib/htmx-head-support.js"></script>
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
<meta name="twitter:image" content="https://arimelody.me{{.ResolveArtwork}}">
|
<meta name="twitter:image" content="https://arimelody.me{{.ResolveArtwork}}">
|
||||||
<meta name="twitter:image:alt" content="Cover art for "{{.Title}}"">
|
<meta name="twitter:image:alt" content="Cover art for "{{.Title}}"">
|
||||||
|
|
||||||
<script type="module" src="/script/music-gateway.js" defer></script>
|
|
||||||
<link rel="stylesheet" href="/style/music-gateway.css">
|
<link rel="stylesheet" href="/style/music-gateway.css">
|
||||||
|
<script type="module" src="/script/music-gateway.js" defer></script>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{define "content"}}
|
{{define "content"}}
|
||||||
|
|
Loading…
Reference in a new issue