Add footer to recipe pages
This commit is contained in:
parent
93573799be
commit
168e00a87f
|
@ -171,6 +171,15 @@ impl Recipe {
|
|||
}
|
||||
|
||||
pub fn construct_page(&self) {
|
||||
// Create the footer
|
||||
let footer = Container::new(ContainerType::Footer)
|
||||
.with_raw(r#"<hr>"#) // 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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue