""" Generate a minimal, SEO-friendly landing page HTML for Yield domains. The content comes from LLM-generated config stored on YieldDomain. No placeholders or demo content: if required fields are missing, caller should error. """ from __future__ import annotations from html import escape from app.models.yield_domain import YieldDomain def render_yield_landing_html(*, yield_domain: YieldDomain, cta_url: str) -> str: headline = (yield_domain.landing_headline or "").strip() intro = (yield_domain.landing_intro or "").strip() cta_label = (yield_domain.landing_cta_label or "").strip() if not headline or not intro or not cta_label: raise ValueError("Yield landing config missing (headline/intro/cta_label)") # Simple premium dark theme, fast to render, readable. # Important: CTA must point to cta_url (which will record the click + redirect). return f""" {escape(headline)}

{escape(headline)}

{escape(intro)}

{escape(cta_label)}
Powered by Pounce Yield
"""