1package home23import "encoding/base64"45// This file is shared, unchanged, by every Samouraï home realm, so the pages6// keep one visual identity. What differs lives in content.gno.78// toriiMask is the Samouraï Coop mark, redrawn as vectors: a torii gate cut9// out of a full circle, in a 480x480 box. Everything painted through the mask10// takes the shape of the mark.11const toriiMask = `<mask id="torii"><circle cx="238" cy="240" r="240" fill="#fff"/><g fill="#000">` +12 `<path d="M-10 90 Q238 164 490 90 L490 140 Q238 190 -10 140 Z"/>` +13 `<path d="M102 140 L165 140 L162 206 L96 206 Z"/>` +14 `<path d="M302 140 L364 140 L370 206 L304 206 Z"/>` +15 `<rect x="-10" y="205" width="500" height="41"/>` +16 `<path d="M89 245 L159 245 L145 490 L55 490 Z"/>` +17 `<rect x="-10" y="274" width="100" height="32"/>` +18 `<path d="M307 245 L377 245 L411 490 L321 490 Z"/>` +19 `<path d="M382 296 L490 398 L490 455 L390 358 Z"/>` +20 `</g></mask>`2122type heroText struct {23 kicker string // small red caps line above the title24 title string25 subtitle string26 tagline string // red monospace line27 footline string // grey monospace line28 alt string29}3031// heroSVG draws the page banner: the mark set in a red sun on the right, the32// text stack on the left.33func heroSVG(h heroText) string {34 return `<svg xmlns="http://www.w3.org/2000/svg" width="960" height="300" viewBox="0 0 960 300">` +35 `<defs><linearGradient id="bg" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#0e0e0e"/><stop offset="1" stop-color="#2a0c10"/></linearGradient>` +36 toriiMask + `</defs>` +37 `<rect width="960" height="300" rx="18" fill="url(#bg)"/>` +38 `<g stroke="#ffffff" stroke-opacity=".05"><path d="M0 60H960M0 120H960M0 180H960M0 240H960"/></g>` +39 `<circle cx="790" cy="150" r="128" fill="#e63946"/>` +40 `<g transform="translate(686 46) scale(.4333)"><rect width="480" height="480" fill="#f4efe6" mask="url(#torii)"/></g>` +41 `<text x="56" y="78" font-family="ui-monospace,Menlo,monospace" font-size="13" letter-spacing="3" fill="#e63946">` + xmlText(h.kicker) + `</text>` +42 `<text x="52" y="160" font-family="system-ui,-apple-system,Segoe UI,sans-serif" font-weight="800" font-size="76" fill="#ffffff">` + xmlText(h.title) + `</text>` +43 `<text x="56" y="200" font-family="system-ui,-apple-system,Segoe UI,sans-serif" font-size="22" fill="#e8e2d8">` + xmlText(h.subtitle) + `</text>` +44 `<text x="56" y="236" font-family="ui-monospace,Menlo,monospace" font-size="16" fill="#e63946">` + xmlText(h.tagline) + `</text>` +45 `<text x="56" y="266" font-family="ui-monospace,Menlo,monospace" font-size="12" fill="#8a8a8a">` + xmlText(h.footline) + `</text>` +46 `</svg>`47}4849func heroImage() string {50 return ")) + ")"52}53Append(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, slug string, body string)
Delete(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, slug string)
DeleteGallery(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, name string)
Get(slug string) string
HasHeart(addr string) bool
Heart(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string})
Hearts() int
Render(path string) string
Revision() int
Set(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, slug string, body string)
SetGallery(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, name string, spec string)
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.