refactor: rename shop to storefront for consistency
Rename all "shop" directories and references to "storefront" to match the API and route naming convention already in use. Renamed directories: - app/templates/shop/ → app/templates/storefront/ - static/shop/ → static/storefront/ - app/templates/shared/macros/shop/ → .../macros/storefront/ - docs/frontend/shop/ → docs/frontend/storefront/ Renamed files: - shop.css → storefront.css - shop-layout.js → storefront-layout.js Updated references in: - app/routes/storefront_pages.py (21 template references) - app/modules/cms/routes/pages/vendor.py - app/templates/storefront/base.html (static paths) - All storefront templates (extends/includes) - docs/architecture/frontend-structure.md This aligns the template/static naming with: - Route file: storefront_pages.py - API directory: app/api/v1/storefront/ - Module routes: */routes/api/storefront.py - URL paths: /storefront/* Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
283
static/storefront/css/storefront.css
Normal file
283
static/storefront/css/storefront.css
Normal file
@@ -0,0 +1,283 @@
|
||||
/* Shop Frontend Styles */
|
||||
/* Uses CSS variables injected by theme system */
|
||||
|
||||
/* Base Utilities */
|
||||
.hover\:text-primary:hover {
|
||||
color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
.text-primary {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.bg-primary {
|
||||
background-color: var(--color-primary);
|
||||
}
|
||||
|
||||
.bg-accent {
|
||||
background-color: var(--color-accent);
|
||||
}
|
||||
|
||||
.border-primary {
|
||||
border-color: var(--color-primary);
|
||||
}
|
||||
|
||||
/* Button Styles */
|
||||
.btn-primary {
|
||||
background-color: var(--color-primary);
|
||||
color: white;
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 0.375rem;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
opacity: 0.9;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background-color: var(--color-secondary);
|
||||
color: white;
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 0.375rem;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.btn-outline {
|
||||
border: 2px solid var(--color-primary);
|
||||
color: var(--color-primary);
|
||||
background-color: transparent;
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 0.375rem;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.btn-outline:hover {
|
||||
background-color: var(--color-primary);
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Product Card Styles */
|
||||
.product-card {
|
||||
background: white;
|
||||
border-radius: 0.5rem;
|
||||
overflow: hidden;
|
||||
transition: all 0.3s;
|
||||
border: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.product-card:hover {
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
|
||||
.product-card.dark {
|
||||
background: #1f2937;
|
||||
border-color: #374151;
|
||||
}
|
||||
|
||||
.product-card-image {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.product-card-title {
|
||||
font-family: var(--font-heading);
|
||||
font-size: 1.125rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-text);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.product-card-price {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
/* Category Badge */
|
||||
.category-badge {
|
||||
display: inline-block;
|
||||
padding: 0.25rem 0.75rem;
|
||||
background-color: var(--color-secondary);
|
||||
color: white;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 500;
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
/* Toast Notifications */
|
||||
.toast {
|
||||
animation: slideInRight 0.3s ease-out;
|
||||
}
|
||||
|
||||
@keyframes slideInRight {
|
||||
from {
|
||||
transform: translateX(100%);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Loading Spinner */
|
||||
.spinner {
|
||||
border: 3px solid rgba(0, 0, 0, 0.1);
|
||||
border-left-color: var(--color-primary);
|
||||
border-radius: 50%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
/* Search Overlay */
|
||||
.search-overlay {
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
|
||||
/* Mobile Menu Slide */
|
||||
.mobile-menu {
|
||||
transform: translateX(-100%);
|
||||
transition: transform 0.3s ease-out;
|
||||
}
|
||||
|
||||
.mobile-menu.open {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
/* Cart Badge */
|
||||
.cart-badge {
|
||||
min-width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
/* Smooth Transitions */
|
||||
* {
|
||||
transition-property: background-color, border-color, color, fill, stroke;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 150ms;
|
||||
}
|
||||
|
||||
/* Typography with Theme Fonts */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: var(--font-heading);
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--font-body);
|
||||
color: var(--color-text);
|
||||
background-color: var(--color-background);
|
||||
}
|
||||
|
||||
/* Dark Mode Adjustments */
|
||||
.dark body {
|
||||
background-color: #111827;
|
||||
color: #f9fafb;
|
||||
}
|
||||
|
||||
.dark .product-card {
|
||||
background-color: #1f2937;
|
||||
border-color: #374151;
|
||||
}
|
||||
|
||||
.dark .product-card-title {
|
||||
color: #f9fafb;
|
||||
}
|
||||
|
||||
/* Hero Section */
|
||||
.hero-section {
|
||||
background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
|
||||
color: white;
|
||||
padding: 4rem 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Feature Cards */
|
||||
.feature-card {
|
||||
padding: 2rem;
|
||||
border-radius: 0.5rem;
|
||||
border: 1px solid var(--color-border);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.feature-card:hover {
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* Breadcrumbs */
|
||||
.breadcrumb {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
font-size: 0.875rem;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
.breadcrumb a:hover {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
/* Price Display */
|
||||
.price-old {
|
||||
text-decoration: line-through;
|
||||
color: #9ca3af;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.price-new {
|
||||
color: var(--color-accent);
|
||||
font-weight: 700;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.price-discount {
|
||||
background-color: var(--color-accent);
|
||||
color: white;
|
||||
padding: 0.25rem 0.5rem;
|
||||
border-radius: 0.25rem;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Rating Stars */
|
||||
.rating-stars {
|
||||
display: flex;
|
||||
gap: 0.125rem;
|
||||
color: #fbbf24;
|
||||
}
|
||||
|
||||
/* Responsive Grid */
|
||||
.product-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.product-grid {
|
||||
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
}
|
||||
285
static/storefront/css/tailwind.css
Normal file
285
static/storefront/css/tailwind.css
Normal file
@@ -0,0 +1,285 @@
|
||||
/* Tailwind CSS v4 - Shop Frontend Styles */
|
||||
/* Configuration is CSS-first in v4 */
|
||||
|
||||
@import "tailwindcss";
|
||||
|
||||
/* Source paths for content scanning */
|
||||
@source "../../js/**/*.js";
|
||||
@source "../../../app/templates/shop/**/*.html";
|
||||
@source "../../../app/templates/shared/**/*.html";
|
||||
|
||||
/* Custom theme configuration */
|
||||
@theme {
|
||||
/* Custom gray palette (Windmill Dashboard) */
|
||||
--color-gray-50: #f9fafb;
|
||||
--color-gray-100: #f4f5f7;
|
||||
--color-gray-200: #e5e7eb;
|
||||
--color-gray-300: #d5d6d7;
|
||||
--color-gray-400: #9e9e9e;
|
||||
--color-gray-500: #707275;
|
||||
--color-gray-600: #4c4f52;
|
||||
--color-gray-700: #24262d;
|
||||
--color-gray-800: #1a1c23;
|
||||
--color-gray-900: #121317;
|
||||
|
||||
/* Custom purple palette (Windmill Dashboard) */
|
||||
--color-purple-50: #f6f5ff;
|
||||
--color-purple-100: #edebfe;
|
||||
--color-purple-200: #dcd7fe;
|
||||
--color-purple-300: #cabffd;
|
||||
--color-purple-400: #ac94fa;
|
||||
--color-purple-500: #9061f9;
|
||||
--color-purple-600: #7e3af2;
|
||||
--color-purple-700: #6c2bd9;
|
||||
--color-purple-800: #5521b5;
|
||||
--color-purple-900: #4a1d96;
|
||||
|
||||
/* Custom orange palette */
|
||||
--color-orange-50: #fff8f1;
|
||||
--color-orange-100: #feecdc;
|
||||
--color-orange-200: #fcd9bd;
|
||||
--color-orange-300: #fdba8c;
|
||||
--color-orange-400: #ff8a4c;
|
||||
--color-orange-500: #ff5a1f;
|
||||
--color-orange-600: #d03801;
|
||||
--color-orange-700: #b43403;
|
||||
--color-orange-800: #8a2c0d;
|
||||
--color-orange-900: #771d1d;
|
||||
|
||||
/* Custom green palette */
|
||||
--color-green-50: #f3faf7;
|
||||
--color-green-100: #def7ec;
|
||||
--color-green-200: #bcf0da;
|
||||
--color-green-300: #84e1bc;
|
||||
--color-green-400: #31c48d;
|
||||
--color-green-500: #0e9f6e;
|
||||
--color-green-600: #057a55;
|
||||
--color-green-700: #046c4e;
|
||||
--color-green-800: #03543f;
|
||||
--color-green-900: #014737;
|
||||
|
||||
/* Custom red palette */
|
||||
--color-red-50: #fdf2f2;
|
||||
--color-red-100: #fde8e8;
|
||||
--color-red-200: #fbd5d5;
|
||||
--color-red-300: #f8b4b4;
|
||||
--color-red-400: #f98080;
|
||||
--color-red-500: #f05252;
|
||||
--color-red-600: #e02424;
|
||||
--color-red-700: #c81e1e;
|
||||
--color-red-800: #9b1c1c;
|
||||
--color-red-900: #771d1d;
|
||||
|
||||
/* Custom yellow palette */
|
||||
--color-yellow-50: #fdfdea;
|
||||
--color-yellow-100: #fdf6b2;
|
||||
--color-yellow-200: #fce96a;
|
||||
--color-yellow-300: #faca15;
|
||||
--color-yellow-400: #e3a008;
|
||||
--color-yellow-500: #c27803;
|
||||
--color-yellow-600: #9f580a;
|
||||
--color-yellow-700: #8e4b10;
|
||||
--color-yellow-800: #723b13;
|
||||
--color-yellow-900: #633112;
|
||||
|
||||
/* Custom teal palette */
|
||||
--color-teal-50: #edfafa;
|
||||
--color-teal-100: #d5f5f6;
|
||||
--color-teal-200: #afecef;
|
||||
--color-teal-300: #7edce2;
|
||||
--color-teal-400: #16bdca;
|
||||
--color-teal-500: #0694a2;
|
||||
--color-teal-600: #047481;
|
||||
--color-teal-700: #036672;
|
||||
--color-teal-800: #05505c;
|
||||
--color-teal-900: #014451;
|
||||
|
||||
/* Custom blue palette */
|
||||
--color-blue-50: #ebf5ff;
|
||||
--color-blue-100: #e1effe;
|
||||
--color-blue-200: #c3ddfd;
|
||||
--color-blue-300: #a4cafe;
|
||||
--color-blue-400: #76a9fa;
|
||||
--color-blue-500: #3f83f8;
|
||||
--color-blue-600: #1c64f2;
|
||||
--color-blue-700: #1a56db;
|
||||
--color-blue-800: #1e429f;
|
||||
--color-blue-900: #233876;
|
||||
|
||||
/* Custom indigo palette */
|
||||
--color-indigo-50: #f0f5ff;
|
||||
--color-indigo-100: #e5edff;
|
||||
--color-indigo-200: #cddbfe;
|
||||
--color-indigo-300: #b4c6fc;
|
||||
--color-indigo-400: #8da2fb;
|
||||
--color-indigo-500: #6875f5;
|
||||
--color-indigo-600: #5850ec;
|
||||
--color-indigo-700: #5145cd;
|
||||
--color-indigo-800: #42389d;
|
||||
--color-indigo-900: #362f78;
|
||||
|
||||
/* Custom pink palette */
|
||||
--color-pink-50: #fdf2f8;
|
||||
--color-pink-100: #fce8f3;
|
||||
--color-pink-200: #fad1e8;
|
||||
--color-pink-300: #f8b4d9;
|
||||
--color-pink-400: #f17eb8;
|
||||
--color-pink-500: #e74694;
|
||||
--color-pink-600: #d61f69;
|
||||
--color-pink-700: #bf125d;
|
||||
--color-pink-800: #99154b;
|
||||
--color-pink-900: #751a3d;
|
||||
|
||||
/* Cool gray palette */
|
||||
--color-cool-gray-50: #fbfdfe;
|
||||
--color-cool-gray-100: #f1f5f9;
|
||||
--color-cool-gray-200: #e2e8f0;
|
||||
--color-cool-gray-300: #cfd8e3;
|
||||
--color-cool-gray-400: #97a6ba;
|
||||
--color-cool-gray-500: #64748b;
|
||||
--color-cool-gray-600: #475569;
|
||||
--color-cool-gray-700: #364152;
|
||||
--color-cool-gray-800: #27303f;
|
||||
--color-cool-gray-900: #1a202e;
|
||||
|
||||
/* Font family */
|
||||
--font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
||||
|
||||
/* Custom max-height */
|
||||
--spacing-xl: 36rem;
|
||||
}
|
||||
|
||||
/* Dark mode variant - uses class on html element */
|
||||
@variant dark (&:where(.dark, .dark *));
|
||||
|
||||
/* Custom utilities layer */
|
||||
@layer utilities {
|
||||
/* Hide number input spinners */
|
||||
.no-spinner::-webkit-outer-spin-button,
|
||||
.no-spinner::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
.no-spinner {
|
||||
-moz-appearance: textfield;
|
||||
appearance: textfield;
|
||||
}
|
||||
|
||||
/* Shadow outline utilities for focus states */
|
||||
.shadow-outline-gray {
|
||||
box-shadow: 0 0 0 3px hsla(220, 9%, 83%, 0.45);
|
||||
}
|
||||
.shadow-outline-purple {
|
||||
box-shadow: 0 0 0 3px hsla(262, 97%, 81%, 0.45);
|
||||
}
|
||||
.shadow-outline-red {
|
||||
box-shadow: 0 0 0 3px hsla(0, 91%, 85%, 0.45);
|
||||
}
|
||||
.shadow-outline-orange {
|
||||
box-shadow: 0 0 0 3px hsla(22, 97%, 77%, 0.45);
|
||||
}
|
||||
.shadow-outline-green {
|
||||
box-shadow: 0 0 0 3px hsla(152, 68%, 70%, 0.45);
|
||||
}
|
||||
.shadow-outline-blue {
|
||||
box-shadow: 0 0 0 3px hsla(215, 96%, 81%, 0.45);
|
||||
}
|
||||
.shadow-outline-yellow {
|
||||
box-shadow: 0 0 0 3px hsla(46, 97%, 65%, 0.45);
|
||||
}
|
||||
.shadow-outline-teal {
|
||||
box-shadow: 0 0 0 3px hsla(182, 68%, 69%, 0.45);
|
||||
}
|
||||
.shadow-outline-indigo {
|
||||
box-shadow: 0 0 0 3px hsla(226, 95%, 85%, 0.45);
|
||||
}
|
||||
.shadow-outline-pink {
|
||||
box-shadow: 0 0 0 3px hsla(330, 89%, 83%, 0.45);
|
||||
}
|
||||
}
|
||||
|
||||
/* Shop-specific component styles */
|
||||
@layer components {
|
||||
/* Form input styles */
|
||||
.form-input,
|
||||
.form-textarea,
|
||||
.form-select,
|
||||
.form-multiselect {
|
||||
@apply block w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm shadow-sm transition-colors;
|
||||
@apply focus:border-purple-500 focus:outline-none focus:ring-1 focus:ring-purple-500;
|
||||
@apply placeholder:text-gray-400;
|
||||
}
|
||||
|
||||
/* Dark mode form inputs */
|
||||
.dark .form-input,
|
||||
.dark .form-textarea,
|
||||
.dark .form-select,
|
||||
.dark .form-multiselect {
|
||||
@apply border-gray-600 bg-gray-700 text-gray-200;
|
||||
@apply focus:border-purple-400 focus:ring-purple-400;
|
||||
@apply placeholder:text-gray-500;
|
||||
}
|
||||
|
||||
/* Checkbox styles */
|
||||
.form-checkbox {
|
||||
@apply h-4 w-4 rounded border-gray-300 text-purple-600 transition-colors;
|
||||
@apply focus:ring-2 focus:ring-purple-500 focus:ring-offset-2;
|
||||
}
|
||||
|
||||
.dark .form-checkbox {
|
||||
@apply border-gray-600 bg-gray-700;
|
||||
@apply focus:ring-purple-400 focus:ring-offset-gray-800;
|
||||
}
|
||||
|
||||
/* Radio styles */
|
||||
.form-radio {
|
||||
@apply h-4 w-4 border-gray-300 text-purple-600 transition-colors;
|
||||
@apply focus:ring-2 focus:ring-purple-500 focus:ring-offset-2;
|
||||
}
|
||||
|
||||
.dark .form-radio {
|
||||
@apply border-gray-600 bg-gray-700;
|
||||
@apply focus:ring-purple-400 focus:ring-offset-gray-800;
|
||||
}
|
||||
|
||||
/* Shop-specific button using CSS variable for vendor theming */
|
||||
.btn-shop-primary {
|
||||
background-color: var(--color-primary, #7e3af2);
|
||||
@apply text-white px-4 py-2 rounded-lg font-medium transition-all;
|
||||
}
|
||||
|
||||
.btn-shop-primary:hover {
|
||||
filter: brightness(0.9);
|
||||
}
|
||||
|
||||
/* Product card hover effect */
|
||||
.product-card {
|
||||
@apply bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden transition-all duration-300;
|
||||
}
|
||||
|
||||
.product-card:hover {
|
||||
@apply shadow-xl -translate-y-1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Base layer for default styles */
|
||||
@layer base {
|
||||
/* Default body styles */
|
||||
body {
|
||||
@apply bg-gray-50 text-gray-900 antialiased;
|
||||
}
|
||||
|
||||
/* Dark mode body */
|
||||
.dark body {
|
||||
@apply bg-gray-900 text-gray-200;
|
||||
}
|
||||
|
||||
/* Focus visible for accessibility */
|
||||
:focus-visible {
|
||||
@apply outline-2 outline-offset-2 outline-purple-500;
|
||||
}
|
||||
|
||||
.dark :focus-visible {
|
||||
@apply outline-purple-400;
|
||||
}
|
||||
}
|
||||
2
static/storefront/css/tailwind.output.css
Normal file
2
static/storefront/css/tailwind.output.css
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user