//! The templating code for [`askama`]. use askama::Template; use crate::solution::Solution; /// The HTML template for all solutions. #[derive(Template)] #[template(path = "solutions.html")] pub struct SolutionsTemplate { /// All solutions grouped by year. pub years: Vec>, } /// Custom [`askama`] filters. pub mod filters { /// See [`crate::utilities::random_emoji`]. pub fn random_emoji(s: &str) -> askama::Result { Ok(format!("{s} {}", crate::utilities::random_emoji())) } }