smol fix
confusedbread confuseddbread@gmail.com
Thu, 03 Jul 2025 15:34:04 +0200
2 files changed,
8 insertions(+),
6 deletions(-)
M
backend/main.go
→
backend/main.go
@@ -52,8 +52,8 @@ return playingInfo
} func main() { - http.HandleFunc("/now-playing", nowPlayingHandler) - http.HandleFunc("/boop", boopHandler) + http.HandleFunc("/api/now-playing", nowPlayingHandler) + http.HandleFunc("/api/boop", boopHandler) log.Println("http://localhost:5050") log.Fatal(http.ListenAndServe(":5050", nil)) }
M
src/main.rs
→
src/main.rs
@@ -12,10 +12,12 @@ class: String
} #[cfg(debug_assertions)] -const URL: &str = "http://localhost:5050"; +const URL: &str = "http://localhost:5050/api"; +const STATIC: &str = "./static"; #[cfg(not(debug_assertions))] const URL: &str = "https://kate.breadlabs.de/api"; +const STATIC: &str = "../../src/static"; fn head(page_title: &str) -> Markup { html! {@@ -23,8 +25,8 @@ (DOCTYPE)
head { meta charset="utf-8"; title { (page_title) } - link rel="icon" href="./static/neodog_laptop_notice.png"; - link rel="stylesheet" href="static/style.css"; + link rel="icon" href={(format!("{}/neodog_laptop_notice.png", STATIC))}; + link rel="stylesheet" href=(format!("{}/static/style.css", STATIC)); script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.6/dist/htmx.min.js" {} script { "htmx.config.selfRequestsOnly = false" } }@@ -96,7 +98,7 @@ h1 { "Boop me" }
div class="boop timestamp" { (format!("boops since {}:",Local::now().format("%d/%m/%Y %H:%M UTC%Z"))) } div class="boop counter" #boop-counter hx-get={(format!("{}/boop", URL))} hx-trigger="load" {} div class="boop stack" { - img class="boop unboop" src="./static/neodog.png" {} + img class="boop unboop" src=(format!("{}/neodog.png", STATIC)) {} button class="boop button" hx-post={(format!("{}/boop", URL))} hx-trigger="mousedown throttle:300ms" hx-swap="swap:275ms" hx-target="#boop-counter" {} } }