code wiki / _hdl_build / nx_site_archetype.nx

nx_site_archetype.nx

buildroot/runtime/_hdl_build/nx_site_archetype.nx

53315 B965 linesdepth 6pulls 12 transitivereach 5 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 · 5 importers

nx_sclass_kit.nx nx_tpl_ingest.nx nx_kit2.nx nx_site_archetype.nx nx_brick_compose_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_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 nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_read sys_close sa_run ss_open ss_open2 ss_open3 sys_now_us sys_mmap ↻ sys_clock_gettime_mono sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss3_admit ss3_ann sys_now_us ↻ ss3_streq ss3_docs_size ss3_load_range ss_cat

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
52func sa_req_find(arch: i64, key: *u8) -> *u8
called by 2: sa_rssa_s calls 2: ti_arch_namesa_cat
75func sa_pat_count(h: *i64) -> i64
called by 1: sa_run calls 1: ss_r32
105func sa_brick_n(kind: *u8) -> i64
199func sa_rs(arch: i64, key: *u8, def: *u8) -> *u8
205func sa_ritem(arch: i64, id: *u8, n: i64, suf: *u8, def: *u8) -> *u8
216func sa_req_load(path: *u8) -> i64
called by 5: mainmainmainmainmain calls 1: ss_readall
234func sa_theme(arch: i64) -> i64
called by 1: sa_recipe
242func sa_disp(arch: i64) -> *u8
257func sa_s(arch: i64, field: i64) -> *u8
382func sa_href(out: *u8, arch: i64) -> i64
called by 1: sa_gallery_index calls 2: sa_catti_arch_name
393func 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
401func sa_proof(buf: *u8, o: i64, h2: *u8, sub: *u8, n0: *u8, q0: *u8, n1: *u8, q1: *u8, n2: *u8, q2: *u8) -> i64
409func sa_grid6(buf: *u8, o: i64, arch: i64, id: *u8, tag: *u8, h2: *u8, sub: *u8, label: *u8) -> i64
431func sa_headline(arch: i64) -> *u8
440func sa_recipe_editorial(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64
477func sa_recipe_shop(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64
496func sa_recipe_social(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64
518func sa_recipe_media(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64
546func sa_recipe_hub(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64
566func sa_tok_at(seq: *u8, idx: i64, out: *u8) -> i64
called by 1: sa_recipe_seq
589func 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
592func sa_recipe_seq(arch: i64, seq: *u8, theme: i64, brand: *u8, title: *u8, buf: *u8) -> i64
652func sa_recipe(arch: i64, brand: *u8, title: *u8, buf: *u8) -> i64
726func sa_vname(arch: i64, key: *u8, out: *u8) -> i64
called by 1: sa_run calls 2: sa_catti_arch_name
789func sa_run(tpldir: *u8, corpusprefix: *u8, docroot: *u8, domain: *u8) -> i64
952func main(argc: i64, argv: *i64) -> i64