code wiki / _hdl_build / nx_site_archetype.nx

nx_site_archetype.nx

buildroot/runtime/_hdl_build/nx_site_archetype.nx

53249 B964 linesdepth 5pulls 10 transitivereach 6 importersview sourcekind tooltopic site
docsdependenciesstructsconstsfunctions

about

nx_site_archetype.nx -- R5 of the SITE FACTORY: COMPOSE whole, award-tier, WCAG-AAA, responsive sites from the pattern corpus that nx_tpl_ingest (R4) built. For each archetype PRESENT in the corpus it emits a distinct full page (varied section set + theme + hero, one shared design system) through the gorgeous nx_sclass_kit v2 -- so every page is s-class + accessible + sovereign BY CONSTRUCTION (0 JS, 0 trackers, own tokens). Plus a GALLERY index that shows the range at a glance. This is the "get our generator going -> SOTA aesthetics + breadth" rung: consumed template STRUCTURE (R4) -> generated gorgeous sites (R5). usage: nx_site_archetype <template-dir> <corpus-prefix> <docroot> <domain> emits: <docroot>/index.html (gallery) + <docroot>/<archetype>.html (one per corpus archetype) + sitemap + robots Corpus-driven: walks the source templates, recomputes each content-addressed key, and confirms membership in the seg_store corpus (ss_hget) before composing -> the archetype SET comes from the corpus, not hardcoded. license_tier: ORIGINAL

dependencies 3 imports · 6 importers

nx_sclass_kit.nx nx_tpl_ingest.nx nx_kit2.nx nx_site_archetype.nx nx_brick_compose_gate.nx nx_site_archetype_gate.nx nx_site_handoff.nx nx_site_requirements.nx nx_site_requirements_gate.nx nx_site_wholesale.nx

imports: nx_sclass_kit.nxnx_tpl_ingest.nxnx_kit2.nx

imported by: nx_brick_compose_gate.nxnx_site_archetype_gate.nxnx_site_handoff.nxnx_site_requirements.nxnx_site_requirements_gate.nxnx_site_wholesale.nx

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sa_w sa_req_load ss_readall sys_openat_rd sys_lseek sys_mmap sys_read sys_close sa_run sys_mkdir ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn sys_mmap ↻ ss_cat ss_readall ↻ sys_munmap ss_cat ↻ ss_loadfile sys_map_file sys_openat_rd ↻ sys_lseek ↻ sys_close ↻ ss_readall ↻ ss_load_aux2 sys_mmap ↻ ss_cat ↻ ss_loadfile ↻ ss_r32 sys_munmap ↻ ssl_total_keys ss_r32 ↻ ssl_pow2 ssl_build ss_r32 ↻ ssl_hash_entry ss_r32 ↻

structs

none

consts

15const SA_MAGIC_131072: i64 = 131072
16const SA_MAGIC_1024: i64 = 1024
17const SA_MAGIC_262144: i64 = 262144
19const SA_ICON: *u8 = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2l3 7h7l-5.5 4 2 7L12 16l-6.5 4 2-7L2 9h7z\"/></svg>"
27const SA_VARCAP: i64 = 40 // budget guard: max variation pages per run (fail-fast, never unbounded)

functions

38func sa_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
39func sa_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
40func sa_cat(out: *u8, o: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){out[o]=s[i]; o=o+1; i=i+1} return o }
41func sa_catn(d: *u8, o: i64, v: i64) -> i64
51func sa_req_find(arch: i64, key: *u8) -> *u8
called by 2: sa_rssa_s calls 2: ti_arch_namesa_cat
74func sa_pat_count(h: *i64) -> i64
called by 1: sa_run calls 1: ss_r32
104func sa_brick_n(kind: *u8) -> i64
198func sa_rs(arch: i64, key: *u8, def: *u8) -> *u8
204func sa_ritem(arch: i64, id: *u8, n: i64, suf: *u8, def: *u8) -> *u8
215func sa_req_load(path: *u8) -> i64
called by 5: mainmainmainmainmain calls 1: ss_readall
233func sa_theme(arch: i64) -> i64
called by 1: sa_recipe
241func sa_disp(arch: i64) -> *u8
256func sa_s(arch: i64, field: i64) -> *u8
381func sa_href(out: *u8, arch: i64) -> i64
called by 1: sa_gallery_index calls 2: sa_catti_arch_name
392func sa_features(buf: *u8, o: i64, tag: *u8, h2: *u8, sub: *u8, t0: *u8, b0: *u8, t1: *u8, b1: *u8, t2: *u8, b2: *u8) -> i64
400func sa_proof(buf: *u8, o: i64, h2: *u8, sub: *u8, n0: *u8, q0: *u8, n1: *u8, q1: *u8, n2: *u8, q2: *u8) -> i64
408func sa_grid6(buf: *u8, o: i64, arch: i64, id: *u8, tag: *u8, h2: *u8, sub: *u8, label: *u8) -> i64
430func sa_headline(arch: i64) -> *u8
439func sa_recipe_editorial(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64
476func sa_recipe_shop(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64
495func sa_recipe_social(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64
517func sa_recipe_media(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64
545func sa_recipe_hub(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64
565func sa_tok_at(seq: *u8, idx: i64, out: *u8) -> i64
called by 1: sa_recipe_seq
588func sa_tokeq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while 1 == 1 { if (a[i] as i64) != (b[i] as i64) { return 0 } if a[i] == (0 as u8) { return 1 } i = i + 1 } return 1 }
called by 1: sa_recipe_seq
591func sa_recipe_seq(arch: i64, seq: *u8, theme: i64, brand: *u8, title: *u8, buf: *u8) -> i64
651func sa_recipe(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64
725func sa_vname(arch: i64, key: *u8, out: *u8) -> i64
called by 2: sa_runmain calls 2: sa_catti_arch_name
788func sa_run(tpldir: *u8, corpusprefix: *u8, docroot: *u8, domain: *u8) -> i64
951func main(argc: i64, argv: *i64) -> i64