# Shop Frontend - Alpine.js/Jinja2 Page Template Guide ## 📋 Overview This guide provides complete templates for creating new customer-facing shop pages using the established Alpine.js + Jinja2 + Multi-Theme architecture. Follow these patterns to ensure consistency across all vendor shops while maintaining unique branding. --- ## 🔐 Authentication Pages (Available) Three fully-implemented authentication pages are available for reference: - **Login** (`app/templates/shop/account/login.html`) - Customer sign-in with email/password - **Register** (`app/templates/shop/account/register.html`) - New customer account creation - **Forgot Password** (`app/templates/shop/account/forgot-password.html`) - Password reset flow All authentication pages feature: - ✅ Tailwind CSS styling - ✅ Alpine.js interactivity - ✅ Theme integration (vendor colors, logos, fonts) - ✅ Dark mode support - ✅ Mobile responsive design - ✅ Form validation - ✅ Loading states - ✅ Error handling See the [Shop Architecture Documentation](./architecture.md) (Authentication Pages section) for complete details. --- ## 🎯 Quick Reference ### File Structure for New Page ``` app/ ├── templates/shop/ │ └── [page-name].html # Jinja2 template ├── static/shop/js/ │ └── [page-name].js # Alpine.js component └── api/v1/shop/ └── pages.py # Route registration ``` ### Checklist for New Page - [ ] Create Jinja2 template extending shop/base.html - [ ] Create Alpine.js JavaScript component - [ ] Register route in pages.py - [ ] Test with multiple vendor 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/shop/[page-name].html` ```jinja2 {# app/templates/shop/[page-name].html #} {% extends "shop/base.html" %} {# Page title for browser tab - includes vendor name #} {% block title %}[Page Name] - {{ vendor.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.