code wiki / _hdl_build / nx_ad_banner_builder.nx

nx_ad_banner_builder.nx

buildroot/runtime/_hdl_build/nx_ad_banner_builder.nx

7112 B101 linesdepth 4pulls 5 transitivereach 3 importersview sourcekind librarytopic ad
docsdependenciesstructsconstsfunctions

about

nx_ad_banner_builder.nx -- LIB: the advertiser-facing BANNER BUILDER (the "iterating UI" for the banner generator). SERVER-RENDERED, ZERO JavaScript even in the builder itself: GET /ad/banner-builder shows the form; POST the same path re-renders the form (values repopulated) PLUS a live preview of the generated banner and a copy-paste box with its HTML. Generation is the sovereign organ (ab_emit_banner) -- the builder is just the form around it, so the produced banner keeps every invariant (0 third-party JS, self-contained, escaped, link-validated). Form values are HTML-escaped on repopulation (rule 12). DRY: composes nx_ad_banner (ab_emit_banner/ab_iab_size) + nx_ad_serve (as_append*/as_contains/as_len) + nx_http_form (field parse). license_tier: ORIGINAL

dependencies 4 imports · 3 importers

nx_ad_banner.nx nx_ad_serve.nx nx_http_form.nx nx_syscalls.nx nx_ad_banner_builder.nx nx_ad_banner_builder_gate.nx nx_ad_banner_daemon.nx nx_ad_banner_gated_daemon.nx

imports: nx_ad_banner.nxnx_ad_serve.nxnx_http_form.nxnx_syscalls.nx

imported by: nx_ad_banner_builder_gate.nxnx_ad_banner_daemon.nxnx_ad_banner_gated_daemon.nx

structs

none

consts

13const K_MAGIC_16384: i64 = 16384

functions

16func abb_get(body: *u8, n: i64, name: *u8, namelen: i64, out: *u8, cap: i64) -> i64
24func abb_kind(s: *u8, n: i64) -> i64 { if as_contains(s, n, "dynamic" as *u8) == 1 { return AB_DYNAMIC } return AB_STATIC }
called by 1: abb_render calls 1: as_contains
26func abb_theme(s: *u8, n: i64) -> i64
called by 1: abb_render calls 1: as_contains
33func abb_render(body: *u8, n: i64, out: *u8) -> i64
49func abb_opt(out: *u8, off: i64, val: *u8) -> i64
calls 1: as_append
56func abb_input(out: *u8, off: i64, label: *u8, name: *u8, body: *u8, n: i64) -> i64
69func abb_page(body: *u8, n: i64, out: *u8) -> i64
called by 2: mainmain calls 2: as_appendabb_input