add block previews, picker thumbnails and newsletter settings
All checks were successful
deploy / deploy (push) Successful in 1m30s

Block cards now show a one-line content summary below the name.
Block picker items include SVG wireframe thumbnails. Newsletter
block marked as decorative with configurable title/description
and form submission prevented on the shop side.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-28 20:34:52 +00:00
parent 0a7982dfe8
commit 8f989d892d
6 changed files with 636 additions and 12 deletions

View File

@@ -303,7 +303,15 @@ defmodule BerrypodWeb.PageRenderer do
end
defp render_block(%{block: %{"type" => "newsletter_card"}} = assigns) do
~H"<.newsletter_card />"
settings = assigns.block["settings"] || %{}
assigns =
assigns
|> assign(:title, settings["title"] || "Newsletter")
|> assign(:description, settings["description"] || "")
|> assign(:button_text, settings["button_text"] || "Subscribe")
~H"<.newsletter_card title={@title} description={@description} button_text={@button_text} />"
end
defp render_block(%{block: %{"type" => "social_links_card"}} = assigns) do