package home import "encoding/base64" // Adapted from the banner every Samouraï home realm shares, with a cyan accent // in place of the red. What differs between pages lives in content.gno. // toriiMask is the Samouraï Coop mark, redrawn as vectors: a torii gate cut // out of a full circle, in a 480x480 box. Everything painted through the mask // takes the shape of the mark. const toriiMask = `` + `` + `` + `` + `` + `` + `` + `` + `` + `` type heroText struct { kicker string // small cyan caps line above the title title string subtitle string tagline string // cyan monospace line footline string // grey monospace line alt string } // heroSVG draws the page banner: the mark set in a cyan sun on the right, the // text stack on the left. func heroSVG(h heroText) string { return `` + `` + toriiMask + `` + `` + `` + `` + `` + `` + xmlText(h.kicker) + `` + `` + xmlText(h.title) + `` + `` + xmlText(h.subtitle) + `` + `` + xmlText(h.tagline) + `` + `` + xmlText(h.footline) + `` + `` } func heroImage() string { return "![" + mdText(currentHero().alt) + "](data:image/svg+xml;base64," + base64.StdEncoding.EncodeToString([]byte(heroSVG(currentHero()))) + ")" }