crabmail

Static HTML email archive viewer in Rust
git clone git://git.alexwennerberg.com/crabmail
Log | Files | Refs | README | LICENSE

commit b47633660a6c8f2682062b2b9e97894410cebec7
parent cedcdefae1523225ae7c3de1ab075ed50c62eea5
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Mon, 14 Mar 2022 21:01:01 -0700

...

Diffstat:
Msrc/templates/html.rs | 21+++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/templates/html.rs b/src/templates/html.rs @@ -39,19 +39,32 @@ impl Lists { impl List { pub fn to_html(&self) -> Vec<String> { - template( + // TODO paginate + let threads = String::new(); + // TODO use summary?? + let page = template( r#" + {header} <h1 class="page-title"> {title} - <a href="atom.xml"> { + </h1> + <a href="atom.xml"> <img alt="Atom feed" src={rss_svg} /> + {threads} </a> </h1> + {footer} "#, - &[("title", self.config.title.as_str()), ("rss_svg", RSS_SVG)], + &[ + ("header", header), + ("title", self.config.title.as_str()), + ("threads", &threads), + ("rss_svg", RSS_SVG), + ("footer", footer), + ], ) .unwrap(); - vec![] + vec![page] } }