git-ents.gitmain
⌘K
foforge
meta.rs43 lines · 1.3 KB · rusthistorycomment 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
9use std::sync::Arc;
10
11use axum::extract::State;
12use gix_object::{Find, Write};
13use maud::html;
14
15use crate::state::AppState;
16
17/// `GET /meta`.
18pub async fn show<O>(State(state): State<Arc<AppState<O>>>) -> maud::Markup
19where
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}