diff --git a/lib/simpleshop_theme_web/live/theme_live/index.ex b/lib/simpleshop_theme_web/live/theme_live/index.ex index ee1fad9..6c31f98 100644 --- a/lib/simpleshop_theme_web/live/theme_live/index.ex +++ b/lib/simpleshop_theme_web/live/theme_live/index.ex @@ -2,12 +2,18 @@ defmodule SimpleshopThemeWeb.ThemeLive.Index do use SimpleshopThemeWeb, :live_view alias SimpleshopTheme.Settings - alias SimpleshopTheme.Theme.{CSSGenerator, Presets} + alias SimpleshopTheme.Theme.{CSSGenerator, Presets, PreviewData} @impl true def mount(_params, _session, socket) do theme_settings = Settings.get_theme_settings() generated_css = CSSGenerator.generate(theme_settings) + preview_data = %{ + products: PreviewData.products(), + cart_items: PreviewData.cart_items(), + testimonials: PreviewData.testimonials(), + categories: PreviewData.categories() + } socket = socket @@ -15,6 +21,7 @@ defmodule SimpleshopThemeWeb.ThemeLive.Index do |> assign(:generated_css, generated_css) |> assign(:preview_page, :home) |> assign(:preset_names, Presets.list_names()) + |> assign(:preview_data, preview_data) {:ok, socket} end diff --git a/lib/simpleshop_theme_web/live/theme_live/index.html.heex b/lib/simpleshop_theme_web/live/theme_live/index.html.heex index 8d8775a..bab748d 100644 --- a/lib/simpleshop_theme_web/live/theme_live/index.html.heex +++ b/lib/simpleshop_theme_web/live/theme_live/index.html.heex @@ -103,56 +103,27 @@ -
- This is a preview of the <%= @preview_page %> page with your current theme settings. -
- -- This card demonstrates the current surface, border, and text colors with the selected shape style. -
-+ We're passionate about bringing you the finest products, handpicked with care and attention to detail. +
+ ++ Founded in 2020, our journey began with a simple mission: to curate and deliver exceptional products that enhance everyday life. We believe that quality shouldn't be compromised, and that's why every item in our collection is carefully selected for its craftsmanship, sustainability, and timeless appeal. +
++ What started as a small passion project has grown into a community of like-minded individuals who appreciate the finer things in life. We work directly with artisans and makers who share our values of quality, authenticity, and ethical production. +
+ ++ Every product is vetted for exceptional quality and durability. +
++ We prioritize eco-friendly materials and ethical production methods. +
++ Supporting local artisans and building lasting relationships. +
++ <%= item.variant %> +
+ ++ $<%= item.product.price / 100 * item.quantity %> +
++ <%= length(@preview_data.products) %> products +
++ Showing all <%= length(@preview_data.products) %> products +
+ ++ <%= product.category %> +
++ Have a question or comment? We'd love to hear from you. Send us a message and we'll respond as soon as possible. +
+ +hello@example.com
+(555) 123-4567
+
+ 123 Main Street
+ San Francisco, CA 94102
+ United States
+
+ Monday - Friday: 9am - 6pm
+ Saturday: 10am - 4pm
+ Sunday: Closed
+
+ Sorry, we couldn't find the page you're looking for. Perhaps you've mistyped the URL or the page has been moved. +
+ ++ <%= product.name %> +
++ $<%= product.price / 100 %> +
++ Discover our curated collection of handpicked products crafted with care +
+ ++ <%= product.description %> +
++ "<%= testimonial.content %>" +
++ — <%= testimonial.author %> +
++ <%= category.product_count %> products +
++ <%= product.description %>. Crafted with attention to detail and quality materials, this product is designed to last. Perfect for everyday use or special occasions. +
+ + +Free Shipping
+On orders over $50
+Easy Returns
+30-day return policy
++ $<%= related_product.price / 100 %> +
+