@o2vend/theme-cli 1.0.32

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.
Files changed (116) hide show
  1. package/README.md +425 -0
  2. package/assets/Logo_o2vend.png +0 -0
  3. package/assets/favicon.png +0 -0
  4. package/assets/logo-white.png +0 -0
  5. package/bin/o2vend +42 -0
  6. package/config/widget-map.json +50 -0
  7. package/lib/commands/check.js +201 -0
  8. package/lib/commands/generate.js +33 -0
  9. package/lib/commands/init.js +214 -0
  10. package/lib/commands/optimize.js +216 -0
  11. package/lib/commands/package.js +208 -0
  12. package/lib/commands/serve.js +105 -0
  13. package/lib/commands/validate.js +191 -0
  14. package/lib/lib/api-client.js +357 -0
  15. package/lib/lib/dev-server.js +2618 -0
  16. package/lib/lib/file-watcher.js +80 -0
  17. package/lib/lib/hot-reload.js +106 -0
  18. package/lib/lib/liquid-engine.js +822 -0
  19. package/lib/lib/liquid-filters.js +671 -0
  20. package/lib/lib/mock-api-server.js +989 -0
  21. package/lib/lib/mock-data.js +1468 -0
  22. package/lib/lib/widget-service.js +321 -0
  23. package/package.json +70 -0
  24. package/test-theme/README.md +27 -0
  25. package/test-theme/assets/async-sections.js +446 -0
  26. package/test-theme/assets/cart-drawer.js +463 -0
  27. package/test-theme/assets/cart-manager.js +223 -0
  28. package/test-theme/assets/checkout-price-handler.js +368 -0
  29. package/test-theme/assets/components.css +4629 -0
  30. package/test-theme/assets/delivery-zone.css +299 -0
  31. package/test-theme/assets/delivery-zone.js +396 -0
  32. package/test-theme/assets/logo.png +0 -0
  33. package/test-theme/assets/sections.css +48 -0
  34. package/test-theme/assets/theme.css +3500 -0
  35. package/test-theme/assets/theme.js +3745 -0
  36. package/test-theme/config/settings_data.json +292 -0
  37. package/test-theme/config/settings_schema.json +1050 -0
  38. package/test-theme/layout/theme.liquid +195 -0
  39. package/test-theme/locales/en.default.json +260 -0
  40. package/test-theme/sections/content-fallback.liquid +53 -0
  41. package/test-theme/sections/content.liquid +57 -0
  42. package/test-theme/sections/footer-fallback.liquid +328 -0
  43. package/test-theme/sections/footer.liquid +278 -0
  44. package/test-theme/sections/header-fallback.liquid +1805 -0
  45. package/test-theme/sections/header.liquid +1145 -0
  46. package/test-theme/sections/hero-fallback.liquid +212 -0
  47. package/test-theme/sections/hero.liquid +136 -0
  48. package/test-theme/snippets/account-sidebar.liquid +200 -0
  49. package/test-theme/snippets/add-to-cart-modal.liquid +484 -0
  50. package/test-theme/snippets/breadcrumbs.liquid +134 -0
  51. package/test-theme/snippets/cart-drawer.liquid +467 -0
  52. package/test-theme/snippets/delivery-zone-city-selector.liquid +79 -0
  53. package/test-theme/snippets/delivery-zone-modal.liquid +337 -0
  54. package/test-theme/snippets/delivery-zone-search.liquid +78 -0
  55. package/test-theme/snippets/icon.liquid +105 -0
  56. package/test-theme/snippets/login-modal.liquid +346 -0
  57. package/test-theme/snippets/mega-menu.liquid +812 -0
  58. package/test-theme/snippets/news-thumbnail.liquid +187 -0
  59. package/test-theme/snippets/pagination.liquid +120 -0
  60. package/test-theme/snippets/price.liquid +92 -0
  61. package/test-theme/snippets/product-card-related.liquid +78 -0
  62. package/test-theme/snippets/product-card-simple.liquid +41 -0
  63. package/test-theme/snippets/product-card.liquid +697 -0
  64. package/test-theme/snippets/rating.liquid +85 -0
  65. package/test-theme/snippets/skeleton-collection-grid.liquid +114 -0
  66. package/test-theme/snippets/skeleton-product-card.liquid +124 -0
  67. package/test-theme/snippets/skeleton-product-grid.liquid +34 -0
  68. package/test-theme/snippets/social-sharing.liquid +185 -0
  69. package/test-theme/templates/account/dashboard.liquid +401 -0
  70. package/test-theme/templates/account/loyalty-redemption.liquid +405 -0
  71. package/test-theme/templates/account/loyalty.liquid +588 -0
  72. package/test-theme/templates/account/order-detail.liquid +230 -0
  73. package/test-theme/templates/account/orders.liquid +349 -0
  74. package/test-theme/templates/account/profile.liquid +758 -0
  75. package/test-theme/templates/account/register.liquid +232 -0
  76. package/test-theme/templates/account/return-orders.liquid +348 -0
  77. package/test-theme/templates/account/store-credit.liquid +464 -0
  78. package/test-theme/templates/account/subscriptions.liquid +601 -0
  79. package/test-theme/templates/account/wishlist.liquid +419 -0
  80. package/test-theme/templates/address-book.liquid +1092 -0
  81. package/test-theme/templates/categories.liquid +452 -0
  82. package/test-theme/templates/checkout.liquid +4511 -0
  83. package/test-theme/templates/error.liquid +384 -0
  84. package/test-theme/templates/index.liquid +11 -0
  85. package/test-theme/templates/login.liquid +185 -0
  86. package/test-theme/templates/order-confirmation.liquid +720 -0
  87. package/test-theme/templates/page.liquid +297 -0
  88. package/test-theme/templates/product-detail.liquid +4363 -0
  89. package/test-theme/templates/products.liquid +518 -0
  90. package/test-theme/templates/search.liquid +922 -0
  91. package/test-theme/theme.json.example +19 -0
  92. package/test-theme/widgets/brand-carousel.liquid +676 -0
  93. package/test-theme/widgets/brand.liquid +245 -0
  94. package/test-theme/widgets/carousel.liquid +843 -0
  95. package/test-theme/widgets/category-list-carousel.liquid +656 -0
  96. package/test-theme/widgets/category-list.liquid +340 -0
  97. package/test-theme/widgets/category.liquid +475 -0
  98. package/test-theme/widgets/discount-time.liquid +176 -0
  99. package/test-theme/widgets/footer-menu.liquid +695 -0
  100. package/test-theme/widgets/footer.liquid +179 -0
  101. package/test-theme/widgets/gallery.liquid +271 -0
  102. package/test-theme/widgets/header-menu.liquid +932 -0
  103. package/test-theme/widgets/header.liquid +159 -0
  104. package/test-theme/widgets/html.liquid +214 -0
  105. package/test-theme/widgets/news.liquid +217 -0
  106. package/test-theme/widgets/product-canvas.liquid +235 -0
  107. package/test-theme/widgets/product-carousel.liquid +502 -0
  108. package/test-theme/widgets/product.liquid +45 -0
  109. package/test-theme/widgets/recently-viewed.liquid +26 -0
  110. package/test-theme/widgets/shared/product-grid.liquid +339 -0
  111. package/test-theme/widgets/simple-product.liquid +42 -0
  112. package/test-theme/widgets/single-product.liquid +610 -0
  113. package/test-theme/widgets/spacebar-carousel.liquid +663 -0
  114. package/test-theme/widgets/spacebar.liquid +279 -0
  115. package/test-theme/widgets/splash.liquid +378 -0
  116. package/test-theme/widgets/testimonial-carousel.liquid +709 -0
