Add main turbo-frame

Nav link navigations now only replace the main content area while
leaving the header in place.
This commit is contained in:
Tyler Hallada 2023-06-02 00:18:06 -04:00
parent f4da3f3ab3
commit 0b7acadd60
2 changed files with 5 additions and 3 deletions

View File

@ -4,9 +4,9 @@ pub fn header() -> Markup {
html! {
header {
nav {
h1 { a href="/" { "crawlnicle" } }
h1 { a href="/" data-turbo-frame="main" { "crawlnicle" } }
ul {
li { a href="/feeds" { "feeds" } }
li { a href="/feeds" data-turbo-frame="main" { "feeds" } }
}
}
}

View File

@ -45,7 +45,9 @@ impl Layout {
}
body {
(header())
(template)
turbo-frame id="main" {
(template)
}
}
}
}