mirror of
https://github.com/zaphar/Heracles.git
synced 2025-07-23 12:39:50 -04:00
feat: trigger htmx requests for dashboard clicks
This commit is contained in:
parent
5c03512e86
commit
bb856bb464
@ -80,17 +80,18 @@ pub async fn app(State(config): Config) -> Markup {
|
|||||||
let titles = config
|
let titles = config
|
||||||
.iter()
|
.iter()
|
||||||
.map(|d| d.title.clone())
|
.map(|d| d.title.clone())
|
||||||
.collect::<Vec<String>>();
|
.enumerate()
|
||||||
|
.collect::<Vec<(usize, String)>>();
|
||||||
html! {
|
html! {
|
||||||
div {
|
div {
|
||||||
// Header menu
|
// Header menu
|
||||||
ul {
|
ul {
|
||||||
@for title in &titles {
|
@for title in &titles {
|
||||||
li { (title) }
|
li hx-get=(format!("/ui/dash/{}/", title.0)) hx-target="#dashboard" { (title.1) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// dashboard display
|
// dashboard display
|
||||||
div { }
|
div id="dashboard" { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user