about summary refs log tree commit diff
path: root/src/frontend/templates/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/templates/mod.rs')
-rw-r--r--src/frontend/templates/mod.rs8
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" } }
                     }
                 }