@o2vend/theme-cli 1.0.37 → 1.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib/dev-server.js +309 -40
- package/lib/lib/liquid-engine.js +3 -1
- package/lib/lib/mock-data.js +36 -124
- package/lib/lib/widget-service.js +12 -4
- package/package.json +1 -1
- package/test-theme/assets/async-sections.js +32 -24
- package/test-theme/assets/cart-drawer.js +20 -22
- package/test-theme/assets/cart-manager.js +1 -15
- package/test-theme/assets/checkout-price-handler.js +12 -11
- package/test-theme/assets/checkout.css +1415 -0
- package/test-theme/assets/checkout.js +3174 -0
- package/test-theme/assets/components.css +178 -29
- package/test-theme/assets/delivery-zone.js +1 -1
- package/test-theme/assets/product-detail.css +1050 -0
- package/test-theme/assets/product-detail.js +2940 -0
- package/test-theme/assets/theme.css +95 -120
- package/test-theme/assets/theme.js +781 -186
- package/test-theme/layout/theme.liquid +91 -17
- package/test-theme/sections/content.liquid +64 -57
- package/test-theme/sections/footer-fallback.liquid +57 -7
- package/test-theme/sections/footer.liquid +63 -12
- package/test-theme/sections/header-fallback.liquid +41 -41
- package/test-theme/sections/header.liquid +41 -51
- package/test-theme/sections/hero-fallback.liquid +1 -1
- package/test-theme/sections/hero.liquid +159 -136
- package/test-theme/snippets/account-sidebar.liquid +121 -29
- package/test-theme/snippets/add-to-cart-modal.liquid +258 -206
- package/test-theme/snippets/breadcrumbs.liquid +98 -11
- package/test-theme/snippets/cart-drawer.liquid +93 -0
- package/test-theme/snippets/delivery-zone-city-selector.liquid +101 -15
- package/test-theme/snippets/delivery-zone-modal.liquid +529 -84
- package/test-theme/snippets/delivery-zone-search.liquid +104 -18
- package/test-theme/snippets/login-modal.liquid +269 -82
- package/test-theme/snippets/mega-menu.liquid +130 -43
- package/test-theme/snippets/news-thumbnail.liquid +120 -28
- package/test-theme/snippets/pagination.liquid +1 -1
- package/test-theme/snippets/price.liquid +100 -9
- package/test-theme/snippets/product-card-related.liquid +22 -4
- package/test-theme/snippets/product-card-simple.liquid +521 -25
- package/test-theme/snippets/product-card.liquid +145 -232
- package/test-theme/snippets/rating.liquid +100 -9
- package/test-theme/snippets/skeleton-collection-grid.liquid +94 -8
- package/test-theme/snippets/skeleton-product-card.liquid +102 -16
- package/test-theme/snippets/skeleton-product-grid.liquid +87 -1
- package/test-theme/snippets/social-sharing.liquid +133 -32
- package/test-theme/templates/account/dashboard.liquid +30 -0
- package/test-theme/templates/account/loyalty-redemption.liquid +29 -28
- package/test-theme/templates/account/loyalty.liquid +45 -43
- package/test-theme/templates/account/order-detail.liquid +15 -8
- package/test-theme/templates/account/orders.liquid +189 -35
- package/test-theme/templates/account/profile.liquid +509 -114
- package/test-theme/templates/account/register.liquid +18 -8
- package/test-theme/templates/account/return-orders.liquid +31 -30
- package/test-theme/templates/account/store-credit.liquid +27 -26
- package/test-theme/templates/account/subscriptions.liquid +22 -5
- package/test-theme/templates/account/wishlist.liquid +88 -19
- package/test-theme/templates/address-book.liquid +166 -69
- package/test-theme/templates/categories.liquid +90 -30
- package/test-theme/templates/checkout.liquid +137 -3834
- package/test-theme/templates/error.liquid +23 -21
- package/test-theme/templates/index.liquid +29 -0
- package/test-theme/templates/login.liquid +33 -6
- package/test-theme/templates/order-confirmation.liquid +67 -9
- package/test-theme/templates/page.liquid +418 -206
- package/test-theme/templates/product-detail.liquid +124 -3878
- package/test-theme/templates/products.liquid +155 -30
- package/test-theme/templates/search.liquid +739 -225
- package/test-theme/widgets/brand-carousel.liquid +102 -82
- package/test-theme/widgets/brand.liquid +78 -50
- package/test-theme/widgets/carousel.liquid +253 -121
- package/test-theme/widgets/category-list-carousel.liquid +32 -8
- package/test-theme/widgets/category-list.liquid +21 -6
- package/test-theme/widgets/category.liquid +104 -37
- package/test-theme/widgets/discount-time.liquid +326 -119
- package/test-theme/widgets/footer-menu.liquid +115 -23
- package/test-theme/widgets/footer.liquid +118 -5
- package/test-theme/widgets/gallery.liquid +29 -5
- package/test-theme/widgets/header-menu.liquid +25 -13
- package/test-theme/widgets/header.liquid +64 -26
- package/test-theme/widgets/html.liquid +29 -6
- package/test-theme/widgets/news.liquid +6 -0
- package/test-theme/widgets/product-canvas.liquid +20 -12
- package/test-theme/widgets/product-carousel.liquid +118 -56
- package/test-theme/widgets/shared/product-grid.liquid +12 -0
- package/test-theme/widgets/single-product.liquid +688 -250
- package/test-theme/widgets/spacebar-carousel.liquid +39 -10
- package/test-theme/widgets/spacebar.liquid +77 -6
- package/test-theme/widgets/splash.liquid +40 -30
- package/test-theme/widgets/testimonial-carousel.liquid +111 -67
|
@@ -58,34 +58,125 @@
|
|
|
58
58
|
</div>
|
|
59
59
|
|
|
60
60
|
<style>
|
|
61
|
+
:root {
|
|
62
|
+
--color-primary: {{ settings.color_primary | default: '#000000' }};
|
|
63
|
+
--color-primary-hover: {{ settings.color_primary_dark | default: '#333333' }};
|
|
64
|
+
--color-primary-light: {{ settings.color_primary_light | default: '#666666' }};
|
|
65
|
+
--color-success: {{ settings.color_success | default: '#22c55e' }};
|
|
66
|
+
--color-success-light: {{ settings.color_success | default: '#22c55e' }};
|
|
67
|
+
--color-success-dark: {{ settings.color_success | default: '#22c55e' }};
|
|
68
|
+
--color-danger: {{ settings.color_error | default: '#ef4444' }};
|
|
69
|
+
--color-danger-light: {{ settings.color_error | default: '#ef4444' }};
|
|
70
|
+
--color-danger-dark: {{ settings.color_error | default: '#ef4444' }};
|
|
71
|
+
--color-text: {{ settings.color_text | default: '#000000' }};
|
|
72
|
+
--color-text-light: {{ settings.color_text_light | default: '#999999' }};
|
|
73
|
+
--color-text-muted: {{ settings.color_text_muted | default: '#666666' }};
|
|
74
|
+
--color-background: {{ settings.color_background | default: '#ffffff' }};
|
|
75
|
+
--color-card-bg: {{ settings.color_surface | default: '#f5f5f5' }};
|
|
76
|
+
--color-border: {{ settings.color_border | default: '#cccccc' }};
|
|
77
|
+
--color-border-light: {{ settings.color_surface | default: '#f5f5f5' }};
|
|
78
|
+
--color-white: #ffffff;
|
|
79
|
+
--color-black: {{ settings.color_primary_dark | default: '#333333' }};
|
|
80
|
+
--color-gray-25: {{ settings.color_background | default: '#ffffff' }};
|
|
81
|
+
--color-gray-50: {{ settings.color_surface | default: '#f5f5f5' }};
|
|
82
|
+
--color-gray-100: {{ settings.color_surface | default: '#f5f5f5' }};
|
|
83
|
+
--color-gray-200: {{ settings.color_border | default: '#cccccc' }};
|
|
84
|
+
--color-gray-300: {{ settings.color_border | default: '#cccccc' }};
|
|
85
|
+
--color-gray-400: {{ settings.color_text_muted | default: '#666666' }};
|
|
86
|
+
--color-gray-500: {{ settings.color_text_muted | default: '#666666' }};
|
|
87
|
+
--color-gray-600: {{ settings.color_text_muted | default: '#666666' }};
|
|
88
|
+
--color-gray-700: {{ settings.color_text | default: '#000000' }};
|
|
89
|
+
--color-gray-800: {{ settings.color_text | default: '#000000' }};
|
|
90
|
+
--color-gray-900: {{ settings.color_text | default: '#000000' }};
|
|
91
|
+
/* Shadow variables - mapped from settings */
|
|
92
|
+
--shadow-opacity: {{ settings.shadow_opacity | default: 0.1 }};
|
|
93
|
+
--shadow-blur: {{ settings.shadow_blur | default: 8 }}px;
|
|
94
|
+
--shadow-spread: {{ settings.shadow_spread | default: 0 }}px;
|
|
95
|
+
|
|
96
|
+
/* Border radius - mapped from settings */
|
|
97
|
+
--radius-sm: {{ settings.border_radius_small | default: 6 }}px;
|
|
98
|
+
--radius-md: {{ settings.border_radius_medium | default: 10 }}px;
|
|
99
|
+
--radius-lg: {{ settings.border_radius_large | default: 16 }}px;
|
|
100
|
+
--radius-xl: 24px;
|
|
101
|
+
--radius-2xl: 32px;
|
|
102
|
+
--radius-full: 9999px;
|
|
103
|
+
|
|
104
|
+
/* Spacing - mapped from settings */
|
|
105
|
+
--spacing-xs: {{ settings.spacing_xsmall | default: 4 }}px;
|
|
106
|
+
--spacing-sm: {{ settings.spacing_small | default: 8 }}px;
|
|
107
|
+
--spacing-md: {{ settings.spacing_element | default: 16 }}px;
|
|
108
|
+
--spacing-lg: {{ settings.spacing_component | default: 24 }}px;
|
|
109
|
+
--spacing-xl: {{ settings.spacing_large | default: 32 }}px;
|
|
110
|
+
|
|
111
|
+
/* Typography - mapped from settings */
|
|
112
|
+
--font-primary: {{ settings.font_primary | default: '' }}, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
|
|
113
|
+
--font-heading: {{ settings.font_heading | default: '' }}, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
|
|
114
|
+
--font-display: {{ settings.font_display | default: '' }}, 'Georgia', 'Times New Roman', serif;
|
|
115
|
+
--font-body: {{ settings.font_body | default: '' }}, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
|
|
116
|
+
--font-weight-bold: {{ settings.font_weight_bold | default: 700 }};
|
|
117
|
+
--font-weight-medium: {{ settings.font_weight_medium | default: 500 }};
|
|
118
|
+
--line-height-heading: {{ settings.line_height_heading | default: 1.2 }};
|
|
119
|
+
|
|
120
|
+
/* Text sizes - based on font_size_base from settings */
|
|
121
|
+
--text-xs: 12px;
|
|
122
|
+
--text-sm: {{ settings.font_size_base | default: 14 }}px;
|
|
123
|
+
--text-base: {{ settings.font_size_base | default: 14 }}px;
|
|
124
|
+
--text-lg: 16px;
|
|
125
|
+
--text-xl: 18px;
|
|
126
|
+
--text-2xl: 21px;
|
|
127
|
+
|
|
128
|
+
/* Transitions - mapped from settings */
|
|
129
|
+
--transition-fast: 133ms cubic-bezier(0, 0, 0.2, 1);
|
|
130
|
+
--transition: {{ settings.button_transition_speed | default: 200 }}ms cubic-bezier(0, 0, 0.2, 1);
|
|
131
|
+
--transition-slow: 300ms cubic-bezier(0, 0, 0.2, 1);
|
|
132
|
+
--duration-150: 150ms;
|
|
133
|
+
--duration-300: 300ms;
|
|
134
|
+
--ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
135
|
+
--ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
136
|
+
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
137
|
+
|
|
138
|
+
/* Z-index values */
|
|
139
|
+
--z-10: 10;
|
|
140
|
+
--z-modal: 1050;
|
|
141
|
+
--z-dropdown: 1000;
|
|
142
|
+
|
|
143
|
+
/* Line heights - mapped from settings */
|
|
144
|
+
--leading-none: 1;
|
|
145
|
+
--leading-normal: {{ settings.line_height_base | default: 1.6 }};
|
|
146
|
+
--leading-snug: 1.375;
|
|
147
|
+
|
|
148
|
+
/* Letter spacing - mapped from settings */
|
|
149
|
+
--tracking-wider: {{ settings.letter_spacing_uppercase | default: 0.05 }}em;
|
|
150
|
+
}
|
|
151
|
+
|
|
61
152
|
.price {
|
|
62
153
|
display: flex;
|
|
63
154
|
align-items: baseline;
|
|
64
|
-
gap:
|
|
155
|
+
gap: var(--space-2);
|
|
65
156
|
flex-wrap: wrap;
|
|
66
157
|
}
|
|
67
158
|
|
|
68
159
|
.price-compare {
|
|
69
160
|
text-decoration: line-through;
|
|
70
|
-
color:
|
|
71
|
-
font-size:
|
|
161
|
+
color: var(--color-text-light);
|
|
162
|
+
font-size: var(--text-sm);
|
|
72
163
|
}
|
|
73
164
|
|
|
74
165
|
.price-sale {
|
|
75
|
-
color:
|
|
166
|
+
color: var(--color-error);
|
|
76
167
|
font-weight: 600;
|
|
77
|
-
font-size:
|
|
168
|
+
font-size: var(--text-lg);
|
|
78
169
|
}
|
|
79
170
|
|
|
80
171
|
.price-regular {
|
|
81
|
-
color:
|
|
172
|
+
color: var(--color-text);
|
|
82
173
|
font-weight: 600;
|
|
83
|
-
font-size:
|
|
174
|
+
font-size: var(--text-lg);
|
|
84
175
|
}
|
|
85
176
|
|
|
86
177
|
.price-currency {
|
|
87
|
-
font-size:
|
|
88
|
-
color:
|
|
178
|
+
font-size: var(--text-xs);
|
|
179
|
+
color: var(--color-text-light);
|
|
89
180
|
text-transform: uppercase;
|
|
90
181
|
}
|
|
91
182
|
</style>
|
|
@@ -8,7 +8,25 @@
|
|
|
8
8
|
{% include 'snippets/product-card-related', product: related %}
|
|
9
9
|
{% endcomment %}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
{% assign related_variants = product.variations | default: product.variants | default: empty %}
|
|
12
|
+
{% assign related_product_url = product.url | default: product.Url | default: product.slug | default: product.id %}
|
|
13
|
+
{% assign related_image = product.thumbnailImage | default: product.imageUrl %}
|
|
14
|
+
{% if related_image == blank and product.images and product.images.first %}
|
|
15
|
+
{% assign related_image = product.images.first %}
|
|
16
|
+
{% endif %}
|
|
17
|
+
|
|
18
|
+
<div class="product-card"
|
|
19
|
+
data-product-id="{{ product.productId | default: product.id }}"
|
|
20
|
+
data-base-product-id="{{ product.productId | default: product.id }}"
|
|
21
|
+
data-price="{{ product.prices.price | default: 0 }}"
|
|
22
|
+
data-price-string="{{ product.prices.priceString | default: product.prices.price | money_with_settings: shop.settings }}"
|
|
23
|
+
data-name="{{ product.name | default: product.title | downcase }}"
|
|
24
|
+
data-title="{{ product.name | default: product.title }}"
|
|
25
|
+
data-product-url="{{ related_product_url }}"
|
|
26
|
+
{% if related_image %}data-image="{{ related_image }}"{% endif %}
|
|
27
|
+
data-product-type="{{ product.productType | default: product.type | default: 0 }}"
|
|
28
|
+
data-variants-count="{% if related_variants and related_variants.size > 0 %}{{ related_variants.size }}{% else %}0{% endif %}"
|
|
29
|
+
data-availability="{% if product.stockQuantity > 0 or product.inStock or product.available %}in-stock{% else %}out-of-stock{% endif %}">
|
|
12
30
|
<div class="product-card-image">
|
|
13
31
|
<a href="/{{ product.slug | default: product.id }}">
|
|
14
32
|
{% if product.thumbnailImage %}
|
|
@@ -41,12 +59,12 @@
|
|
|
41
59
|
</div>
|
|
42
60
|
|
|
43
61
|
<div class="product-card-actions">
|
|
44
|
-
<button class="action-btn wishlist-btn" data-product-id="{{ product.productId }}" aria-label="Add to wishlist">
|
|
62
|
+
<button class="action-btn wishlist-btn" data-product-id="{{ product.productId | default: product.id }}" aria-label="Add to wishlist">
|
|
45
63
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
46
64
|
<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>
|
|
47
65
|
</svg>
|
|
48
66
|
</button>
|
|
49
|
-
<button class="action-btn quick-view-btn" data-product-id="{{ product.productId }}" aria-label="Quick view">
|
|
67
|
+
<button class="action-btn quick-view-btn" data-product-id="{{ product.productId | default: product.id }}" aria-label="Quick view">
|
|
50
68
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
51
69
|
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
|
|
52
70
|
<circle cx="12" cy="12" r="3"></circle>
|
|
@@ -70,7 +88,7 @@
|
|
|
70
88
|
<span class="price-compare">{{ product.prices.mrpString | default: product.prices.mrp | money_with_settings: shop.settings }}</span>
|
|
71
89
|
{% endif %}
|
|
72
90
|
</div>
|
|
73
|
-
<button class="btn btn-primary btn-sm add-to-cart-quick" data-product-id="{{ product.productId }}">
|
|
91
|
+
<button class="btn btn-primary btn-sm add-to-cart-quick" data-product-id="{{ product.productId | default: product.id }}">
|
|
74
92
|
Quick Add
|
|
75
93
|
</button>
|
|
76
94
|
</div>
|