code wiki / _hdl_build / nx_site_archetype.nx
nx_site_archetype.nx
buildroot/runtime/_hdl_build/nx_site_archetype.nx
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
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
structs
| none |
consts
| 15 | const SA_MAGIC_131072: i64 = 131072 |
| 16 | const SA_MAGIC_1024: i64 = 1024 |
| 17 | const SA_MAGIC_262144: i64 = 262144 |
| 19 | const 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>" |
| 27 | const SA_VARCAP: i64 = 40 // budget guard: max variation pages per run (fail-fast, never unbounded) |
functions
| 38 | func 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 } |
| 39 | func sa_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 40 | func 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 } |
| 41 | func sa_catn(d: *u8, o: i64, v: i64) -> i64 |
| 51 | func sa_req_find(arch: i64, key: *u8) -> *u8 |
| 74 | func sa_pat_count(h: *i64) -> i64 |
| 104 | func sa_brick_n(kind: *u8) -> i64 |
| 198 | func sa_rs(arch: i64, key: *u8, def: *u8) -> *u8 called by 5: sa_ritemsa_recipe_editorialsa_recipe_socialsa_recipe_mediasa_recipe_hub calls 1: sa_req_find |
| 204 | func sa_ritem(arch: i64, id: *u8, n: i64, suf: *u8, def: *u8) -> *u8 |
| 215 | func sa_req_load(path: *u8) -> i64 |
| 233 | func sa_theme(arch: i64) -> i64 called by 1: sa_recipe |
| 241 | func sa_disp(arch: i64) -> *u8 |
| 256 | func sa_s(arch: i64, field: i64) -> *u8 called by 11: sa_headlinesa_recipe_editorialsa_recipe_gallerysa_recipe_shopsa_recipe_socialsa_recipe_media+5 calls 1: sa_req_find |
| 381 | func sa_href(out: *u8, arch: i64) -> i64 |
| 392 | func 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 |
| 400 | func sa_proof(buf: *u8, o: i64, h2: *u8, sub: *u8, n0: *u8, q0: *u8, n1: *u8, q1: *u8, n2: *u8, q2: *u8) -> i64 |
| 408 | func sa_grid6(buf: *u8, o: i64, arch: i64, id: *u8, tag: *u8, h2: *u8, sub: *u8, label: *u8) -> i64 |
| 430 | func sa_headline(arch: i64) -> *u8 |
| 439 | func sa_recipe_editorial(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64 |
| 458 | func sa_recipe_gallery(arch: i64, secid: *u8, brand: *u8, title: *u8, buf: *u8) -> i64 |
| 476 | func sa_recipe_shop(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64 |
| 495 | func sa_recipe_social(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64 |
| 517 | func sa_recipe_media(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64 |
| 545 | func sa_recipe_hub(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64 |
| 565 | func sa_tok_at(seq: *u8, idx: i64, out: *u8) -> i64 called by 1: sa_recipe_seq |
| 588 | func 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 |
| 591 | func sa_recipe_seq(arch: i64, seq: *u8, theme: i64, brand: *u8, title: *u8, buf: *u8) -> i64 |
| 651 | func sa_recipe(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64 called by 1: sa_run calls 20: sa_recipe_editorialsa_recipe_shopsa_recipe_socialsa_recipe_mediasa_recipe_hubsa_recipe_gallery+14 |
| 725 | func sa_vname(arch: i64, key: *u8, out: *u8) -> i64 |
| 739 | func sa_gallery_index(codes: *i64, ncodes: i64, vk: *i64, vs: *i64, va: *i64, nv: i64, brand: *u8, buf: *u8) -> i64 |
| 788 | func sa_run(tpldir: *u8, corpusprefix: *u8, docroot: *u8, domain: *u8) -> i64 called by 4: mainmainmainmain calls 25: sys_mkdirss_opensa_pat_countsa_wsys_getdents64dirent_type+19 |
| 951 | func main(argc: i64, argv: *i64) -> i64 |