2025-02-01 14:22:33 +01:00
|
|
|
use askama::{
|
|
|
|
Template,
|
|
|
|
};
|
2025-02-01 18:34:14 +01:00
|
|
|
use crate::{
|
|
|
|
storage::{
|
|
|
|
FlakeUri,
|
2025-02-01 19:38:47 +01:00
|
|
|
InputModel,
|
2025-02-01 20:29:27 +01:00
|
|
|
RevisionListModel,
|
2025-02-01 18:34:14 +01:00
|
|
|
},
|
|
|
|
};
|
2025-02-01 14:22:33 +01:00
|
|
|
|
|
|
|
#[derive(Template)]
|
|
|
|
#[template(path = "index.html")]
|
|
|
|
pub struct IndexTemplate {
|
|
|
|
}
|
2025-02-01 18:34:14 +01:00
|
|
|
|
|
|
|
#[derive(Template)]
|
|
|
|
#[template(path = "flakes.html")]
|
|
|
|
pub struct FlakesTemplate {
|
|
|
|
pub flakes: Vec<FlakeUri>,
|
|
|
|
}
|
2025-02-01 19:00:51 +01:00
|
|
|
|
|
|
|
#[derive(Template)]
|
2025-02-01 20:29:27 +01:00
|
|
|
#[template(path = "flake.html")]
|
|
|
|
pub struct FlakeTemplate {
|
2025-02-01 19:00:51 +01:00
|
|
|
pub uri: String,
|
2025-02-01 20:29:27 +01:00
|
|
|
pub revisions: Vec<RevisionListModel>,
|
2025-02-01 19:00:51 +01:00
|
|
|
}
|
2025-02-01 19:38:47 +01:00
|
|
|
|
|
|
|
#[derive(Template)]
|
|
|
|
#[template(path = "revision.html")]
|
|
|
|
pub struct RevisionTemplate {
|
|
|
|
pub revision_uri: String,
|
|
|
|
pub inputs: Vec<InputModel>,
|
2025-02-01 20:43:17 +01:00
|
|
|
pub input_of: Vec<InputModel>,
|
2025-02-01 19:38:47 +01:00
|
|
|
}
|