crates/cli/ents-web/src/pages/meta.rs
meta.rshistorycomment on this file
| 1 | //! `GET /meta`: the landing page for the `meta` tab -- a card listing |
| 2 | //! every page family in `super::META_SECTIONS` with its blurb, so the |
| 3 | //! tab resolves to something other than an arbitrary pick of its five |
| 4 | //! children. Rendered through [`super::layout_meta`], the same governance |
| 5 | //! sub-rail every one of those five families renders beside its own |
| 6 | //! content -- this page is that rail's own index, not a sixth thing beside |
| 7 | //! it. |
| 8 | |
| 9 | use std::sync::Arc; |
| 10 | |
| 11 | use axum::extract::State; |
| 12 | use gix_object::{Find, Write}; |
| 13 | use maud::html; |
| 14 | |
| 15 | use crate::state::AppState; |
| 16 | |
| 17 | /// `GET /meta`. |
| 18 | pub async fn show<O>(State(state): State<Arc<AppState<O>>>) -> maud::Markup |
| 19 | where |
| 20 | O: Find + Write + Send + 'static, |
| 21 | { |
| 22 | super::layout_meta( |
| 23 | &super::RepoHeader::from_state(&state), |
| 24 | &super::identity_label(&state), |
| 25 | "/meta", |
| 26 | "Repo & governance", |
| 27 | html! { |
| 28 | p.muted { |
| 29 | "All project metadata — members, effects, toolchains, " |
| 30 | "redactions, and the adoption inbox — lives in this " |
| 31 | "repository as git objects." |
| 32 | } |
| 33 | div.card { |
| 34 | @for section in super::META_SECTIONS { |
| 35 | div.card-row.stack { |
| 36 | a href=(section.href) { (section.name) } |
| 37 | span { (section.blurb) } |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | }, |
| 42 | ) |
| 43 | } |