From 168e00a87fea5e4104930c3c814c301d822a04cf Mon Sep 17 00:00:00 2001 From: Erin Nova Date: Sun, 23 Jan 2022 18:57:28 -0500 Subject: [PATCH] Add footer to recipe pages --- src/structures.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/structures.rs b/src/structures.rs index c56cfea..e03f7b0 100644 --- a/src/structures.rs +++ b/src/structures.rs @@ -171,6 +171,15 @@ impl Recipe { } pub fn construct_page(&self) { + // Create the footer + let footer = Container::new(ContainerType::Footer) + .with_raw(r#"
"#) // Line seperator + .with_link("/", "home") // Link to the root page + .with_link("/rss.xml", "rss") // Link the the Atom feed + // License info + .with_paragraph("Software licensed under the CNPLv7+") + .with_paragraph("Recipes under Public Domain"); + // Metadata let meta = Container::new(ContainerType::UnorderedList) .with_attributes(vec![("class", "recipe")]) @@ -247,7 +256,8 @@ impl Recipe { &self.posted_date.year(), &self.posted_date.month(), &self.posted_date.day())) - .with_raw(edit_date); + .with_raw(edit_date) + .with_container(footer); write_html(recipe_page.to_html_string(), "en", Some(&self.shortcode)); }