diff options
author | Vika <vika@fireburn.ru> | 2021-12-05 22:05:36 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2021-12-05 22:05:36 +0300 |
commit | 24b109448bc8f1d30c88bbb9d01a05eec74b3d51 (patch) | |
tree | 5895296d6f0b6d6ba148f598718bbaf3fa0c8c7f /src/frontend/templates | |
parent | 29f248d8b06f062d5fe552da09a59b91d67118f5 (diff) | |
download | kittybox-24b109448bc8f1d30c88bbb9d01a05eec74b3d51.tar.zst |
frontend: Added listing feeds to the header bar
Diffstat (limited to 'src/frontend/templates')
-rw-r--r-- | src/frontend/templates/mod.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/frontend/templates/mod.rs b/src/frontend/templates/mod.rs index 290e215..a7c01e0 100644 --- a/src/frontend/templates/mod.rs +++ b/src/frontend/templates/mod.rs @@ -1,4 +1,5 @@ -use super::IndiewebEndpoints; +use crate::database::MicropubChannel; +use crate::frontend::IndiewebEndpoints; use ellipse::Ellipse; use http_types::StatusCode; use log::error; @@ -24,7 +25,7 @@ mod onboarding; pub use onboarding::OnboardingPage; markup::define! { - Template<'a>(title: &'a str, blog_name: &'a str, endpoints: IndiewebEndpoints, content: String) { + Template<'a>(title: &'a str, blog_name: &'a str, endpoints: IndiewebEndpoints, feeds: Vec<MicropubChannel>, content: String) { @markup::doctype() html { head { @@ -48,6 +49,9 @@ markup::define! { ul { // TODO print a list of feeds and allow jumping to them li { a#homepage[href="/"] { @blog_name } } + @for feed in feeds.iter() { + li { a[href=&feed.uid] { @feed.name } } + } li.shiftright { a#login[href="/login"] { "Login" } } } } |