feat: add default content pages for delivery, privacy and terms

Replace one-off ShopLive.About with generic ShopLive.Content that
handles all static content pages via live_action. Add delivery &
returns, privacy policy, and terms of service pages with sample
content. Update footer help links and theme editor preview.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-08 10:47:54 +00:00
parent 0af8997623
commit 5a43cfc761
10 changed files with 523 additions and 115 deletions

View File

@@ -431,11 +431,75 @@ defmodule SimpleshopThemeWeb.ThemeLive.Index do
defp preview_page(%{page: :about} = assigns) do
~H"""
<SimpleshopThemeWeb.PageTemplates.about
<SimpleshopThemeWeb.PageTemplates.content
theme_settings={@theme_settings}
logo_image={@logo_image}
header_image={@header_image}
mode={:preview}
active_page="about"
hero_title="About the studio"
hero_description="Your story goes here this is sample content for the demo shop"
hero_background={:sunken}
image_src="/mockups/night-sky-blanket-3"
image_alt="Night sky blanket draped over a chair"
content_blocks={PreviewData.about_content()}
cart_items={PreviewData.cart_drawer_items()}
cart_count={2}
cart_subtotal="£72.00"
cart_drawer_open={@cart_drawer_open}
/>
"""
end
defp preview_page(%{page: :delivery} = assigns) do
~H"""
<SimpleshopThemeWeb.PageTemplates.content
theme_settings={@theme_settings}
logo_image={@logo_image}
header_image={@header_image}
mode={:preview}
active_page="delivery"
hero_title="Delivery & returns"
hero_description="Everything you need to know about shipping and returns"
content_blocks={PreviewData.delivery_content()}
cart_items={PreviewData.cart_drawer_items()}
cart_count={2}
cart_subtotal="£72.00"
cart_drawer_open={@cart_drawer_open}
/>
"""
end
defp preview_page(%{page: :privacy} = assigns) do
~H"""
<SimpleshopThemeWeb.PageTemplates.content
theme_settings={@theme_settings}
logo_image={@logo_image}
header_image={@header_image}
mode={:preview}
active_page="privacy"
hero_title="Privacy policy"
hero_description="How we handle your personal information"
content_blocks={PreviewData.privacy_content()}
cart_items={PreviewData.cart_drawer_items()}
cart_count={2}
cart_subtotal="£72.00"
cart_drawer_open={@cart_drawer_open}
/>
"""
end
defp preview_page(%{page: :terms} = assigns) do
~H"""
<SimpleshopThemeWeb.PageTemplates.content
theme_settings={@theme_settings}
logo_image={@logo_image}
header_image={@header_image}
mode={:preview}
active_page="terms"
hero_title="Terms of service"
hero_description="The legal bits"
content_blocks={PreviewData.terms_content()}
cart_items={PreviewData.cart_drawer_items()}
cart_count={2}
cart_subtotal="£72.00"

View File

@@ -1091,6 +1091,9 @@
{:pdp, "Product"},
{:cart, "Cart"},
{:about, "About"},
{:delivery, "Delivery"},
{:privacy, "Privacy"},
{:terms, "Terms"},
{:contact, "Contact"},
{:error, "404"}
] do %>