code wiki / (root) / nx_site_chrome.nx

nx_site_chrome.nx

buildroot/runtime/nx_site_chrome.nx

23694 B336 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind orphan librarytopic site
docsdependenciesstructsconstsfunctions

about

nx_site_chrome.nx -- SOVEREIGN site-wide navigation authority. Reads knowledge/site/surfaces.reg (SSOT of every visitor surface: route|section|title|icon|scope|order|desc) and emits, per mode: gate -- self-test + liar-kill (surfaces>=1, sections present, required fields non-empty) header -- global responsive nav bar fragment (brand + primary links + pure-CSS hamburger mega-menu) footer -- grouped footer sitemap fragment sitemapxml -- real sitemap.xml (sitemaps.org 0.9 urlset, public surfaces) page -- complete human /sitemap page (chrome + full grouped index of EVERY surface) This makes ALL assets discoverable from one place, on desktop and mobile, ZERO JavaScript (checkbox-hack menu), a11y (skip-link, aria, focus-visible, >=44px touch targets), light/dark. nx_cc traps honored: no '#'/'!' in string literals -> wc(35)/wc(33); w2 turns ' into " for attrs; CSS uses class selectors (no id '#'); no else-if chains. license_tier: ORIGINAL expect_exit:0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_site_chrome.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

structs

none

consts

13const K_MAGIC_1024: i64 = 1024
14const K_MAGIC_65536: i64 = 65536

functions

16func w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 3: wnemit_navemit_foot calls 1: sys_write
17func wc(fd: i64, code: i64) -> i64 { let t: *u8 = sys_mmap(2); t[0] = code as u8; sys_write(fd, t, 1); return 0 }
called by 1: w2 calls 2: sys_mmapsys_write
18func wn(fd: i64, v: i64) -> i64
24func streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
25func c_read(path: *u8, buf: *u8, cap: i64) -> i64
33func w2(fd: i64, s: *u8) -> i64
40func field(buf: *u8, ls: i64, le: i64, idx: i64, out: *u8) -> i64
called by 2: emit_navemit_foot
56func mark_svg(fd: i64) -> i64
called by 2: emit_navemit_foot calls 1: w2
61func health_of(led: *u8, ln: i64, route: *u8) -> i64
78func sec_name(i: i64) -> *u8
called by 2: emit_navemit_foot
86func prim_route(i: i64) -> *u8
called by 1: emit_nav
92func prim_label(i: i64) -> *u8
called by 1: emit_nav
100func css_nav(fd: i64) -> i64
called by 1: emit_nav calls 1: w2
110func css_foot(fd: i64) -> i64
called by 1: emit_foot calls 1: w2
117func emit_nav(sbuf: *u8, sn: i64) -> i64
157func emit_foot(sbuf: *u8, sn: i64) -> i64
187func emit_xml(sbuf: *u8, sn: i64) -> i64
209func emit_doc(sbuf: *u8, sn: i64, is_home: i64) -> i64
280func emit_page(sbuf: *u8, sn: i64) -> i64 { emit_doc(sbuf, sn, 0); return 0 }
281func emit_home(sbuf: *u8, sn: i64) -> i64 { emit_doc(sbuf, sn, 1); return 0 }
283func main(argc: i64, argv: *i64) -> i64