code wiki / _hdl_build / nx_meal_page.nx
nx_meal_page.nx
buildroot/runtime/_hdl_build/nx_meal_page.nx
about
nx_meal_page.nx -- THE SURFACE. Composes provenance + pantry + price + plan into one sovereign, zero-JS,
theme-aware page built on the nx_nishi_editorial design system.
THE TWO CREDIT STRIPS SIT ABOVE THE RECIPE AND STAY OUT OF ITS WAY: one 9.5px mono band, muted, no colour
flood, no image. They are present and legible, never a billboard. Each is FAIL-CLOSED -- with no recorded
source, the brought-to-you-by strip is OMITTED rather than rendered empty; with no valid ad selected, the
sponsor strip is OMITTED rather than filled with a house placeholder. An empty credit is a fake credit.
AD REUSE, DELIBERATELY SPLIT: the SELECTION and VALIDATION come from nx_adnet_slot (aslot_pick_b /
aslot_id_ok / aslot_click_ok) -- the fail-closed policy core the estate already gate-proved -- while only
the PRESENTATION is new here. Reusing the policy and adapting the markup is the whole point; copying
aslot_html would have forked ad security into a second place to fix.
FILTERS ARE LINKS, NOT SCRIPT. "Only what's on hand", "One stop away" and "More like this" are real hrefs
to pre-rendered variants, so the page works with JS off, degrades to nothing, and stays cacheable.
HONESTY CARRIED THROUGH TO THE PIXELS: an unpriced ingredient renders as NO PRICE, never as free; the
out-of-pocket total is only presented as complete when mc_total_is_complete says so; every price shows the
date and source it was recorded from; and the archived-copy line appears only when the bytes are actually
retrievable (ms_rot_state == MS_ROT_PROOF), never from a stored intent flag.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 6 imports · 2 importers
imports: nx_nishi_editorial.nxnx_meal_source.nxnx_meal_cost.nxnx_meal_plan.nxnx_adnet_slot.nxnx_syscalls.nx
imported by: nx_meal_emit.nxnx_meal_page_gate.nx
structs
| none |
consts
| 29 | const MPG_FLD: i64 = 1024 |
| 30 | const MPG_BIG: i64 = 4096 |
| 31 | const MPG_MAXI: i64 = 128 |
| 32 | const MPG_MAXR: i64 = 512 |
| 33 | const MPG_ADROW: i64 = 2048 |
functions
| 36 | func mpg_h1(out: *u8, off: i64, title: *u8) -> i64 |
| 59 | func mpg_item_name(meal_prefix: *u8, inv_prefix: *u8, domain: *u8, id: *u8, out: *u8) -> i64 |
| 69 | func mpg_credit_source(out: *u8, off: i64, meal_prefix: *u8, rid: *u8, warc: *u8, warclen: i64) -> i64 |
| 101 | func mpg_credit_sponsor(out: *u8, off: i64, adinv: *u8, adinvlen: i64, section: *u8, rot: i64) -> i64 |
| 127 | func mpg_ingredient(out: *u8, off: i64, meal_prefix: *u8, inv_prefix: *u8, domain: *u8, price_prefix: *u8, area: *u8, id: *u8, min_sale: i64) -> i64 |
| 182 | func mpg_render(out: *u8, meal_prefix: *u8, inv_prefix: *u8, price_prefix: *u8, rid: *u8, uid: *u8, warc: *u8, warclen: i64, adinv: *u8, adinvlen: i64, adrot: i64, min_sale: i64, slug: *u8, back: *u8, intake_live: i64) -> i64 |