@@ -0,0 +1,297 @@
1
+ {% layout 'layout/theme' %}
2
+
3
+ {% hook 'page_before' %}
4
+ <div class="page-content">
5
+ <div class="page-header">
6
+ <h1 class="page-title">{{ page.title }}</h1>
7
+ {% if page.subtitle %}
8
+ <p class="page-subtitle">{{ page.subtitle }}</p>
9
+ {% endif %}
10
+ </div>
11
+
12
+ <div class="page-body">
13
+ {% hook 'page_content_before' %}
14
+ <div class="page-content-wrapper">
15
+ {% if page.content %}
16
+ <div class="page-text">
17
+ {{ page.content }}
18
+ </div>
19
+ {% else %}
20
+ <div class="page-text">
21
+ <p>Welcome to {{ shop.name }}! This is a sample page content.</p>
22
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
23
+
24
+ <h2>Our Mission</h2>
25
+ <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
26
+
27
+ <h2>Contact Information</h2>
28
+ <p>If you have any questions or need assistance, please don't hesitate to contact us:</p>
29
+ <ul>
30
+ <li>Email: support@{{ shop.domain }}</li>
31
+ <li>Phone: (555) 123-4567</li>
32
+ <li>Address: 123 Main Street, City, State 12345</li>
33
+ </ul>
34
+ </div>
35
+ {% endif %}
36
+ </div>
37
+
38
+ <!-- Page sidebar (optional) -->
39
+ <div class="page-sidebar">
40
+ <div class="sidebar-widget">
41
+ <h3>Quick Links</h3>
42
+ <ul class="sidebar-links">
43
+ <li><a href="/">Home</a></li>
44
+ <li><a href="/products">Products</a></li>
45
+ <li><a href="/">Collections</a></li>
46
+ <li><a href="/pages/about">About Us</a></li>
47
+ <li><a href="/pages/contact">Contact</a></li>
48
+ </ul>
49
+ </div>
50
+
51
+ <div class="sidebar-widget">
52
+ <h3>Customer Service</h3>
53
+ <ul class="sidebar-links">
54
+ <li><a href="/pages/shipping">Shipping Info</a></li>
55
+ <li><a href="/pages/returns">Returns & Exchanges</a></li>
56
+ <li><a href="/pages/privacy">Privacy Policy</a></li>
57
+ <li><a href="/pages/terms">Terms of Service</a></li>
58
+ </ul>
59
+ </div>
60
+
61
+ <div class="sidebar-widget">
62
+ <h3>Newsletter</h3>
63
+ <p>Stay updated with our latest products and offers.</p>
64
+ <form class="newsletter-form" action="/webstoreapi/newsletter/subscribe" method="post">
65
+ <input type="email" name="email" placeholder="Enter your email" required>
66
+ <button type="submit" class="btn btn-primary">Subscribe</button>
67
+ </form>
68
+ </div>
69
+ </div>
70
+ {% hook 'page_content_after' %}
71
+ </div>
72
+ </div>
73
+ {% hook 'page_after' %}
74
+
75
+ <style>
76
+ .page-content {
77
+ padding: 40px 0;
78
+ }
79
+
80
+ .page-header {
81
+ text-align: center;
82
+ margin-bottom: 50px;
83
+ padding: 40px 20px;
84
+ background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
85
+ border-radius: 12px;
86
+ }
87
+
88
+ .page-title {
89
+ font-size: 3rem;
90
+ margin-bottom: 20px;
91
+ color: #333;
92
+ font-weight: 700;
93
+ }
94
+
95
+ .page-subtitle {
96
+ font-size: 1.2rem;
97
+ color: #666;
98
+ max-width: 600px;
99
+ margin: 0 auto;
100
+ }
101
+
102
+ .page-body {
103
+ display: grid;
104
+ grid-template-columns: 2fr 1fr;
105
+ gap: 60px;
106
+ max-width: 1200px;
107
+ margin: 0 auto;
108
+ }
109
+
110
+ .page-content-wrapper {
111
+ background: white;
112
+ border-radius: 12px;
113
+ padding: 40px;
114
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
115
+ }
116
+
117
+ .page-text {
118
+ line-height: 1.8;
119
+ color: #333;
120
+ }
121
+
122
+ .page-text h1,
123
+ .page-text h2,
124
+ .page-text h3,
125
+ .page-text h4,
126
+ .page-text h5,
127
+ .page-text h6 {
128
+ color: #333;
129
+ margin-top: 2rem;
130
+ margin-bottom: 1rem;
131
+ }
132
+
133
+ .page-text h2 {
134
+ font-size: 1.8rem;
135
+ border-bottom: 2px solid #667eea;
136
+ padding-bottom: 0.5rem;
137
+ }
138
+
139
+ .page-text p {
140
+ margin-bottom: 1.5rem;
141
+ color: #666;
142
+ }
143
+
144
+ .page-text ul,
145
+ .page-text ol {
146
+ margin-bottom: 1.5rem;
147
+ padding-left: 2rem;
148
+ }
149
+
150
+ .page-text li {
151
+ margin-bottom: 0.5rem;
152
+ color: #666;
153
+ }
154
+
155
+ .page-text a {
156
+ color: #667eea;
157
+ text-decoration: underline;
158
+ }
159
+
160
+ .page-text a:hover {
161
+ color: #5a6fd8;
162
+ }
163
+
164
+ .page-sidebar {
165
+ display: flex;
166
+ flex-direction: column;
167
+ gap: 30px;
168
+ }
169
+
170
+ .sidebar-widget {
171
+ background: white;
172
+ border-radius: 12px;
173
+ padding: 25px;
174
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
175
+ }
176
+
177
+ .sidebar-widget h3 {
178
+ font-size: 1.3rem;
179
+ margin-bottom: 20px;
180
+ color: #333;
181
+ font-weight: 600;
182
+ border-bottom: 2px solid #f8f9fa;
183
+ padding-bottom: 10px;
184
+ }
185
+
186
+ .sidebar-links {
187
+ list-style: none;
188
+ padding: 0;
189
+ margin: 0;
190
+ }
191
+
192
+ .sidebar-links li {
193
+ margin-bottom: 12px;
194
+ }
195
+
196
+ .sidebar-links a {
197
+ color: #666;
198
+ text-decoration: none;
199
+ padding: 8px 0;
200
+ display: block;
201
+ border-radius: 6px;
202
+ transition: all 0.3s ease;
203
+ position: relative;
204
+ padding-left: 20px;
205
+ }
206
+
207
+ .sidebar-links a::before {
208
+ content: '→';
209
+ position: absolute;
210
+ left: 0;
211
+ color: #667eea;
212
+ font-weight: bold;
213
+ transition: transform 0.3s ease;
214
+ }
215
+
216
+ .sidebar-links a:hover {
217
+ color: #667eea;
218
+ background: #f8f9ff;
219
+ padding-left: 25px;
220
+ }
221
+
222
+ .sidebar-links a:hover::before {
223
+ transform: translateX(3px);
224
+ }
225
+
226
+ .newsletter-form {
227
+ display: flex;
228
+ flex-direction: column;
229
+ gap: 15px;
230
+ }
231
+
232
+ .newsletter-form input {
233
+ padding: 12px 15px;
234
+ border: 2px solid #e1e5e9;
235
+ border-radius: 8px;
236
+ font-size: 1rem;
237
+ transition: border-color 0.3s ease;
238
+ }
239
+
240
+ .newsletter-form input:focus {
241
+ outline: none;
242
+ border-color: #667eea;
243
+ box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
244
+ }
245
+
246
+ .newsletter-form button {
247
+ padding: 12px 20px;
248
+ font-size: 1rem;
249
+ font-weight: 500;
250
+ }
251
+
252
+ /* Responsive Design */
253
+ @media (max-width: 768px) {
254
+ .page-body {
255
+ grid-template-columns: 1fr;
256
+ gap: 40px;
257
+ }
258
+
259
+ .page-content-wrapper {
260
+ padding: 30px 20px;
261
+ }
262
+
263
+ .page-title {
264
+ font-size: 2.5rem;
265
+ }
266
+
267
+ .page-header {
268
+ padding: 30px 20px;
269
+ }
270
+
271
+ .sidebar-widget {
272
+ padding: 20px;
273
+ }
274
+ }
275
+
276
+ @media (max-width: 480px) {
277
+ .page-content {
278
+ padding: 20px 0;
279
+ }
280
+
281
+ .page-content-wrapper {
282
+ padding: 20px 15px;
283
+ }
284
+
285
+ .page-title {
286
+ font-size: 2rem;
287
+ }
288
+
289
+ .page-header {
290
+ padding: 20px 15px;
291
+ }
292
+
293
+ .sidebar-widget {
294
+ padding: 15px;
295
+ }
296
+ }
297
+ </style>