code wiki / _hdl_build / nx_nishi_editorial.nx

nx_nishi_editorial.nx

buildroot/runtime/_hdl_build/nx_nishi_editorial.nx

47329 B613 linesdepth 3pulls 3 transitivereach 8 importersview sourcekind librarytopic nishi
docsdependenciesstructsconstsfunctions

about

nx_nishi_editorial.nx -- LIB: THE estate's editorial design system, emitted as sovereign zero-JS CSS. Every generated surface used to hand-roll its own stylesheet, which is why the estate reads like a dozen different products. This is the ONE canonical system: adopt it, do not copy it (rule 15 -- the pattern is past three call sites, so it belongs in a lib). Tuned against a reference editorial artifact: flat, 2px radii, ZERO shadows, ZERO gradients, serif display over sans body with a mono voice for labels and figures. Restraint is the whole aesthetic -- the typography carries it, so nothing else has to shout. THEME-AWARE BOTH WAYS: `prefers-color-scheme: dark` is the default signal, and :root[data-theme='dark'| 'light'] overrides win in BOTH directions, so an explicit toggle beats the OS rather than fighting it. ALL markup here uses SINGLE-quoted attributes and CSS strings on purpose. It keeps every emitted literal free of backslash escaping, and -- the real reason -- it means this stylesheet can never be routed through nw_render: that substituter treats `{` as a binding opener, so a CSS rule body would be parsed as a lookup key and SILENTLY DROPPED. Design systems are emitted RAW; only untrusted data goes through ed_esc. Rule 12 at the boundary: ed_raw is for trusted template text, ed_esc for anything a person or a fetched page supplied. The two are deliberately different function names so a reviewer can see which is which. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 3 importers

nx_ad_serve.nx nx_syscalls.nx nx_nishi_editorial.nx nx_meal_page.nx nx_meal_skills_page.nx nx_site_build.nx

imports: nx_ad_serve.nxnx_syscalls.nx

imported by: nx_meal_page.nxnx_meal_skills_page.nxnx_site_build.nx

structs

none

consts

23const ED_TAB: i64 = 9

functions

25func ed_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
31func ed_empty() -> *u8
called by 1: mpg_render calls 1: sys_mmap
39func ed_raw(out: *u8, off: i64, s: *u8) -> i64 { return as_append(out, off, s) }
42func ed_esc(out: *u8, off: i64, s: *u8) -> i64 { return as_append_escaped(out, off, s, ed_len(s)) }
44func ed_num(out: *u8, off: i64, v: i64) -> i64
58func ed_money(out: *u8, off: i64, cents: i64) -> i64
74func ed_tokens_light(out: *u8, off: i64) -> i64
called by 1: ed_css calls 1: ed_raw
89func ed_tokens_dark(out: *u8, off: i64) -> i64
called by 1: ed_css calls 1: ed_raw
102func ed_css(out: *u8, off: i64) -> i64
260func ed_doc_open(out: *u8, off: i64, title: *u8) -> i64
275func ed_doc_close(out: *u8, off: i64) -> i64
280func ed_sec_open(out: *u8, off: i64, num: *u8, heading: *u8) -> i64
289func ed_sec_close(out: *u8, off: i64) -> i64 { return ed_raw(out, off, "</section>" as *u8) }
292func ed_note(out: *u8, off: i64, kind: *u8, label: *u8, body: *u8) -> i64
called by 2: mpg_rendermsp_render calls 2: ed_rawed_esc
305func ed_math_row(out: *u8, off: i64, label: *u8, cents: i64, total: i64, save: i64) -> i64
called by 1: mpg_render calls 3: ed_rawed_esced_money
320func ed_math_text(out: *u8, off: i64, label: *u8, value: *u8, total: i64) -> i64
calls 2: ed_rawed_esc
332func ed_tag(out: *u8, off: i64, cls: *u8, text: *u8) -> i64
called by 2: mpg_rendermsp_sources calls 2: ed_rawed_esc
351func ed_firm_css(out: *u8, off: i64) -> i64
called by 1: sb_build_site calls 1: ed_raw
411func ed_paper_css(out: *u8, off: i64) -> i64
called by 1: sb_build_site calls 1: ed_raw
430func ed_firm_nav_open(out: *u8, off: i64, wordmark: *u8, href: *u8) -> i64
called by 1: sb_ed_nav calls 2: ed_rawed_esc
438func ed_firm_nav_item(out: *u8, off: i64, label: *u8, href: *u8, current: i64) -> i64
called by 1: sb_ed_nav calls 2: ed_rawed_esc
446func ed_firm_nav_close(out: *u8, off: i64) -> i64 { return ed_raw(out, off, "</nav>" as *u8) }
called by 1: sb_ed_nav calls 1: ed_raw
454func ed_firm_mast_open(out: *u8, off: i64, eyebrow: *u8, h1: *u8, h1_em: *u8, thesis: *u8, cta1: *u8, cta1href: *u8, cta2: *u8, cta2href: *u8, hint: *u8) -> i64
called by 1: sb_build_site calls 3: ed_rawed_esced_len
479func ed_firm_mast_close(out: *u8, off: i64) -> i64 { return ed_raw(out, off, "</div></header>" as *u8) }
called by 1: sb_build_site calls 1: ed_raw
486func ed_art(out: *u8, off: i64, kind: i64) -> i64
called by 1: ed_artpanel calls 1: ed_raw
499func ed_artpanel(out: *u8, off: i64, kind: i64, label: *u8) -> i64
called by 1: sb_build_site calls 3: ed_rawed_arted_esc
520func ed_cell_open(out: *u8, off: i64, tier: *u8, name: *u8, note: *u8, href: *u8) -> i64
called by 1: sb_build_site calls 2: ed_rawed_esc
534func ed_subs_open(out: *u8, off: i64) -> i64 { return ed_raw(out, off, "<ul class='subs'>" as *u8) }
called by 1: sb_build_site calls 1: ed_raw
535func ed_subs_close(out: *u8, off: i64) -> i64 { return ed_raw(out, off, "</ul>" as *u8) }
called by 1: sb_build_site calls 1: ed_raw
536func ed_sub(out: *u8, off: i64, label: *u8, href: *u8) -> i64
called by 1: sb_build_site calls 2: ed_rawed_esc
543func ed_cell_close(out: *u8, off: i64, go: *u8, href: *u8) -> i64
called by 1: sb_build_site calls 2: ed_rawed_esc
552func ed_person(out: *u8, off: i64, name: *u8, role: *u8, bio: *u8, mono: *u8, pending: i64) -> i64
called by 1: sb_build_site calls 2: ed_rawed_esc
568func ed_consult(out: *u8, off: i64, phone: *u8, email: *u8, addr: *u8, hours: *u8, action: *u8, back: *u8, submit: *u8, note: *u8) -> i64
called by 1: sb_build_site calls 2: ed_rawed_esc
599func ed_ctabar(out: *u8, off: i64, title: *u8, line: *u8, cta: *u8, ctahref: *u8, phone: *u8) -> i64
called by 1: sb_build_site calls 2: ed_rawed_esc