defmodule ToweropsWeb.MarketingLayouts do
@moduledoc """
Marketing layouts for public-facing pages.
"""
use ToweropsWeb, :html
alias ToweropsWeb.Components.CookieConsent
require Logger
@doc """
Renders the marketing layout.
Use this for public-facing marketing pages.
## Examples
Marketing Content
"""
attr :flash, :map, required: true, doc: "the map of flash messages"
slot :inner_block, required: true
def marketing(assigns) do
# Get cookie consent from process dictionary (set in plug)
requires_cookie_consent = Process.get(:requires_cookie_consent, false)
assigns = Map.put(assigns, :requires_cookie_consent, requires_cookie_consent)
~H"""