code wiki / _hdl_build / nx_meal_page.nx

nx_meal_page.nx source

↩ module page · 391 lines · 22383 B

1// nx_meal_page.nx -- THE SURFACE. Composes provenance + pantry + price + plan into one sovereign, zero-JS, 2// theme-aware page built on the nx_nishi_editorial design system. 3// 4// THE TWO CREDIT STRIPS SIT ABOVE THE RECIPE AND STAY OUT OF ITS WAY: one 9.5px mono band, muted, no colour 5// flood, no image. They are present and legible, never a billboard. Each is FAIL-CLOSED -- with no recorded 6// source, the brought-to-you-by strip is OMITTED rather than rendered empty; with no valid ad selected, the 7// sponsor strip is OMITTED rather than filled with a house placeholder. An empty credit is a fake credit. 8// 9// AD REUSE, DELIBERATELY SPLIT: the SELECTION and VALIDATION come from nx_adnet_slot (aslot_pick_b / 10// aslot_id_ok / aslot_click_ok) -- the fail-closed policy core the estate already gate-proved -- while only 11// the PRESENTATION is new here. Reusing the policy and adapting the markup is the whole point; copying 12// aslot_html would have forked ad security into a second place to fix. 13// 14// FILTERS ARE LINKS, NOT SCRIPT. "Only what's on hand", "One stop away" and "More like this" are real hrefs 15// to pre-rendered variants, so the page works with JS off, degrades to nothing, and stays cacheable. 16// 17// HONESTY CARRIED THROUGH TO THE PIXELS: an unpriced ingredient renders as NO PRICE, never as free; the 18// out-of-pocket total is only presented as complete when mc_total_is_complete says so; every price shows the 19// date and source it was recorded from; and the archived-copy line appears only when the bytes are actually 20// retrievable (ms_rot_state == MS_ROT_PROOF), never from a stored intent flag. 21// license_tier: ORIGINAL No hw writes (Rule 26). 22import "nx_nishi_editorial.nx" 23import "nx_meal_source.nx" 24import "nx_meal_cost.nx" 25import "nx_meal_plan.nx" 26import "nx_adnet_slot.nx" 27import "nx_syscalls.nx" 28 29const MPG_FLD: i64 = 1024 30const MPG_BIG: i64 = 4096 31const MPG_MAXI: i64 = 128 32const MPG_MAXR: i64 = 512 33const MPG_ADROW: i64 = 2048 34 35// h1 with the final word set in italic accent -- the editorial masthead move. Both halves are escaped. 36func mpg_h1(out: *u8, off: i64, title: *u8) -> i64 { 37 let n: i64 = ed_len(title) 38 var cut: i64 = 0 - 1 39 var i: i64 = 0 40 while i < n { if title[i] == (32 as u8) { cut = i } i = i + 1 } 41 var o: i64 = ed_raw(out, off, "<h1>" as *u8) 42 if cut < 0 { 43 o = ed_esc(out, o, title) 44 } else { 45 let head: *u8 = sys_mmap(MPG_FLD) 46 var k: i64 = 0 47 while k < cut { head[k] = title[k]; k = k + 1 } 48 head[cut] = 0 as u8 49 o = ed_esc(out, o, head) 50 o = ed_raw(out, o, " <em>" as *u8) 51 let tail: *u8 = ((title as i64) + cut + 1) as *u8 52 o = ed_esc(out, o, tail) 53 o = ed_raw(out, o, "</em>" as *u8) 54 } 55 return ed_raw(out, o, "</h1>" as *u8) 56} 57 58// display name for an ingredient: the pantry's label when stocked, else the raw id (never blank). 59func mpg_item_name(meal_prefix: *u8, inv_prefix: *u8, domain: *u8, id: *u8, out: *u8) -> i64 { 60 if iv_field_of(inv_prefix, domain, id, 0, out) > 0 { return 1 } // this kitchen's own label wins 61 if mp_ing_name(meal_prefix, id, out) == 1 { return 1 } // else the ingredient catalogue 62 var k: i64 = 0 // else the join key -- never blank 63 while id[k] != (0 as u8) { out[k] = id[k]; k = k + 1 } 64 out[k] = 0 as u8 65 return 0 66} 67 68// ---- credit strip 1: where this recipe came from, and whether we still hold a copy ---- 69func mpg_credit_source(out: *u8, off: i64, meal_prefix: *u8, rid: *u8, warc: *u8, warclen: i64) -> i64 { 70 let st: i64 = ms_rot_state(meal_prefix, rid, warc, warclen) 71 if st == MS_ROT_NONE { return off } // FAIL-CLOSED: no source, no strip 72 let pub: *u8 = sys_mmap(MPG_FLD) 73 let url: *u8 = sys_mmap(MPG_FLD) 74 let lic: *u8 = sys_mmap(MPG_FLD) 75 ms_field(meal_prefix, rid, MS_F_PUBLISHER, pub) 76 ms_field(meal_prefix, rid, MS_F_URL, url) 77 ms_field(meal_prefix, rid, MS_F_LICENSE, lic) 78 var o: i64 = ed_raw(out, off, "<div class='credit'><span class='credit-label'>Brought to you by</span>" as *u8) 79 o = ed_raw(out, o, "<p class='credit-body'><b>" as *u8) 80 o = ed_esc(out, o, pub) 81 o = ed_raw(out, o, "</b> &middot; <a rel='noopener' href='" as *u8) 82 o = ed_esc(out, o, url) 83 o = ed_raw(out, o, "'>the original recipe</a>" as *u8) 84 if ed_len(lic) > 0 { 85 o = ed_raw(out, o, " &middot; " as *u8) 86 o = ed_esc(out, o, lic) 87 } 88 o = ed_raw(out, o, "</p>" as *u8) 89 if st == MS_ROT_PROOF { 90 let b: i64 = ms_archive_bytes(warc, warclen, url) 91 o = ed_raw(out, o, "<span class='credit-note kept'>Archived copy held &middot; " as *u8) 92 o = ed_num(out, o, b) 93 o = ed_raw(out, o, " bytes preserved, so this link cannot rot</span>" as *u8) 94 } else { 95 o = ed_raw(out, o, "<span class='credit-note risk'>Not yet preserved &middot; this link can rot</span>" as *u8) 96 } 97 return ed_raw(out, o, "</div>" as *u8) 98} 99 100// ---- credit strip 2: the sponsor, selected + validated by the adnet policy core ---- 101func mpg_credit_sponsor(out: *u8, off: i64, adinv: *u8, adinvlen: i64, section: *u8, rot: i64) -> i64 { 102 if adinvlen <= 0 { return off } // FAIL-CLOSED: no inventory, no strip 103 let row: *u8 = sys_mmap(MPG_ADROW) 104 var got: i64 = aslot_pick_b(adinv, adinvlen, section, rot, row, MPG_ADROW) 105 if got == 0 { got = aslot_pick_b(adinv, adinvlen, "any" as *u8, rot, row, MPG_ADROW) } 106 if got == 0 { return off } 107 let rlen: i64 = ad_slen(row) 108 let id: *u8 = sys_mmap(256) 109 let adv: *u8 = sys_mmap(512) 110 let clk: *u8 = sys_mmap(MPG_FLD) 111 aslot_field_b(row, rlen, 0, id, 256) 112 aslot_field_b(row, rlen, 1, adv, 512) 113 aslot_field_b(row, rlen, 3, clk, MPG_FLD) 114 if aslot_id_ok(id) == 0 { return off } // the estate's own validators, not new ones 115 if aslot_click_ok(clk) == 0 { return off } 116 var o: i64 = ed_raw(out, off, "<div class='credit'><span class='credit-label'>Session sponsored by</span>" as *u8) 117 o = ed_raw(out, o, "<p class='credit-body'><b>" as *u8) 118 o = ed_esc(out, o, adv) 119 o = ed_raw(out, o, "</b></p>" as *u8) 120 o = ed_raw(out, o, "<a class='credit-note' rel='noopener nofollow sponsored' href='/ad/click/" as *u8) 121 o = ed_esc(out, o, id) 122 o = ed_raw(out, o, "'>Visit sponsor &rarr;</a></div>" as *u8) 123 return o 124} 125 126// ---- one ingredient card ---- 127func 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 { 128 let st: i64 = mc_status(inv_prefix, domain, price_prefix, area, id) 129 let nm: *u8 = sys_mmap(MPG_FLD) 130 mpg_item_name(meal_prefix, inv_prefix, domain, id, nm) 131 var o: i64 = ed_raw(out, off, "<div class='cell' data-state='" as *u8) 132 if st == MC_HAVE { o = ed_raw(out, o, "have" as *u8) } 133 if st == MC_BUY { o = ed_raw(out, o, "buy" as *u8) } 134 if st == MC_UNPRICED { o = ed_raw(out, o, "alert" as *u8) } 135 o = ed_raw(out, o, "'><span class='cell-tier'>Ingredient</span><span class='cell-name'>" as *u8) 136 o = ed_esc(out, o, nm) 137 o = ed_raw(out, o, "</span><span class='cell-state'>" as *u8) 138 if st == MC_HAVE { o = ed_raw(out, o, "On hand" as *u8) } 139 if st == MC_BUY { o = ed_raw(out, o, "To buy" as *u8) } 140 if st == MC_UNPRICED { o = ed_raw(out, o, "No price" as *u8) } 141 o = ed_raw(out, o, "</span><p class='cell-note'>" as *u8) 142 if st == MC_HAVE { 143 let unit: *u8 = sys_mmap(256) 144 let loc: *u8 = sys_mmap(256) 145 iv_field_of(inv_prefix, domain, id, 3, unit) 146 iv_field_of(inv_prefix, domain, id, 4, loc) 147 o = ed_num(out, o, iv_qty(inv_prefix, domain, id)) 148 if ed_len(unit) > 0 { o = ed_raw(out, o, " " as *u8); o = ed_esc(out, o, unit) } 149 if ed_len(loc) > 0 { o = ed_raw(out, o, " in the " as *u8); o = ed_esc(out, o, loc) } 150 o = ed_raw(out, o, " &middot; nothing to buy" as *u8) 151 } 152 if st == MC_BUY { 153 let sid: *u8 = sys_mmap(256) 154 let p: i64 = mc_unit_price(price_prefix, area, id, sid) 155 let nmst: *u8 = sys_mmap(512) 156 pr_store_field(price_prefix, sid, 0, nmst) 157 o = ed_money(out, o, p) 158 o = ed_raw(out, o, " at " as *u8) 159 o = ed_esc(out, o, nmst) 160 let d: *u8 = sys_mmap(256) 161 if mc_price_asof(price_prefix, area, id, d) > 0 { 162 o = ed_raw(out, o, " &middot; recorded " as *u8) 163 o = ed_esc(out, o, d) 164 } 165 if mc_is_on_sale(price_prefix, area, id, min_sale) == 1 { 166 o = ed_raw(out, o, " &middot; " as *u8) 167 o = ed_money(out, o, mc_sale_delta(price_prefix, area, id)) 168 o = ed_raw(out, o, " under the area median" as *u8) 169 } 170 } 171 if st == MC_UNPRICED { 172 o = ed_raw(out, o, "No price recorded in " as *u8) 173 o = ed_esc(out, o, area) 174 o = ed_raw(out, o, " &middot; excluded from the total rather than counted as free" as *u8) 175 } 176 return ed_raw(out, o, "</p></div>" as *u8) 177} 178 179// ---- the whole page ---- 180// `intake_live` must be a MEASUREMENT taken by the caller (a real connect to the intake port), never a config 181// belief. When it is 0 the contact forms are not rendered at all -- see the section-04 branch for why. 182func 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 { 183 // unit 184 let ulabel: *u8 = sys_mmap(MPG_FLD) 185 let ukind: *u8 = sys_mmap(256) 186 let domain: *u8 = sys_mmap(256) 187 let area: *u8 = sys_mmap(256) 188 mp_unit_field(meal_prefix, uid, MP_U_LABEL, ulabel) 189 mp_unit_field(meal_prefix, uid, MP_U_KIND, ukind) 190 mp_unit_field(meal_prefix, uid, MP_U_DOMAIN, domain) 191 mp_unit_field(meal_prefix, uid, MP_U_AREA, area) 192 193 // recipe 194 let title: *u8 = sys_mmap(MPG_FLD) 195 let blurb: *u8 = sys_mmap(MPG_BIG) 196 mp_field(meal_prefix, rid, MP_F_TITLE, title) 197 mp_field(meal_prefix, rid, MP_F_BLURB, blurb) 198 let serves: i64 = mp_serves(meal_prefix, rid) 199 let items: *i64 = sys_mmap(8 * MPG_MAXI) as *i64 200 let ni: i64 = mp_items(meal_prefix, rid, items) 201 202 // cost 203 let sum: *i64 = sys_mmap(8 * MC_SLOTS) as *i64 204 mc_meal(inv_prefix, domain, price_prefix, area, items, ni, min_sale, sum) 205 206 var o: i64 = ed_doc_open(out, 0, title) 207 208 // ---------- masthead ---------- 209 o = ed_raw(out, o, "<header class='mast'><p class='mast-eyebrow'>Meal plan &middot; " as *u8) 210 o = ed_esc(out, o, ukind) 211 o = ed_raw(out, o, "</p>" as *u8) 212 o = mpg_h1(out, o, title) 213 o = ed_raw(out, o, "<p class='thesis'>" as *u8) 214 o = ed_esc(out, o, blurb) 215 o = ed_raw(out, o, "</p><div class='mast-meta'>" as *u8) 216 o = ed_raw(out, o, "<span><b>Serves</b> " as *u8) 217 o = ed_num(out, o, serves) 218 o = ed_raw(out, o, "</span><span><b>Cooking for</b> " as *u8) 219 o = ed_esc(out, o, ulabel) 220 o = ed_raw(out, o, "</span><span><b>On hand</b> " as *u8) 221 o = ed_num(out, o, sum[MC_N_HAVE]) 222 o = ed_raw(out, o, " of " as *u8) 223 o = ed_num(out, o, ni) 224 o = ed_raw(out, o, "</span><span><b>Area</b> " as *u8) 225 o = ed_esc(out, o, area) 226 o = ed_raw(out, o, "</span></div></header>" as *u8) 227 228 // ---------- the two credit strips ---------- 229 o = ed_raw(out, o, "<div class='credits'>" as *u8) 230 o = mpg_credit_source(out, o, meal_prefix, rid, warc, warclen) 231 o = mpg_credit_sponsor(out, o, adinv, adinvlen, "kitchen" as *u8, adrot) 232 o = ed_raw(out, o, "</div>" as *u8) 233 234 // ---------- 01 the dish ---------- 235 o = ed_sec_open(out, o, "01" as *u8, "The dish" as *u8) 236 o = ed_raw(out, o, "<p class='lede'>Every ingredient checked against this kitchen's actual stock, then against recorded prices in the area. Nothing here is estimated.</p>" as *u8) 237 o = ed_raw(out, o, "<div class='grid'>" as *u8) 238 var i: i64 = 0 239 while i < ni { 240 o = mpg_ingredient(out, o, meal_prefix, inv_prefix, domain, price_prefix, area, items[i] as *u8, min_sale) 241 i = i + 1 242 } 243 o = ed_raw(out, o, "</div><p class='key'>Green already in the kitchen &middot; Amber to buy, price recorded &middot; Red no price on record</p>" as *u8) 244 o = ed_sec_close(out, o) 245 246 // ---------- 02 the cost ---------- 247 o = ed_sec_open(out, o, "02" as *u8, "What this costs you today" as *u8) 248 o = ed_raw(out, o, "<div class='math'><div class='math-rows'>" as *u8) 249 let hl: *u8 = sys_mmap(256) 250 var ho: i64 = ed_raw(hl, 0, "Already in the pantry, " as *u8) 251 ho = ed_num(hl, ho, sum[MC_N_HAVE]) 252 ho = ed_raw(hl, ho, " items" as *u8) 253 hl[ho] = 0 as u8 254 o = ed_math_row(out, o, hl, sum[MC_PANTRY_CENTS], 0, 0) 255 let bl: *u8 = sys_mmap(256) 256 var bo: i64 = ed_raw(bl, 0, "To buy, " as *u8) 257 bo = ed_num(bl, bo, sum[MC_N_BUY]) 258 bo = ed_raw(bl, bo, " items at the cheapest recorded price" as *u8) 259 bl[bo] = 0 as u8 260 o = ed_math_row(out, o, bl, sum[MC_BUY_CENTS], 0, 0) 261 o = ed_math_row(out, o, "Of which, below the area median" as *u8, sum[MC_SALE_CENTS], 0, 1) 262 o = ed_math_row(out, o, "Out of pocket today" as *u8, sum[MC_BUY_CENTS], 1, 0) 263 o = ed_raw(out, o, "</div></div>" as *u8) 264 265 // the completeness caveat -- only rendered when the total is genuinely incomplete 266 if mc_total_is_complete(sum) == 0 { 267 let cl: *u8 = sys_mmap(MPG_BIG) 268 var co: i64 = ed_num(cl, 0, sum[MC_N_UNPRICED]) 269 co = ed_raw(cl, co, " ingredient(s) have no recorded price in this area, so the figure above is what the PRICED items cost -- not what the meal costs. They are held out of the total deliberately: counting an unknown as zero would make this dish look cheaper than it is." as *u8) 270 cl[co] = 0 as u8 271 o = ed_note(out, o, "flag" as *u8, "This total is incomplete" as *u8, cl) 272 } 273 274 // where to shop -- only when ONE store can actually fill the whole list 275 let bi: *i64 = sys_mmap(8 * MPG_MAXI) as *i64 276 let bc: *i64 = sys_mmap(8 * MPG_MAXI) as *i64 277 let nb: i64 = mc_buy_list(inv_prefix, domain, price_prefix, area, items, ni, bi, bc) 278 if nb > 0 { 279 let sid: *u8 = sys_mmap(256) 280 let basket: i64 = mc_best_store(price_prefix, area, bi, nb, sid) 281 if basket >= 0 { 282 let snm: *u8 = sys_mmap(512) 283 pr_store_field(price_prefix, sid, 0, snm) 284 o = ed_raw(out, o, "<p class='kicker'>One stop: " as *u8) 285 o = ed_esc(out, o, snm) 286 o = ed_raw(out, o, " carries every item on this list for " as *u8) 287 o = ed_money(out, o, basket) 288 o = ed_raw(out, o, ". Stores that stock only part of the basket are excluded, however cheap they look.</p>" as *u8) 289 } else { 290 o = ed_note(out, o, "open" as *u8, "No single store covers this list" as *u8, "Every store in the area is missing at least one item, so there is no honest one-stop recommendation. The per-ingredient prices above each name the shop they came from." as *u8) 291 } 292 } 293 o = ed_sec_close(out, o) 294 295 // ---------- 03 more to cook ---------- 296 o = ed_sec_open(out, o, "03" as *u8, "Other things you could make" as *u8) 297 o = ed_raw(out, o, "<ul class='filters'>" as *u8) 298 o = ed_raw(out, o, "<li><a aria-current='page' href='#'>This recipe</a></li>" as *u8) 299 o = ed_raw(out, o, "<li><a href='/kitchen/on-hand'>Only what's on hand</a></li>" as *u8) 300 o = ed_raw(out, o, "<li><a href='/kitchen/one-stop'>One stop away</a></li>" as *u8) 301 o = ed_raw(out, o, "<li><a href='/kitchen-skills.html'>Skills &amp; time</a></li>" as *u8) 302 o = ed_raw(out, o, "<li><a href='/kitchen/all'>The whole book</a></li>" as *u8) 303 o = ed_raw(out, o, "</ul>" as *u8) 304 305 let sr: *i64 = sys_mmap(8 * MPG_MAXR) as *i64 306 let ss: *i64 = sys_mmap(8 * MPG_MAXR) as *i64 307 let ns: i64 = mp_similar(meal_prefix, rid, sr, ss, 8) 308 if ns > 0 { 309 o = ed_raw(out, o, "<div class='scroller'><table><thead><tr><th>Dish</th><th>Shares</th><th>Overlap</th><th>Missing here</th><th>Read</th></tr></thead><tbody>" as *u8) 310 var k: i64 = 0 311 while k < ns { 312 let cand: *u8 = sr[k] as *u8 313 let ct: *u8 = sys_mmap(MPG_FLD) 314 mp_field(meal_prefix, cand, MP_F_TITLE, ct) 315 let miss: i64 = mp_missing(inv_prefix, domain, meal_prefix, cand) 316 o = ed_raw(out, o, "<tr" as *u8) 317 if miss == 0 { o = ed_raw(out, o, " data-hi" as *u8) } 318 o = ed_raw(out, o, "><td>" as *u8) 319 o = ed_esc(out, o, ct) 320 o = ed_raw(out, o, "</td><td class='num'>" as *u8) 321 o = ed_num(out, o, mp_shared(meal_prefix, rid, cand)) 322 o = ed_raw(out, o, " ingredients</td><td class='num'>" as *u8) 323 o = ed_num(out, o, ss[k]) 324 o = ed_raw(out, o, "&#8240;</td><td class='num'>" as *u8) 325 o = ed_num(out, o, miss) 326 o = ed_raw(out, o, "</td><td>" as *u8) 327 if miss == 0 { o = ed_tag(out, o, "have" as *u8, "cook it now" as *u8) } 328 if miss == 1 { o = ed_tag(out, o, "buy" as *u8, "one item away" as *u8) } 329 if miss > 1 { o = ed_tag(out, o, "mute" as *u8, "a shop first" as *u8) } 330 o = ed_raw(out, o, "</td></tr>" as *u8) 331 k = k + 1 332 } 333 o = ed_raw(out, o, "</tbody><caption>Overlap is the share of the two ingredient lists that is common to both, in parts per thousand. 1000 means the same ingredients entirely. Dishes sharing nothing with this one are left out rather than padded in.</caption></table></div>" as *u8) 334 } else { 335 o = ed_raw(out, o, "<p>Nothing else in the book shares an ingredient with this dish yet.</p>" as *u8) 336 } 337 o = ed_sec_close(out, o) 338 339 // ---------- 04 talk to the kitchen ---------- 340 o = ed_sec_open(out, o, "04" as *u8, "Talk to the kitchen" as *u8) 341 if intake_live == 1 { 342 o = ed_raw(out, o, "<div class='tracks'>" as *u8) 343 344 o = ed_raw(out, o, "<div class='track'><h3>Leave the chef a note</h3>" as *u8) 345 o = ed_raw(out, o, "<p class='form-hint'>Cooked it? Changed something? The chef reads these. No address of theirs is published, so this cannot be harvested or hammered.</p>" as *u8) 346 o = ed_raw(out, o, "<form class='form' method='post' action='/intake/" as *u8) 347 o = ed_esc(out, o, slug) 348 o = ed_raw(out, o, "-chef'>" as *u8) 349 o = ed_raw(out, o, "<label>Your name<input name='name' maxlength='120' autocomplete='name'></label>" as *u8) 350 o = ed_raw(out, o, "<label>Email, only if you want a reply<input name='email' type='email' maxlength='160' autocomplete='email'></label>" as *u8) 351 o = ed_raw(out, o, "<label>Your note<textarea name='message' maxlength='1000' required></textarea></label>" as *u8) 352 o = ed_raw(out, o, "<input class='hp' type='text' name='website' tabindex='-1' aria-hidden='true' autocomplete='off'>" as *u8) 353 o = ed_raw(out, o, "<input type='hidden' name='back' value='" as *u8) 354 o = ed_esc(out, o, back) 355 o = ed_raw(out, o, "'><button type='submit'>Send to the chef</button></form></div>" as *u8) 356 357 o = ed_raw(out, o, "<div class='track'><h3>Something wrong on this page?</h3>" as *u8) 358 o = ed_raw(out, o, "<p class='form-hint'>A wrong price, a dead link, a bug, a complaint. This one routes to us, not the chef, and we would rather hear it than not.</p>" as *u8) 359 o = ed_raw(out, o, "<form class='form' method='post' action='/intake/" as *u8) 360 o = ed_esc(out, o, slug) 361 o = ed_raw(out, o, "-support'>" as *u8) 362 o = ed_raw(out, o, "<label>Your name<input name='name' maxlength='120' autocomplete='name'></label>" as *u8) 363 o = ed_raw(out, o, "<label>Email, only if you want a reply<input name='email' type='email' maxlength='160' autocomplete='email'></label>" as *u8) 364 o = ed_raw(out, o, "<label>What happened<textarea name='message' maxlength='1000' required></textarea></label>" as *u8) 365 o = ed_raw(out, o, "<input class='hp' type='text' name='website' tabindex='-1' aria-hidden='true' autocomplete='off'>" as *u8) 366 o = ed_raw(out, o, "<input type='hidden' name='back' value='" as *u8) 367 o = ed_esc(out, o, back) 368 o = ed_raw(out, o, "'><button type='submit'>Report it</button></form></div>" as *u8) 369 370 o = ed_raw(out, o, "</div>" as *u8) 371 o = ed_note(out, o, ed_empty(), "Why there is no email address here" as *u8, "A published address gets scraped and then hammered forever. These boxes post to our own intake, carry a trap field no person can see or tab into, cap the body at the door, and strip the separator bytes that would corrupt the record. Nothing is forwarded to an inbox you could flood." as *u8) 372 } else { 373 // FAIL-CLOSED. The intake core is built and 8/8 gate-proven, but if nothing is LISTENING then a form 374 // here would post into the void. A dead form is a placeholder that reads as a real claim -- the exact 375 // defect this estate has already banked against its own generated sites. So the section says what is 376 // true and renders no form at all. Suppressing a feature beats faking one. 377 o = ed_note(out, o, "flag" as *u8, "The note box is not open yet" as *u8, "The intake service that would receive your message is built and gate-proven, but nothing is answering on this host right now, so there is no form here. A box that quietly swallows what you write is worse than no box. When the service is running this section becomes a real, spam-proof note to the chef and a separate line to us for bugs and complaints." as *u8) 378 } 379 o = ed_sec_close(out, o) 380 381 // ---------- colophon ---------- 382 o = ed_raw(out, o, "<footer class='colophon'>" as *u8) 383 o = ed_raw(out, o, "<p>Prices are dated OBSERVATIONS with a named source, not live lookups; each one shows when it was recorded. An ingredient with no observation is reported as such and held out of the total.</p>" as *u8) 384 o = ed_raw(out, o, "<p>The source recipe is preserved as a WARC/1.0 resource record (ISO 28500, the format the Internet Archive uses), and the archived-copy line appears only when those bytes are actually retrievable.</p>" as *u8) 385 o = ed_raw(out, o, "<p>Sovereign page: no JavaScript, no third-party requests, no cookie, no visitor identifier. Sponsorship is first-party and rotates on time alone.</p>" as *u8) 386 o = ed_raw(out, o, "</footer>" as *u8) 387 388 o = ed_doc_close(out, o) 389 out[o] = 0 as u8 390 return o 391}