nx_site_chrome.nx
buildroot/runtime/nx_site_chrome.nx
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
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 13 | const K_MAGIC_1024: i64 = 1024 |
| 14 | const K_MAGIC_65536: i64 = 65536 |
functions
| 16 | func 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 } |
| 17 | func wc(fd: i64, code: i64) -> i64 { let t: *u8 = sys_mmap(2); t[0] = code as u8; sys_write(fd, t, 1); return 0 } |
| 18 | func wn(fd: i64, v: i64) -> i64 |
| 24 | func 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 } |
| 25 | func c_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 33 | func w2(fd: i64, s: *u8) -> i64 |
| 40 | func field(buf: *u8, ls: i64, le: i64, idx: i64, out: *u8) -> i64 |
| 56 | func mark_svg(fd: i64) -> i64 |
| 61 | func health_of(led: *u8, ln: i64, route: *u8) -> i64 |
| 78 | func sec_name(i: i64) -> *u8 |
| 86 | func prim_route(i: i64) -> *u8 called by 1: emit_nav |
| 92 | func prim_label(i: i64) -> *u8 called by 1: emit_nav |
| 100 | func css_nav(fd: i64) -> i64 |
| 110 | func css_foot(fd: i64) -> i64 |
| 117 | func emit_nav(sbuf: *u8, sn: i64) -> i64 |
| 157 | func emit_foot(sbuf: *u8, sn: i64) -> i64 |
| 187 | func emit_xml(sbuf: *u8, sn: i64) -> i64 |
| 209 | func emit_doc(sbuf: *u8, sn: i64, is_home: i64) -> i64 |
| 280 | func emit_page(sbuf: *u8, sn: i64) -> i64 { emit_doc(sbuf, sn, 0); return 0 } |
| 281 | func emit_home(sbuf: *u8, sn: i64) -> i64 { emit_doc(sbuf, sn, 1); return 0 } |
| 283 | func main(argc: i64, argv: *i64) -> i64 |