all repos — breadsite @ c79ed8de553af34d5f5f0e128e375d8eca8f0518

Unnamed repository; edit this file 'description' to name the repository.

smol fix
confusedbread confuseddbread@gmail.com
Thu, 03 Jul 2025 15:34:04 +0200
commit

c79ed8de553af34d5f5f0e128e375d8eca8f0518

parent

dd50a2d2bf5a7d32d8dd69aae35aab84299007fd

2 files changed, 8 insertions(+), 6 deletions(-)

jump to
M backend/main.gobackend/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.rssrc/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" {} } }