# Storefront Frontend - Alpine.js/Jinja2 Page Template Guide ## 📋 Overview This guide provides complete templates for creating new customer-facing storefront pages using the established Alpine.js + Jinja2 + Multi-Theme architecture. Follow these patterns to ensure consistency across all store storefronts while maintaining unique branding. --- ## 🔐 Authentication Pages (Available) Three fully-implemented authentication pages are available for reference: - **Login** (`app/templates/storefront/account/login.html`) - Customer sign-in with email/password - **Register** (`app/templates/storefront/account/register.html`) - New customer account creation - **Forgot Password** (`app/templates/storefront/account/forgot-password.html`) - Password reset flow All authentication pages feature: - ✅ Tailwind CSS styling - ✅ Alpine.js interactivity - ✅ Theme integration (store colors, logos, fonts) - ✅ Dark mode support - ✅ Mobile responsive design - ✅ Form validation - ✅ Loading states - ✅ Error handling See the [Storefront Architecture Documentation](./architecture.md) (Authentication Pages section) for complete details. --- ## 🎯 Quick Reference ### File Structure for New Page ``` app/ ├── templates/storefront/ │ └── [page-name].html # Jinja2 template ├── static/storefront/js/ │ └── [page-name].js # Alpine.js component └── api/v1/storefront/ └── pages.py # Route registration ``` ### Checklist for New Page - [ ] Create Jinja2 template extending storefront/base.html - [ ] Create Alpine.js JavaScript component - [ ] Register route in pages.py - [ ] Test with multiple store themes - [ ] Test responsive design (mobile/tablet/desktop) - [ ] Test dark mode - [ ] Test cart integration (if applicable) - [ ] Verify theme CSS variables work - [ ] Check image optimization --- ## 📄 Template Structure ### 1. Jinja2 Template **File:** `app/templates/storefront/[page-name].html` ```jinja2 {# app/templates/storefront/[page-name].html #} {% extends "storefront/base.html" %} {# Page title for browser tab - includes store name #} {% block title %}[Page Name] - {{ store.name }}{% endblock %} {# Meta description for SEO #} {% block meta_description %}[Page description for SEO]{% endblock %} {# Alpine.js component name #} {% block alpine_data %}shop[PageName](){% endblock %} {# Page content #} {% block content %}
Loading...
Try adjusting your filters or check back later.