// generator-templates.jsx — render functions per template
const COLORS = { cream: "#eadcbe", purple: "#674689", coral: "#df4b5a", ink: "#1b1b1a", white: "#fff" };
const GLYPH = "../" + "assets/glyph-outline.svg";
function colorFilter(c) {
if (c === "#fff" || c === "#ffffff") return "brightness(0) invert(1)";
if (c.toLowerCase() === "#1b1b1a") return "brightness(0)";
if (c.toLowerCase() === "#674689") return "brightness(0) saturate(100%) invert(28%) sepia(40%) saturate(900%) hue-rotate(248deg) brightness(85%) contrast(95%)";
if (c.toLowerCase() === "#df4b5a") return "brightness(0) saturate(100%) invert(45%) sepia(80%) saturate(2200%) hue-rotate(330deg) brightness(95%) contrast(95%)";
return "";
}
function Glyph({ size = 60, color = "#674689" }) {
return
;
}
function Logo({ size = "md", color = "#674689", textColor, glyphOnly = false }) {
const S = { xs: { g: 50, gap: 10, t1: 12, t2: 11, ls1: ".4em", ls2: ".35em" },
sm: { g: 90, gap: 16, t1: 18, t2: 16, ls1: ".5em", ls2: ".4em" },
md: { g: 140, gap: 22, t1: 24, t2: 22, ls1: ".55em", ls2: ".45em" },
lg: { g: 220, gap: 32, t1: 32, t2: 28, ls1: ".6em", ls2: ".5em" },
xl: { g: 380, gap: 56, t1: 48, t2: 42, ls1: ".65em", ls2: ".55em" } };
const s = S[size]; const tc = textColor || color;
return (
);
}
function Placeholder({ label = "produto", tone = "cream" }) {
const tones = { dark: ["#2a2a2a","#323232","rgba(255,255,255,.5)"], cream: ["#dfd2b4","#e8dcc0","#7a6f55"] };
const [a, b, fg] = tones[tone] || tones.cream;
return {label}
;
}
// ─── Templates ──────────────────────────────────────────────────────────
function tplPostDrop(d) {
const fg = d.fg || COLORS.ink, accent = d.accent || COLORS.purple, hookC = d.hookColor || COLORS.coral;
return (
✦ drop · {d.edition}
{d.date}
);
}
function tplPostProduct(d) {
const fg = d.fg || COLORS.ink, accent = d.accent || COLORS.purple;
return (
{d.image ? (

) : (
)}
{d.badge}
);
}
function tplPostQuote(d) {
const fg = d.fg || "#fff", subC = fg === "#fff" ? "rgba(255,255,255,.85)" : "rgba(27,27,26,.7)";
return (
);
}
function tplPostFaqSizes(d) {
const fg = d.fg || COLORS.ink, accent = d.accent || COLORS.purple;
const rows = d.rows.split("\n").map(r => r.split("|").map(c => c.trim())).filter(r => r.length === 4);
return (
{d.title}
{rows.map((r, i) => (
{r[0]}
{r[1]} cm
{r[2]} cm
{r[3]} cm
))}
{d.footer}
);
}
function tplPostBazar(d) {
const fg = d.fg || "#fff";
return (
);
}
function tplStoryTeaser(d) {
const fg = d.fg || COLORS.ink, accent = d.accent || COLORS.purple, hookC = d.hookColor || COLORS.coral;
return (
);
}
function tplStoryProduct(d) {
const fg = d.fg || COLORS.ink, accent = d.accent || COLORS.purple;
return (
{d.image ? (

) : (
)}
);
}
function tplStoryCountdown(d) {
const fg = d.fg || "#fff", subC = fg === "#fff" ? COLORS.cream : "rgba(27,27,26,.7)";
const blocks = [["days","dias",d.days],["hours","hrs",d.hours],["mins","min",d.mins]];
return (
{d.eyebrow}
{blocks.map(([k, l, n]) => (
))}
{d.cta}
);
}
// Carrossel: 1 capa + 5 cards de marca
function tplCarouselCover(d) {
const fg = d.fg || COLORS.ink, accent = d.accent || COLORS.purple;
return (
);
}
function tplCarouselBrand(d) {
const fg = d.fg || COLORS.ink, accent = d.accent || COLORS.purple;
return (
{d.image ? (

) : (
)}
{d.brand}
{d.body}
{(d.tags || "").split(",").map(t => t.trim()).filter(Boolean).map((t, i) => (
{t}
))}
);
}
function tplCarouselClosing(d) {
const fg = d.fg || "#fff";
return (
{d.hero}
{d.body}
{d.cta}
);
}
function tplHighlight(d) {
return (
);
}
function tplHighlightGlyph(d) {
return (
);
}
function tplHighlightGlyphLabel(d) {
return (
);
}
function tplHighlightCircle(d) {
return (
);
}
function tplHighlightCaveat(d) {
return (
);
}
function tplProfilePic(d) {
return (
);
}
// ─── Template registry ──────────────────────────────────────────────────
window.LIROU_TEMPLATES = [
{ id: "post-drop", group: "Posts (1080×1350)", name: "Drop · lançamento", w: 1080, h: 1350, render: tplPostDrop,
fields: [
{ k: "edition", label: "Número do drop", type: "text" },
{ k: "date", label: "Data / horário", type: "text" },
{ k: "hook", label: "Hook (Caveat)", type: "textarea", hint: "use \\n p/ quebrar linha" },
{ k: "body", label: "Subtítulo", type: "textarea" },
{ k: "cta", label: "Texto do botão", type: "text" },
{ k: "handle", label: "@handle", type: "text" },
{ k: "bg", label: "Cor de fundo (preenche o card todo)", type: "color", options: ["#eadcbe","#674689","#df4b5a"] },
],
defaults: { edition: "04", date: "sex · 19h", hook: "chegou!", body: "12 peças novas. streetwear nacional, garimpado e curado pra você.", cta: "ver no perfil ↗", handle: "@lirou.closet.65", bg: "#eadcbe" } },
{ id: "post-product", group: "Posts (1080×1350)", name: "Produto", w: 1080, h: 1350, render: tplPostProduct,
fields: [
{ k: "image", label: "Foto da peça", type: "image", hint: "recomendado: foto quadrada ou retrato" },
{ k: "title", label: "Nome da peça (Caveat)", type: "text" },
{ k: "subtitle", label: "Detalhes", type: "text" },
{ k: "price", label: "Preço", type: "text" },
{ k: "badge", label: "Badge (canto)", type: "text" },
{ k: "imgLabel", label: "Label do placeholder", type: "text" },
{ k: "cta", label: "CTA secundário", type: "text" },
{ k: "bg", label: "Cor de fundo (preenche atrás da foto e do texto)", type: "color", options: ["#eadcbe","#f4f1ec"] },
],
defaults: { image: "", title: "calça class", subtitle: "cargo verde · tam M · única", price: "R$ 165", badge: "new!", imgLabel: "calça · class", cta: "chama no direct →", bg: "#eadcbe" } },
{ id: "post-quote", group: "Posts (1080×1350)", name: "Manifesto / quote", w: 1080, h: 1350, render: tplPostQuote,
fields: [
{ k: "hero", label: "Hero (Caveat)", type: "textarea", hint: "use \\n p/ quebrar linha" },
{ k: "body", label: "Corpo", type: "textarea" },
{ k: "handle", label: "@handle", type: "text" },
{ k: "bg", label: "Cor de fundo principal (a bola colorida atrás é coral fixo)", type: "color", options: ["#674689","#df4b5a","#1b1b1a"] },
],
defaults: { hero: "vem\ngarimpar", body: "peças únicas, marcas brasileiras\nque você ama. tudo a um direct.", handle: "@lirou.closet.65", bg: "#674689" } },
{ id: "post-faq", group: "Posts (1080×1350)", name: "FAQ medidas", w: 1080, h: 1350, render: tplPostFaqSizes,
fields: [
{ k: "tag", label: "Tag (canto)", type: "text" },
{ k: "title", label: "Título (Caveat)", type: "textarea" },
{ k: "rows", label: "Tabela (tam | busto | cintura | quadril)", type: "textarea", hint: "uma linha por tamanho" },
{ k: "footer", label: "Rodapé", type: "textarea" },
{ k: "bg", label: "Cor de fundo (a tabela em si é sempre branca)", type: "color", options: ["#eadcbe","#f4f1ec"] },
],
defaults: { tag: "FAQ · medidas", title: "qual o meu\ntamanho?", rows: "PP | 84 | 70 | 90\nP | 88 | 74 | 94\nM | 94 | 78 | 100\nG | 100 | 84 | 106\nGG | 106 | 90 | 112", footer: "✦ medidas tiradas peça a peça. na dúvida, chama no direct.", bg: "#eadcbe" } },
{ id: "post-bazar", group: "Posts (1080×1350)", name: "Bazar / promo", w: 1080, h: 1350, render: tplPostBazar,
fields: [
{ k: "tag", label: "Tag", type: "text" },
{ k: "hero", label: "Hero (Caveat)", type: "textarea" },
{ k: "body", label: "Subtítulo", type: "textarea" },
{ k: "cta", label: "CTA", type: "text" },
{ k: "range", label: "Período", type: "text" },
{ k: "bg", label: "Cor de fundo principal (a bola colorida atrás é roxo fixo)", type: "color", options: ["#df4b5a","#674689"] },
],
defaults: { tag: "bazar", hero: "até\n50% off", body: "peças selecionadas com preço bonzinho — só esse fim de semana.", cta: "confere no perfil ↗", range: "sex · sáb · dom", bg: "#df4b5a" } },
{ id: "story-teaser", group: "Stories (1080×1920)", name: "Teaser drop", w: 1080, h: 1920, render: tplStoryTeaser,
fields: [
{ k: "tag", label: "Eyebrow", type: "text" },
{ k: "title", label: "Título (Caveat)", type: "text" },
{ k: "date", label: "Data", type: "text" },
{ k: "cta", label: "CTA", type: "text" },
{ k: "bg", label: "Cor de fundo (preenche o story todo)", type: "color", options: ["#eadcbe","#674689"] },
],
defaults: { tag: "✦ em breve ✦", title: "drop 04", date: "sex · 19h", cta: "⌃ ative o lembrete", bg: "#eadcbe" } },
{ id: "story-product", group: "Stories (1080×1920)", name: "Produto", w: 1080, h: 1920, render: tplStoryProduct,
fields: [
{ k: "image", label: "Foto da peça", type: "image", hint: "recomendado: foto vertical 4:5" },
{ k: "number", label: "Número da peça", type: "text" },
{ k: "imgLabel", label: "Label placeholder", type: "text" },
{ k: "title", label: "Título (Caveat)", type: "text" },
{ k: "subtitle", label: "Detalhes", type: "text" },
{ k: "price", label: "Preço", type: "text" },
{ k: "cta", label: "CTA", type: "text" },
{ k: "bg", label: "Cor de fundo (preenche atrás da foto)", type: "color", options: ["#eadcbe","#674689"] },
],
defaults: { image: "", number: "n° 042", imgLabel: "calça class", title: "calça class", subtitle: "cargo verde · tam M · única", price: "R$ 165", cta: "quero!", bg: "#eadcbe" } },
{ id: "story-countdown", group: "Stories (1080×1920)", name: "Countdown", w: 1080, h: 1920, render: tplStoryCountdown,
fields: [
{ k: "eyebrow", label: "Eyebrow", type: "text" },
{ k: "days", label: "Dias", type: "text" },
{ k: "hours", label: "Horas", type: "text" },
{ k: "mins", label: "Minutos", type: "text" },
{ k: "title", label: "Título (Caveat)", type: "text" },
{ k: "subline", label: "Subtítulo", type: "text" },
{ k: "cta", label: "CTA", type: "text" },
{ k: "bg", label: "Cor de fundo (preenche o story todo · a bola atrás é coral fixo)", type: "color", options: ["#674689","#df4b5a","#1b1b1a","#eadcbe"] },
{ k: "fg", label: "Cor de TODO o texto + números do contador", type: "color", options: ["#ffffff","#1b1b1a","#eadcbe","#674689"] },
],
defaults: { eyebrow: "faltam só", days: "02", hours: "14", mins: "32", title: "drop 04", subline: "12 peças novas", cta: "⌃ ative o lembrete", bg: "#674689", fg: "#ffffff" } },
// ─── Carrossel ────────────────────────────────────────
{ id: "carousel-cover", group: "Carrossel (1080×1350)", name: "Capa do carrossel", w: 1080, h: 1350, render: tplCarouselCover,
fields: [
{ k: "eyebrow", label: "Eyebrow", type: "text" },
{ k: "title", label: "Título (Caveat)", type: "textarea", hint: "use \\n p/ quebrar linha" },
{ k: "subtitle", label: "Subtítulo", type: "textarea" },
{ k: "handle", label: "@handle", type: "text" },
{ k: "bg", label: "Cor de fundo (preenche o card)", type: "color", options: ["#eadcbe","#f4f1ec","#674689","#df4b5a","#1b1b1a"] },
{ k: "fg", label: "Cor do subtítulo + 'arrasta →' (texto secundário)", type: "color", options: ["#1b1b1a","#ffffff","#674689","#eadcbe"] },
{ k: "accent", label: "Cor do título grande + eyebrow + glifo + @handle", type: "color", options: ["#674689","#df4b5a","#1b1b1a","#ffffff","#eadcbe"] },
],
defaults: { eyebrow: "lista", title: "5 marcas\nbrasileiras\nque amamos", subtitle: "uma curadoria pessoal — quem tá fazendo streetwear nacional do bom no momento.", handle: "@lirou.closet.65", bg: "#eadcbe", fg: "#1b1b1a", accent: "#674689" } },
{ id: "carousel-brand", group: "Carrossel (1080×1350)", name: "Card de marca (1 de 5)", w: 1080, h: 1350, render: tplCarouselBrand,
fields: [
{ k: "number", label: "Numeração", type: "text", hint: "ex: 01, 02, 03..." },
{ k: "image", label: "Foto / mood da marca", type: "image" },
{ k: "imgLabel", label: "Label placeholder", type: "text" },
{ k: "brand", label: "Nome da marca (Caveat)", type: "text" },
{ k: "body", label: "Por que amamos (1-2 linhas)", type: "textarea" },
{ k: "tags", label: "Tags (separa por vírgula)", type: "text", hint: "ex: streetwear, sp, indie" },
{ k: "bg", label: "Cor de fundo (preenche o card)", type: "color", options: ["#eadcbe","#f4f1ec","#674689","#df4b5a","#1b1b1a"] },
{ k: "fg", label: "Cor do parágrafo descritivo", type: "color", options: ["#1b1b1a","#ffffff","#674689","#eadcbe"] },
{ k: "accent", label: "Cor da numeração + nome da marca + borda das tags", type: "color", options: ["#674689","#df4b5a","#1b1b1a","#ffffff","#eadcbe"] },
],
defaults: { number: "01", image: "", imgLabel: "marca", brand: "piet", body: "streetwear curado por pedro andrade. peças que conversam com skate, rua e cultura paulistana.", tags: "streetwear, sp, drops limitados", bg: "#eadcbe", fg: "#1b1b1a", accent: "#674689" } },
{ id: "carousel-closing", group: "Carrossel (1080×1350)", name: "Encerramento", w: 1080, h: 1350, render: tplCarouselClosing,
fields: [
{ k: "hero", label: "Hero (Caveat)", type: "textarea" },
{ k: "body", label: "Corpo", type: "textarea" },
{ k: "cta", label: "CTA", type: "text" },
{ k: "bg", label: "Cor de fundo (preenche o card)", type: "color", options: ["#674689","#df4b5a","#1b1b1a","#eadcbe"] },
{ k: "fg", label: "Cor do logo + título + corpo (TUDO menos o botão branco)", type: "color", options: ["#ffffff","#1b1b1a","#eadcbe","#674689"] },
],
defaults: { hero: "qual é\na sua?", body: "comenta aqui as marcas brasileiras que você ama — sempre rolam descobertas no Lirou.", cta: "salva pra depois ↗", bg: "#674689", fg: "#ffffff" } },
{ id: "highlight", group: "Highlights (1080×1080)", name: "Capa · ícone + label", w: 1080, h: 1080, render: tplHighlight,
fields: [
{ k: "icon", label: "Ícone (1-2 chars)", type: "text" },
{ k: "label", label: "Label", type: "text" },
{ k: "bg", label: "Cor de fundo do círculo de highlight", type: "color", options: ["#674689","#df4b5a","#1b1b1a","#eadcbe","#f4f1ec","#ffffff"] },
{ k: "fg", label: "Cor do ícone + label de baixo", type: "color", options: ["#ffffff","#1b1b1a","#674689","#df4b5a","#eadcbe"] },
],
defaults: { icon: "✦", label: "drops", bg: "#674689", fg: "#ffffff" } },
{ id: "highlight-glyph", group: "Highlights (1080×1080)", name: "Capa · só glifo", w: 1080, h: 1080, render: tplHighlightGlyph,
fields: [
{ k: "bg", label: "Cor de fundo do círculo de highlight", type: "color", options: ["#674689","#df4b5a","#1b1b1a","#eadcbe","#f4f1ec","#ffffff"] },
{ k: "fg", label: "Cor do mascote/glifo central", type: "color", options: ["#ffffff","#1b1b1a","#674689","#df4b5a","#eadcbe"] },
],
defaults: { bg: "#eadcbe", fg: "#674689" } },
{ id: "highlight-glyph-label", group: "Highlights (1080×1080)", name: "Capa · glifo + label", w: 1080, h: 1080, render: tplHighlightGlyphLabel,
fields: [
{ k: "label", label: "Label", type: "text" },
{ k: "bg", label: "Cor de fundo do círculo de highlight", type: "color", options: ["#674689","#df4b5a","#1b1b1a","#eadcbe","#f4f1ec","#ffffff"] },
{ k: "fg", label: "Cor do glifo + texto label embaixo", type: "color", options: ["#ffffff","#1b1b1a","#674689","#df4b5a","#eadcbe"] },
],
defaults: { label: "looks", bg: "#df4b5a", fg: "#ffffff" } },
{ id: "highlight-circle", group: "Highlights (1080×1080)", name: "Capa · círculo + glifo", w: 1080, h: 1080, render: tplHighlightCircle,
fields: [
{ k: "label", label: "Label", type: "text" },
{ k: "bg", label: "Cor de fundo do círculo de highlight", type: "color", options: ["#674689","#df4b5a","#1b1b1a","#eadcbe","#f4f1ec","#ffffff"] },
{ k: "fg", label: "Cor do círculo interno + glifo + texto", type: "color", options: ["#ffffff","#1b1b1a","#674689","#df4b5a","#eadcbe"] },
],
defaults: { label: "drops", bg: "#1b1b1a", fg: "#eadcbe" } },
{ id: "highlight-caveat", group: "Highlights (1080×1080)", name: "Capa · escrita Caveat", w: 1080, h: 1080, render: tplHighlightCaveat,
fields: [
{ k: "label", label: "Texto (Caveat)", type: "textarea", hint: "use \\n p/ quebrar linha" },
{ k: "bg", label: "Cor de fundo do círculo de highlight", type: "color", options: ["#674689","#df4b5a","#1b1b1a","#eadcbe","#f4f1ec","#ffffff"] },
{ k: "fg", label: "Cor da escrita à mão central", type: "color", options: ["#ffffff","#1b1b1a","#674689","#df4b5a","#eadcbe"] },
],
defaults: { label: "looks", bg: "#eadcbe", fg: "#674689" } },
{ id: "profile-pic", group: "Foto de perfil (1080×1080)", name: "Foto de perfil · glifo", w: 1080, h: 1080, render: tplProfilePic,
fields: [
{ k: "bg", label: "Cor de fundo da foto de perfil", type: "color", options: ["#eadcbe","#674689","#df4b5a","#1b1b1a","#f4f1ec","#ffffff"] },
{ k: "fg", label: "Cor do mascote/glifo central", type: "color", options: ["#674689","#df4b5a","#1b1b1a","#ffffff","#eadcbe"] },
],
defaults: { bg: "#eadcbe", fg: "#674689" } },
];