meowy-webring/crates/meowy-assets/src/templates.rs

32 lines
722 B
Rust
Raw Normal View History

use askama::Template;
use proc_macros::uses_base_template;
use shared::names::Site;
pub struct BaseTemplate {
pub hyperlegible_filename: String,
pub style_filename: String,
}
#[derive(Template)]
#[template(path = "hyperlegible.css", escape = "none")]
pub(super) struct HyperlegibleTemplate {
pub atkinson_latin_woff2_filename: String,
pub atkinson_latin_ext_woff2_filename: String,
pub atkinson_all_woff_filename: String,
}
#[derive(Template)]
#[template(path = "error.html")]
#[uses_base_template]
pub struct ErrorTemplate<'a> {
pub error: &'a str,
pub error_description: &'a str,
}
#[derive(Template)]
#[template(path = "index.html")]
#[uses_base_template]
pub struct IndexTemplate {
pub sites: Vec<Site>,
}