add block previews, picker thumbnails and newsletter settings
All checks were successful
deploy / deploy (push) Successful in 1m30s
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user