diff --git a/packages/sitetile/astro/content/forms.md b/packages/sitetile/astro/content/forms.md index 3dd372d..22cba64 100644 --- a/packages/sitetile/astro/content/forms.md +++ b/packages/sitetile/astro/content/forms.md @@ -1,6 +1,6 @@ --- sitetile-page: forms -title: Form coverage โ€” wired to an inbox, and deliberately not +title: Form coverage โ€” wired to an inbox, wired to the reef, and deliberately not lang: en-US --- @@ -22,6 +22,19 @@ action in that app. See the note in Form.astro. - Something else ### Tell us more {textarea} +## Wired to the reef inbox +%% sitetile: form action=inbox submit="Send it" %% +The one special `action=` value: `inbox` posts to this site's own same-origin +forwarder (`/__reef/inbox`, relayed by the site's own `_worker.js`) โ€” no +cross-origin CSRF wall to hit. `method=` is ignored; the forwarder only accepts +POST. `Text` below is deliberately a field label that collides with one of the +forwarder's reserved wire names. + +### Your name +### Email {email} +### Text +### Tell us more {textarea} + ## Not wired to anything %% sitetile: form submit="Send it" %% ๐Ÿฉธ The same coral with nowhere to send. Before 2026-08-15 this rendered a LIVE diff --git a/packages/sitetile/astro/smoke-build.mjs b/packages/sitetile/astro/smoke-build.mjs index 5aba47d..87b2cb2 100644 --- a/packages/sitetile/astro/smoke-build.mjs +++ b/packages/sitetile/astro/smoke-build.mjs @@ -99,6 +99,12 @@ const ALLOWED_INLINE = [ // Signatures are STRING LITERALS, not identifiers โ€” minification renames locals every build. ['signet locale banner (Lingo suggest-your-language)', 'signet-locale-banner-dismiss'], ['language chooser (/language route)', '[data-language-link]'], + // form: action=inbox only. Progressive enhancement over a real POST/GET-less static + // build โ€” the coral cannot read `?inbox=` at build time, so a tiny script toggles the + // pre-rendered (server-hidden) status line after a real submit redirects back here. A + // no-JS visitor still gets a working
; they + // just don't see the thank-you/error line swap in. + ['form inbox status (action=inbox only, self-gating on ?inbox=)', '[data-inbox-sent]'], ]; const ALLOWED_CHUNKS = [ ['pagetile reader', 'ptr-mode:'], @@ -380,8 +386,45 @@ const checks = [ // endpoint directly and 403s for every real visitor. ['form: no coral emits a cross-origin post to feelreef', () => !/action="https:\/\/feelreef\.com/.test(forms) && !/name="kind"/.test(forms)], - ['form: still zero JavaScript โ€” it has to work with scripts off', () => - !/ + )} diff --git a/packages/sitetile/astro/src/packages/lingo/locale.mjs b/packages/sitetile/astro/src/packages/lingo/locale.mjs index a054ca6..fda17df 100644 --- a/packages/sitetile/astro/src/packages/lingo/locale.mjs +++ b/packages/sitetile/astro/src/packages/lingo/locale.mjs @@ -156,6 +156,7 @@ const LINGO_UI = { noMatches: 'No matching posts', clearFilter: '\u2715 Clear filter', monthShort: (n) => (EN_MONTHS[Number(n) - 1] || String(n)).slice(0, 3), ageBack: 'Go back', ageConfirm: 'Yes', notFoundTitle: 'Page not found', notFoundBody: "That address doesn't exist on this site.", notFoundHome: 'Go to the homepage', + inboxSent: "Thanks โ€” your message is on its way.", inboxError: 'Could not send โ€” please try again.', month: (n) => EN_MONTHS[Number(n) - 1] || String(n), countWrap: [' (', ')'] }, 'zh-TW': { recent: 'ๆœ€ๆ–ฐๆ–‡็ซ ', tags: 'ๆจ™็ฑค้›ฒ', archive: 'ๆ‰€ๆœ‰่ฒผๆ–‡', search: 'ๆœๅฐ‹......', tagPrefix: '้กฏ็คบๅ…ทๆœ‰ไปฅไธ‹ๆจ™็ฑค็š„ๆ–‡็ซ ๏ผš', datePrefix: '็™ผ่กจๆ–ผ๏ผš', @@ -163,6 +164,7 @@ const LINGO_UI = { noMatches: 'ๆฒ’ๆœ‰็ฌฆๅˆ็š„ๆ–‡็ซ ', clearFilter: '\u2715 ๆธ…้™ค็ฏฉ้ธ', monthShort: (n) => `${Number(n)}ๆœˆ`, ageBack: '่ฟ”ๅ›ž', ageConfirm: 'ๆ˜ฏ', notFoundTitle: 'ๆ‰พไธๅˆฐ้ ้ข', notFoundBody: '้€™ๅ€‹็ถฒ็ซ™ไธŠๆฒ’ๆœ‰้€™ๅ€‹็ถฒๅ€ใ€‚', notFoundHome: 'ๅ›žๅˆฐ้ฆ–้ ', + inboxSent: '่จŠๆฏๅทฒ้€ๅ‡บ๏ผŒ่ฌ่ฌใ€‚', inboxError: 'ๅ‚ณ้€ๅคฑๆ•—๏ผŒ่ซ‹ๅ†่ฉฆไธ€ๆฌกใ€‚', month: (n) => `${Number(n)}ๆœˆ`, countWrap: ['๏ผˆ', '๏ผ‰'] }, 'ja-JP': { recent: 'ๆœ€ๆ–ฐใฎ่จ˜ไบ‹', tags: 'ใ‚ฟใ‚ฐใ‚ฏใƒฉใ‚ฆใƒ‰', archive: 'ใ™ในใฆใฎ่จ˜ไบ‹', search: 'ๆคœ็ดข......', tagPrefix: 'ใ‚ฟใ‚ฐ๏ผš', datePrefix: 'ๆŠ•็จฟๆ—ฅ๏ผš', @@ -170,6 +172,7 @@ const LINGO_UI = { noMatches: 'ไธ€่‡ดใ™ใ‚‹่จ˜ไบ‹ใฏใ‚ใ‚Šใพใ›ใ‚“', clearFilter: '\u2715 ็ตžใ‚Š่พผใฟใ‚’่งฃ้™ค', monthShort: (n) => `${Number(n)}ๆœˆ`, ageBack: 'ๆˆปใ‚‹', ageConfirm: 'ใฏใ„', notFoundTitle: 'ใƒšใƒผใ‚ธใŒ่ฆ‹ใคใ‹ใ‚Šใพใ›ใ‚“', notFoundBody: 'ใ“ใฎใ‚ตใ‚คใƒˆใซใใฎใ‚ขใƒ‰ใƒฌใ‚นใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚', notFoundHome: 'ใƒ›ใƒผใƒ ใธ', + inboxSent: '้€ไฟกใ—ใพใ—ใŸใ€‚ใ‚ใ‚ŠใŒใจใ†ใ”ใ–ใ„ใพใ™ใ€‚', inboxError: '้€ไฟกใงใใพใ›ใ‚“ใงใ—ใŸใ€‚ใ‚‚ใ†ไธ€ๅบฆใŠ่ฉฆใ—ใใ ใ•ใ„ใ€‚', month: (n) => `${Number(n)}ๆœˆ`, countWrap: ['๏ผˆ', '๏ผ‰'] }, 'ko-KR': { recent: '์ตœ๊ทผ ๊ธ€', tags: 'ํƒœ๊ทธ ํด๋ผ์šฐ๋“œ', archive: '๋ชจ๋“  ๊ธ€', search: '๊ฒ€์ƒ‰...', tagPrefix: 'ํƒœ๊ทธ: ', datePrefix: '๊ฒŒ์‹œ์ผ: ', @@ -177,6 +180,7 @@ const LINGO_UI = { noMatches: '์ผ์น˜ํ•˜๋Š” ๊ธ€์ด ์—†์Šต๋‹ˆ๋‹ค', clearFilter: '\u2715 ํ•„ํ„ฐ ํ•ด์ œ', monthShort: (n) => `${Number(n)}์›”`, ageBack: '๋Œ์•„๊ฐ€๊ธฐ', ageConfirm: '์˜ˆ', notFoundTitle: 'ํŽ˜์ด์ง€๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค', notFoundBody: '์ด ์‚ฌ์ดํŠธ์— ํ•ด๋‹น ์ฃผ์†Œ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.', notFoundHome: 'ํ™ˆ์œผ๋กœ', + inboxSent: '๋ฉ”์‹œ์ง€๊ฐ€ ์ „์†ก๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.', inboxError: '์ „์†กํ•˜์ง€ ๋ชปํ–ˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์‹œ ์‹œ๋„ํ•ด ์ฃผ์„ธ์š”.', month: (n) => `${Number(n)}์›”`, countWrap: [' (', ')'] }, }; /**