diff options
Diffstat (limited to 'src/http/render.rs')
| -rw-r--r-- | src/http/render.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/http/render.rs b/src/http/render.rs index ca3ba51..f049a25 100644 --- a/src/http/render.rs +++ b/src/http/render.rs @@ -1,9 +1,3 @@ -//! Template contexts (§12, §13). -//! -//! Askama compiles every template into Rust at build time, so a missing field -//! is a compile error rather than a blank page at 2am. Contexts are built from -//! live DB state; nothing here writes. - use askama::Template; /// Everything the shared chrome needs. Embedded in each page context because @@ -293,8 +287,7 @@ pub struct Builds { pub recent: Vec<BuildRow>, } -/// The same table on its own, for the htmx fragment refresh. Same fields, so -/// the include in builds.html and this standalone render cannot drift apart. +/// The same table on its own, for the htmx fragment refresh. #[derive(Template)] #[template(path = "builds_table.html")] pub struct BuildsTable { @@ -386,13 +379,10 @@ pub struct SettingRow { pub value: String, } -/// Vendored static assets. htmx arrives in P3; until then this serves the -/// favicon and refuses everything else rather than walking the filesystem. /// Static assets. Two files, both vendored, both served from `include_bytes!` /// so the binary is self-contained and there is no install step and no bundler /// (§13). htmx is the only JavaScript this app ships; it is served precompressed -/// because the raw file is 48 KB and the gzip is 15 KB, and the budget that -/// matters is what a browser actually downloads. +/// because the budget that matters is what a browser actually downloads. pub fn static_asset(name: &str, accept_gzip: bool) -> crate::http::Res { use crate::http::Res; match name { |
