mirror of
https://github.com/zaphar/Heracles.git
synced 2025-07-23 04:29:48 -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
|
||||
.iter()
|
||||
.map(|d| d.title.clone())
|
||||
.collect::<Vec<String>>();
|
||||
.enumerate()
|
||||
.collect::<Vec<(usize, String)>>();
|
||||
html! {
|
||||
div {
|
||||
// Header menu
|
||||
ul {
|
||||
@for title in &titles {
|
||||
li { (title) }
|
||||
li hx-get=(format!("/ui/dash/{}/", title.0)) hx-target="#dashboard" { (title.1) }
|
||||
}
|
||||
}
|
||||
// dashboard display
|
||||
div { }
|
||||
div id="dashboard" { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user