rename project from SimpleshopTheme to Berrypod

All modules, configs, paths, and references updated.
836 tests pass, zero warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-18 21:23:15 +00:00
parent c65e777832
commit 9528700862
300 changed files with 23932 additions and 1349 deletions

View File

@@ -0,0 +1,37 @@
<.shop_layout {layout_assigns(assigns)} active_page="cart">
<main id="main-content" class="page-container">
<.page_title text="Your basket" />
<%= if @cart_items == [] do %>
<.cart_empty_state mode={@mode} />
<% else %>
<div class="cart-grid">
<div>
<ul
role="list"
aria-label="Cart items"
class="cart-page-list"
>
<%= for item <- @cart_items do %>
<li>
<.shop_card class="cart-page-card">
<.cart_item_row item={item} size={:default} show_quantity_controls mode={@mode} />
</.shop_card>
</li>
<% end %>
</ul>
</div>
<div>
<.order_summary
subtotal={@cart_page_subtotal}
shipping_estimate={assigns[:shipping_estimate]}
country_code={assigns[:country_code] || "GB"}
available_countries={assigns[:available_countries] || []}
mode={@mode}
/>
</div>
</div>
<% end %>
</main>
</.shop_layout>

View File

@@ -0,0 +1,134 @@
<.shop_layout {layout_assigns(assigns)} active_page="checkout">
<main id="main-content" class="page-container checkout-main">
<%= if @order && @order.payment_status == "paid" do %>
<div class="checkout-header">
<div class="checkout-icon">
<svg
width="32"
height="32"
fill="none"
viewBox="0 0 24 24"
stroke-width="2.5"
stroke="currentColor"
>
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" />
</svg>
</div>
<h1 class="checkout-heading">
Thank you for your order
</h1>
<p class="checkout-meta">
Order <strong>{@order.order_number}</strong>
</p>
<%= if @order.customer_email do %>
<p class="checkout-meta">
A confirmation will be sent to <strong>{@order.customer_email}</strong>
</p>
<% end %>
</div>
<.shop_card class="checkout-card">
<h2 class="checkout-heading">
Order details
</h2>
<ul class="checkout-items">
<%= for item <- @order.items do %>
<li class="checkout-item">
<div>
<p class="checkout-item-name">
{item.product_name}
</p>
<%= if item.variant_title do %>
<p class="checkout-item-detail">
{item.variant_title}
</p>
<% end %>
<p class="checkout-item-detail">
Qty: {item.quantity}
</p>
</div>
<span class="checkout-item-price">
{Berrypod.Cart.format_price(item.unit_price * item.quantity)}
</span>
</li>
<% end %>
</ul>
<div class="checkout-total-border">
<div class="checkout-total">
<span class="checkout-total-label">Total</span>
<span class="checkout-total-amount">
{Berrypod.Cart.format_price(@order.total)}
</span>
</div>
</div>
</.shop_card>
<%= if @order.shipping_address != %{} do %>
<.shop_card class="checkout-card">
<h2 class="checkout-heading">
Shipping to
</h2>
<div class="checkout-shipping-address">
<p>{@order.shipping_address["name"]}</p>
<p>{@order.shipping_address["line1"]}</p>
<%= if @order.shipping_address["line2"] do %>
<p>{@order.shipping_address["line2"]}</p>
<% end %>
<p>
{@order.shipping_address["city"]}, {@order.shipping_address["postal_code"]}
</p>
<p>{@order.shipping_address["country"]}</p>
</div>
</.shop_card>
<% end %>
<div class="checkout-actions">
<.shop_link_button href="/collections/all" class="checkout-cta">
Continue shopping
</.shop_link_button>
</div>
<% else %>
<%!-- Payment pending or order not found --%>
<div class="checkout-header">
<div class="checkout-pending-icon">
<span class="checkout-pending-spinner">
<svg
width="32"
height="32"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
/>
</svg>
</span>
</div>
<h1 class="checkout-heading">
Processing your payment
</h1>
<p class="checkout-pending-text">
Please wait while we confirm your payment. This usually takes a few seconds.
</p>
<p class="checkout-pending-hint">
If this page doesn't update, please <.link
navigate="/contact"
class="checkout-contact-link"
>contact us</.link>.
</p>
</div>
<% end %>
</main>
</.shop_layout>

View File

@@ -0,0 +1,21 @@
<.shop_layout {layout_assigns(assigns)} active_page="collection">
<main id="main-content">
<.collection_header title="All Products" product_count={length(assigns[:products] || [])} />
<div class="page-container">
<.filter_bar categories={assigns[:categories] || []} />
<.product_grid theme_settings={@theme_settings}>
<%= for product <- assigns[:products] || [] do %>
<.product_card
product={product}
theme_settings={@theme_settings}
mode={@mode}
variant={:default}
show_category={true}
/>
<% end %>
</.product_grid>
</div>
</main>
</.shop_layout>

View File

