@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,212 @@
1
+ {% comment %}
2
+ Hero Fallback Content
3
+ Used when widgets are not available or widget mode is disabled
4
+ {% endcomment %}
5
+
6
+ {% assign hero_image = section.settings.hero_image | default: '/assets/hero-placeholder.jpg' %}
7
+ {% assign hero_title = section.settings.hero_title | default: shop.name %}
8
+ {% assign hero_subtitle = section.settings.hero_subtitle | default: 'Discover our curated collection' %}
9
+ {% assign hero_button_text = section.settings.hero_button_text | default: 'Shop Now' %}
10
+ {% assign hero_button_url = section.settings.hero_button_url | default: '/collections/all' %}
11
+ {% assign hero_button_2_text = section.settings.hero_button_2_text %}
12
+ {% assign hero_button_2_url = section.settings.hero_button_2_url %}
13
+ {% assign hero_text_position = section.settings.text_position | default: 'center' %}
14
+ {% assign hero_text_color = section.settings.text_color | default: 'white' %}
15
+ {% assign hero_overlay_opacity = section.settings.overlay_opacity | default: 0.4 %}
16
+
17
+ <section class="hero-banner"
18
+ style="background-image: url('{{ hero_image }}');"
19
+ data-hero-banner>
20
+
21
+ <div class="hero-overlay"
22
+ style="background: rgba(0, 0, 0, {{ hero_overlay_opacity }});"></div>
23
+
24
+ <div class="hero-content hero-content--{{ hero_text_position }}">
25
+ <div class="hero-container">
26
+ <div class="hero-text" style="color: {{ hero_text_color }};">
27
+ {% if hero_title != blank %}
28
+ <h1 class="hero-title">{{ hero_title }}</h1>
29
+ {% endif %}
30
+
31
+ {% if hero_subtitle != blank %}
32
+ <p class="hero-subtitle">{{ hero_subtitle }}</p>
33
+ {% endif %}
34
+
35
+ <div class="hero-actions">
36
+ {% if hero_button_text != blank and hero_button_url != blank %}
37
+ <a href="{{ hero_button_url }}" class="hero-button hero-button--primary">
38
+ {{ hero_button_text }}
39
+ </a>
40
+ {% endif %}
41
+
42
+ {% if hero_button_2_text != blank and hero_button_2_url != blank %}
43
+ <a href="{{ hero_button_2_url }}" class="hero-button hero-button--secondary">
44
+ {{ hero_button_2_text }}
45
+ </a>
46
+ {% endif %}
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </section>
52
+
53
+ <style>
54
+ .hero-banner {
55
+ position: relative;
56
+ height: 70vh;
57
+ min-height: 500px;
58
+ background-size: cover;
59
+ background-position: center;
60
+ background-repeat: no-repeat;
61
+ display: flex;
62
+ align-items: center;
63
+ justify-content: center;
64
+ overflow: hidden;
65
+ }
66
+
67
+ .hero-overlay {
68
+ position: absolute;
69
+ top: 0;
70
+ left: 0;
71
+ right: 0;
72
+ bottom: 0;
73
+ z-index: 1;
74
+ }
75
+
76
+ .hero-content {
77
+ position: relative;
78
+ z-index: 2;
79
+ width: 100%;
80
+ height: 100%;
81
+ display: flex;
82
+ align-items: center;
83
+ justify-content: center;
84
+ }
85
+
86
+ .hero-content--left {
87
+ justify-content: flex-start;
88
+ }
89
+
90
+ .hero-content--right {
91
+ justify-content: flex-end;
92
+ }
93
+
94
+ .hero-content--center {
95
+ justify-content: center;
96
+ }
97
+
98
+ .hero-container {
99
+ max-width: {{ settings.container_width }}px;
100
+ width: 100%;
101
+ padding: 0 2rem;
102
+ }
103
+
104
+ .hero-text {
105
+ max-width: 600px;
106
+ text-align: center;
107
+ }
108
+
109
+ .hero-content--left .hero-text {
110
+ text-align: left;
111
+ }
112
+
113
+ .hero-content--right .hero-text {
114
+ text-align: right;
115
+ }
116
+
117
+ .hero-title {
118
+ font-size: 3rem;
119
+ font-weight: 700;
120
+ line-height: 1.1;
121
+ margin: 0 0 1rem 0;
122
+ text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
123
+ }
124
+
125
+ .hero-subtitle {
126
+ font-size: 1.25rem;
127
+ line-height: 1.6;
128
+ margin: 0 0 2rem 0;
129
+ opacity: 0.9;
130
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
131
+ }
132
+
133
+ .hero-actions {
134
+ display: flex;
135
+ gap: 1rem;
136
+ flex-wrap: wrap;
137
+ justify-content: center;
138
+ }
139
+
140
+ .hero-content--left .hero-actions {
141
+ justify-content: flex-start;
142
+ }
143
+
144
+ .hero-content--right .hero-actions {
145
+ justify-content: flex-end;
146
+ }
147
+
148
+ .hero-button {
149
+ display: inline-flex;
150
+ align-items: center;
151
+ justify-content: center;
152
+ padding: 1rem 2rem;
153
+ border-radius: 0.5rem;
154
+ font-weight: 600;
155
+ text-decoration: none;
156
+ transition: all 0.3s ease;
157
+ min-width: 150px;
158
+ text-align: center;
159
+ }
160
+
161
+ .hero-button--primary {
162
+ background: {{ settings.color_primary }};
163
+ color: white;
164
+ border: 2px solid {{ settings.color_primary }};
165
+ }
166
+
167
+ .hero-button--primary:hover {
168
+ background: transparent;
169
+ color: {{ settings.color_primary }};
170
+ transform: translateY(-2px);
171
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
172
+ }
173
+
174
+ .hero-button--secondary {
175
+ background: transparent;
176
+ color: {{ hero_text_color }};
177
+ border: 2px solid {{ hero_text_color }};
178
+ }
179
+
180
+ .hero-button--secondary:hover {
181
+ background: {{ hero_text_color }};
182
+ color: {{ settings.color_primary }};
183
+ transform: translateY(-2px);
184
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
185
+ }
186
+
187
+ @media (max-width: 768px) {
188
+ .hero-banner {
189
+ height: 60vh;
190
+ min-height: 400px;
191
+ }
192
+
193
+ .hero-title {
194
+ font-size: 2rem;
195
+ }
196
+
197
+ .hero-subtitle {
198
+ font-size: 1rem;
199
+ }
200
+
201
+ .hero-actions {
202
+ flex-direction: column;
203
+ align-items: center;
204
+ }
205
+
206
+ .hero-button {
207
+ width: 100%;
208
+ max-width: 250px;
209
+ }
210
+ }
211
+ </style>
212
+
@@ -0,0 +1,136 @@
1
+ {% comment %}
2
+ Hero Section
3
+
4
+ This section renders widgets from the "hero" section in order.
5
+ Widgets are rendered one below another, sorted by Position field.
6
+ Supports drag-and-drop ordering in visual editor.
7
+ {% endcomment %}
8
+
9
+ {% comment %}Hero Section - Always render, with widgets or fallback{% endcomment %}
10
+ {% assign hero_widgets = widgets.hero %}
11
+ {% if hero_widgets and hero_widgets.size > 0 %}
12
+ <section class="theme-section theme-section--hero" data-section="hero" data-section-id="{{ section.id }}">
13
+ {% for widget in hero_widgets %}
14
+ <div class="theme-widget-wrapper"
15
+ data-widget-id="{{ widget.id }}"
16
+ data-widget-type="{{ widget.type }}"
17
+ data-widget-position="{{ widget.Position | default: widget.position | default: forloop.index }}">
18
+ {{ widget | render_widget }}
19
+ </div>
20
+ {% endfor %}
21
+ </section>
22
+ <style>
23
+ .theme-section--hero .theme-widget-wrapper {
24
+ display: block;
25
+ }
26
+ .widget-error {
27
+ padding: 1rem;
28
+ background: #fee2e2;
29
+ border: 1px solid #fecaca;
30
+ border-radius: 0.5rem;
31
+ color: #991b1b;
32
+ font-size: 0.875rem;
33
+ }
34
+ </style>
35
+ {% else %}
36
+ {% render 'sections/hero-fallback' %}
37
+ {% endif %}
38
+
39
+ {% schema %}
40
+ {
41
+ "name": "Hero",
42
+ "settings": [
43
+ {
44
+ "type": "paragraph",
45
+ "content": "This section displays widgets from the 'hero' section. Widgets are automatically ordered by their Position field and can be reordered in the visual editor."
46
+ },
47
+ {
48
+ "type": "image_picker",
49
+ "id": "hero_image",
50
+ "label": "Hero Image",
51
+ "info": "Recommended size: 1920x800px"
52
+ },
53
+ {
54
+ "type": "text",
55
+ "id": "hero_title",
56
+ "label": "Hero Title",
57
+ "default": "Welcome to Our Store"
58
+ },
59
+ {
60
+ "type": "textarea",
61
+ "id": "hero_subtitle",
62
+ "label": "Hero Subtitle",
63
+ "default": "Discover amazing products at great prices"
64
+ },
65
+ {
66
+ "type": "text",
67
+ "id": "hero_button_text",
68
+ "label": "Primary Button Text",
69
+ "default": "Shop Now"
70
+ },
71
+ {
72
+ "type": "url",
73
+ "id": "hero_button_url",
74
+ "label": "Primary Button URL",
75
+ "default": "/collections/all"
76
+ },
77
+ {
78
+ "type": "text",
79
+ "id": "hero_button_2_text",
80
+ "label": "Secondary Button Text"
81
+ },
82
+ {
83
+ "type": "url",
84
+ "id": "hero_button_2_url",
85
+ "label": "Secondary Button URL"
86
+ },
87
+ {
88
+ "type": "select",
89
+ "id": "text_position",
90
+ "label": "Text Position",
91
+ "options": [
92
+ {
93
+ "value": "left",
94
+ "label": "Left"
95
+ },
96
+ {
97
+ "value": "center",
98
+ "label": "Center"
99
+ },
100
+ {
101
+ "value": "right",
102
+ "label": "Right"
103
+ }
104
+ ],
105
+ "default": "center"
106
+ },
107
+ {
108
+ "type": "color",
109
+ "id": "text_color",
110
+ "label": "Text Color",
111
+ "default": "#ffffff"
112
+ },
113
+ {
114
+ "type": "range",
115
+ "id": "overlay_opacity",
116
+ "label": "Overlay Opacity",
117
+ "min": 0,
118
+ "max": 0.8,
119
+ "step": 0.1,
120
+ "default": 0.4
121
+ }
122
+ ],
123
+ "presets": [
124
+ {
125
+ "name": "Hero",
126
+ "settings": {
127
+ "hero_title": "Welcome to Our Store",
128
+ "hero_subtitle": "Discover amazing products at great prices",
129
+ "hero_button_text": "Shop Now",
130
+ "hero_button_url": "/collections/all"
131
+ }
132
+ }
133
+ ]
134
+ }
135
+ {% endschema %}
136
+
@@ -0,0 +1,200 @@
1
+ <!-- Mobile Menu Button -->
2
+ <button class="account-menu-toggle" aria-label="Open account menu">
3
+ <span class="menu-icon">☰</span>
4
+ <span>Account Menu</span>
5
+ </button>
6
+
7
+ <!-- Overlay -->
8
+ <div class="account-nav-overlay"></div>
9
+
10
+ <!-- Sidebar Navigation -->
11
+ <nav class="account-nav">
12
+ <div class="account-nav-header">
13
+ <span>My Account</span>
14
+ <button class="account-nav-close" aria-label="Close menu">✕</button>
15
+ </div>
16
+
17
+ <div class="account-nav-links">
18
+ <a href="/account" class="account-nav-link{% if page.handle == 'dashboard' %} active{% endif %}">Dashboard</a>
19
+ <a href="/orders" class="account-nav-link{% if page.handle == 'orders' or page.handle == 'order_detail' %} active{% endif %}">Orders</a>
20
+ <a href="/return-orders" class="account-nav-link{% if page.handle == 'return_orders' or page.handle == 'order_detail' %} active{% endif %}">Return Orders</a>
21
+ <a href="/addresses" class="account-nav-link{% if page.handle == 'addresses' %} active{% endif %}">Addresses</a>
22
+ <a href="/profile" class="account-nav-link{% if page.handle == 'profile' %} active{% endif %}">Profile</a>
23
+ <a href="/wishlist" class="account-nav-link{% if page.handle == 'wishlist' %} active{% endif %}">Wishlist</a>
24
+ <a href="/loyalty" class="account-nav-link{% if page.handle == 'loyalty' %} active{% endif %}">Loyalty Program</a>
25
+ <a href="/loyalty-redemption" class="account-nav-link{% if page.handle == 'loyalty-redemption' %} active{% endif %}">Loyalty Redemption</a>
26
+ <a href="/store-credit" class="account-nav-link{% if page.handle == 'store_credit' %} active{% endif %}">Store Credit</a>
27
+ <a href="/subscriptions" class="account-nav-link{% if page.handle == 'subscriptions' %} active{% endif %}">Subscription</a>
28
+ </div>
29
+ </nav>
30
+
31
+ <style>/* ===============================
32
+ Account Menu Toggle Button
33
+ ================================ */
34
+ .account-menu-toggle {
35
+ display: none;
36
+ align-items: center;
37
+ gap: 8px;
38
+ background: white;
39
+ color: black;
40
+ padding: 12px 16px;
41
+ border-radius: 10px;
42
+ border: none;
43
+ font-size: 15px;
44
+ font-weight: 500;
45
+ cursor: pointer;
46
+ z-index: 9997;
47
+ }
48
+
49
+ /* ===============================
50
+ Overlay
51
+ ================================ */
52
+ .account-nav-overlay {
53
+ position: fixed;
54
+ inset: 0;
55
+ background: rgba(0, 0, 0, 0.45);
56
+ backdrop-filter: blur(4px);
57
+ opacity: 0;
58
+ visibility: hidden;
59
+ transition: opacity 0.35s ease, visibility 0.35s ease;
60
+ z-index: 9998;
61
+ }
62
+
63
+ /* ===============================
64
+ Sidebar Base (Desktop)
65
+ ================================ */
66
+ .account-nav {
67
+ display: flex;
68
+ flex-direction: column;
69
+ z-index: 9999;
70
+ }
71
+
72
+ /* ===============================
73
+ Sidebar Header
74
+ ================================ */
75
+ .account-nav-header {
76
+ display: flex;
77
+ align-items: center;
78
+ justify-content: space-between;
79
+ padding-bottom: 16px;
80
+ border-bottom: 1px solid #eee;
81
+ font-size: 18px;
82
+ font-weight: 600;
83
+ }
84
+
85
+ /* Close button (hidden on desktop) */
86
+ .account-nav-close {
87
+ display: none;
88
+ background: none;
89
+ border: none;
90
+ font-size: 22px;
91
+ cursor: pointer;
92
+ line-height: 1;
93
+ }
94
+
95
+ /* ===============================
96
+ Sidebar Links
97
+ ================================ */
98
+ .account-nav-links {
99
+ margin-top: 16px;
100
+ display: flex;
101
+ flex-direction: column;
102
+ }
103
+
104
+ .account-nav-link {
105
+ padding: 14px 14px;
106
+ border-radius: 10px;
107
+ font-size: 15px;
108
+ color: #333;
109
+ text-decoration: none;
110
+ transition: background 0.25s ease, color 0.25s ease;
111
+ }
112
+
113
+ .account-nav-link:hover {
114
+ background: #f5f5f5;
115
+ }
116
+
117
+ .account-nav-link.active {
118
+ background: #111;
119
+ color: #fff;
120
+ }
121
+
122
+ /* ===============================
123
+ Mobile & Tablet Drawer
124
+ ================================ */
125
+ @media (max-width: 991px) {
126
+
127
+ /* Show menu button */
128
+ .account-menu-toggle {
129
+ display: inline-flex;
130
+ font-weight: bolder;
131
+ }
132
+
133
+ /* Drawer */
134
+ .account-nav {
135
+ position: fixed;
136
+ top: 0;
137
+ left: 0;
138
+ width: 300px;
139
+ height: 100vh;
140
+ background: #fff;
141
+ padding: 20px;
142
+ transform: translateX(-100%);
143
+ transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
144
+ box-shadow: 6px 0 25px rgba(0, 0, 0, 0.15);
145
+ overflow-y: auto;
146
+ }
147
+
148
+ /* Open state */
149
+ .account-nav.open {
150
+ transform: translateX(0);
151
+ }
152
+
153
+ /* Overlay visible */
154
+ .account-nav-overlay.show {
155
+ opacity: 1;
156
+ visibility: visible;
157
+ }
158
+
159
+ /* Show close button */
160
+ .account-nav-close {
161
+ display: inline-flex;
162
+ }
163
+
164
+ /* Sticky header */
165
+ .account-nav-header {
166
+ position: sticky;
167
+ top: 0;
168
+ background: #fff;
169
+ z-index: 1;
170
+ }
171
+ .account-sidebar {
172
+ z-index:999;
173
+ }
174
+ }
175
+
176
+ </style><script>
177
+ const toggleBtn = document.querySelector('.account-menu-toggle');
178
+ const sidebar = document.querySelector('.account-nav');
179
+ const overlay = document.querySelector('.account-nav-overlay');
180
+ const closeBtn = document.querySelector('.account-nav-close');
181
+ const links = document.querySelectorAll('.account-nav-link');
182
+
183
+ const closeMenu = () => {
184
+ sidebar.classList.remove('open');
185
+ overlay.classList.remove('show');
186
+ };
187
+
188
+ toggleBtn.addEventListener('click', () => {
189
+ sidebar.classList.add('open');
190
+ overlay.classList.add('show');
191
+ });
192
+
193
+ closeBtn.addEventListener('click', closeMenu);
194
+ overlay.addEventListener('click', closeMenu);
195
+
196
+ links.forEach(link => {
197
+ link.addEventListener('click', closeMenu);
198
+ });
199
+ </script>
200
+