add legal page generator for privacy, delivery, and terms
All checks were successful
deploy / deploy (push) Successful in 1m23s
All checks were successful
deploy / deploy (push) Successful in 1m23s
Replaces hardcoded PreviewData placeholders with generated content derived from real shop state: connected providers (production lead times), shipping countries (grouped by region), shop country (jurisdiction language and governing law), and feature flags (abandoned cart recovery section, newsletter, VAT clause). Returns policy correctly cites Consumer Contracts Regulations Reg 28(1)(b) for POD exemption and Consumer Rights Act for defective goods. Cart recovery section uses jurisdiction-specific wording: PECR Reg 22 for UK, GDPR Art 6(1)(f) for EU, generic otherwise. About page unchanged — shop owner's story to tell. 26 new tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
defmodule BerrypodWeb.Shop.Content do
|
||||
use BerrypodWeb, :live_view
|
||||
|
||||
alias Berrypod.LegalPages
|
||||
alias Berrypod.Theme.PreviewData
|
||||
|
||||
@impl true
|
||||
@@ -44,7 +45,7 @@ defmodule BerrypodWeb.Shop.Content do
|
||||
active_page: "delivery",
|
||||
hero_title: "Delivery & returns",
|
||||
hero_description: "Everything you need to know about shipping and returns",
|
||||
content_blocks: PreviewData.delivery_content()
|
||||
content_blocks: LegalPages.delivery_content()
|
||||
}
|
||||
end
|
||||
|
||||
@@ -56,7 +57,7 @@ defmodule BerrypodWeb.Shop.Content do
|
||||
active_page: "privacy",
|
||||
hero_title: "Privacy policy",
|
||||
hero_description: "How we handle your personal information",
|
||||
content_blocks: PreviewData.privacy_content()
|
||||
content_blocks: LegalPages.privacy_content()
|
||||
}
|
||||
end
|
||||
|
||||
@@ -68,7 +69,7 @@ defmodule BerrypodWeb.Shop.Content do
|
||||
active_page: "terms",
|
||||
hero_title: "Terms of service",
|
||||
hero_description: "The legal bits",
|
||||
content_blocks: PreviewData.terms_content()
|
||||
content_blocks: LegalPages.terms_content()
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user