@@ -0,0 +1,30 @@
<.shop_layout {layout_assigns(assigns)} active_page="contact">
<main id="main-content" class="page-container contact-main">
<.hero_section
variant={:page}
title="Get in touch"
description="Sample contact page for the demo store. Add your own message here something friendly about how customers can reach you."
/>
<div class="contact-grid">
<.contact_form email="hello@example.com" />
<div class="contact-sidebar">
<.order_tracking_card />
<.info_card
title="Handy to know"
items={[
%{label: "Printing", value: "Example: 2-5 business days"},
%{label: "Delivery", value: "Example: 3-7 business days after printing"},
%{label: "Issues", value: "Example: Reprints for any defects"}
]}
/>
<.newsletter_card />
<.social_links_card />
</div>
</div>
</main>
</.shop_layout>

View File

@@ -0,0 +1,33 @@
<.shop_layout {layout_assigns(assigns)}>
<main id="main-content" class="content-page">
<%= if assigns[:hero_background] do %>
<.hero_section
title={@hero_title}
description={@hero_description}
background={@hero_background}
/>
<% else %>
<.hero_section
variant={:page}
title={@hero_title}
description={@hero_description}
/>
<% end %>
<div class="content-body">
<%= if assigns[:image_src] do %>
<div class="content-image">
<.responsive_image
src={@image_src}
source_width={1200}
alt={@image_alt}
sizes="(max-width: 800px) 100vw, 800px"
class="content-hero-image"
/>
</div>
<% end %>
<.rich_text blocks={@content_blocks} />
</div>
</main>
</.shop_layout>

View File

@@ -0,0 +1,33 @@
<.shop_layout {layout_assigns(assigns)} active_page="error" error_page>
<main
id="main-content"
class="error-main"
>
<div class="page-container error-container">
<.hero_section
variant={:error}
pre_title={@error_code}
title={@error_title}
description={@error_description}
cta_text="Go to Homepage"
cta_page="home"
cta_href="/"
secondary_cta_text="Browse Products"
secondary_cta_page="collection"
secondary_cta_href="/collections/all"
mode={@mode}
/>
<.product_grid columns={:fixed_4}>
<%= for product <- Enum.take(assigns[:products] || [], 4) do %>
<.product_card
product={product}
theme_settings={@theme_settings}
mode={@mode}
variant={:minimal}
/>
<% end %>
</.product_grid>
</div>
</main>
</.shop_layout>

View File

@@ -0,0 +1,31 @@
<.shop_layout {layout_assigns(assigns)} active_page="home">
<main id="main-content">
<.hero_section
title="Original designs, printed on demand"
description="Welcome to the Berrypod demo store. This is where your hero text goes something short and punchy about what makes your shop worth a browse."
cta_text="Shop the collection"
cta_page="collection"
cta_href="/collections/all"
mode={@mode}
/>
<.category_nav categories={assigns[:categories] || []} mode={@mode} />
<.featured_products_section
title="Featured products"
products={assigns[:products] || []}
theme_settings={@theme_settings}
mode={@mode}
/>
<.image_text_section
title="Made with passion, printed with care"
description="This is an example content section. Use it to share your story, highlight what makes your products special, or link to your about page."
image_url="/mockups/mountain-sunrise-print-3-800.webp"
link_text="Learn more about the studio →"
link_page="about"
link_href="/about"
mode={@mode}
/>
</main>
</.shop_layout>

View File

@@ -0,0 +1,67 @@
<.shop_layout {layout_assigns(assigns)} active_page="pdp">
<main id="main-content" class="page-container">
<.breadcrumb
items={
if @product.category do
[
%{
label: @product.category,
page: "collection",
href:
"/collections/#{@product.category |> String.downcase() |> String.replace(" ", "-")}"
}
]
else
[]
end ++
[%{label: @product.title, current: true}]
}
mode={@mode}
/>
<div class="pdp-grid">
<.product_gallery images={@gallery_images} product_name={@product.title} />
<div>
<.product_info product={@product} display_price={@display_price} />
<%!-- Dynamic variant selectors --%>
<%= for option_type <- @option_types do %>
<.variant_selector
option_type={option_type}
selected={@selected_options[option_type.name]}
available={@available_options[option_type.name] || []}
mode={@mode}
/>
<% end %>
<%!-- Fallback for products with no variant options --%>
<div
:if={@option_types == []}
class="pdp-variant-fallback"
>
One size
</div>
<.quantity_selector quantity={@quantity} in_stock={@product.in_stock} />
<.add_to_cart_button mode={@mode} />
<.trust_badges :if={@theme_settings.pdp_trust_badges} />
<.product_details product={@product} />
</div>
</div>
<.reviews_section
:if={@theme_settings.pdp_reviews}
reviews={Berrypod.Theme.PreviewData.reviews()}
average_rating={5}
total_count={24}
/>
<.related_products_section
:if={@theme_settings.pdp_related_products}
products={@related_products}
theme_settings={@theme_settings}
mode={@mode}
/>
</main>
</.shop_layout>