index — crispy-website @ 3f3d9aebcbb49d20cad58cb0e4875e2d2c3e65b2

My personal homepage (very crispy)

music: remove for now
crispy-caesus crispy@crispy-caesus.eu
Sun, 18 Jan 2026 15:17:19 +0100
commit

3f3d9aebcbb49d20cad58cb0e4875e2d2c3e65b2

parent

1cdf769db17236d76ea09fe955eaf81917aa4381

2 files changed, 5 insertions(+), 28 deletions(-)

jump to
M cmd/server/main.gocmd/server/main.go

@@ -1,20 +1,12 @@

package main import ( - "crispy-website/internal/db" - "crispy-website/internal/repo" "fmt" "log" "net/http" - "text/template" ) func main() { - repository, err := repo.NewRepository("walletdrain.db") - if err != nil { - panic("failed to open db") - } - fs := http.FileServer(http.Dir("static")) http.Handle("/static/", http.StripPrefix("/static/", fs))

@@ -22,18 +14,9 @@

http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "templates/index.html") }) - + http.HandleFunc("/music", func(w http.ResponseWriter, r *http.Request) { - results := repository.LoadMusic() - spending := repository.GetSpending() - tmpl := template.Must(template.ParseFiles("templates/music.html")) - - data := db.MusicData{Releases: results, Spending: spending} - - err := tmpl.Execute(w, data) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - } + http.ServeFile(w, r, "templates/music.html") }) http.HandleFunc("/.well-known/discord", func(w http.ResponseWriter, r *http.Request) {
M templates/music.htmltemplates/music.html

@@ -13,15 +13,9 @@ <h1>My bought music</h1>

<a title="Bandcamp" href="https://bandcamp.com/crispy-caesus" target="_blank" rel="noopener noreferrer"> My Bandcamp </a> - <p>Spending so far: {{.Spending}}€</p> - <ul> - {{range .Releases}} - <li> - <img src="{{.Note}}" alt="Album Cover" width="50" /> - <p>{{.Name}} - {{.Artist}}</p> - </li> - {{end}} - </ul> + <p>For the timebeing this page won't exist anymore as I probably lost the DB in a migration</p> + <br> + <p>I hope I can bring it back at some point</p> </body> </html>