2023-07-11 08:04:53 +00:00
|
|
|
use askama::Template;
|
|
|
|
use proc_macros::uses_base_template;
|
|
|
|
use shared::names::Site;
|
|
|
|
|
|
|
|
pub struct BaseTemplate {
|
2023-07-13 01:41:39 +00:00
|
|
|
pub hyperlegible_filename: String,
|
2023-07-11 08:04:53 +00:00
|
|
|
pub style_filename: String,
|
2023-07-13 01:41:39 +00:00
|
|
|
}
|
2023-07-13 05:10:08 +00:00
|
|
|
|
2023-07-13 01:41:39 +00:00
|
|
|
#[derive(Template)]
|
|
|
|
#[template(path = "hyperlegible.css", escape = "none")]
|
|
|
|
pub(super) struct HyperlegibleTemplate {
|
2023-07-11 08:04:53 +00:00
|
|
|
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>,
|
|
|
|
}
|