From 24b109448bc8f1d30c88bbb9d01a05eec74b3d51 Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 5 Dec 2021 22:05:36 +0300 Subject: frontend: Added listing feeds to the header bar --- src/frontend/templates/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/frontend/templates/mod.rs') 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, 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" } } } } -- cgit 1.4.1