@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.
- package/README.md +425 -0
- package/assets/Logo_o2vend.png +0 -0
- package/assets/favicon.png +0 -0
- package/assets/logo-white.png +0 -0
- package/bin/o2vend +42 -0
- package/config/widget-map.json +50 -0
- package/lib/commands/check.js +201 -0
- package/lib/commands/generate.js +33 -0
- package/lib/commands/init.js +214 -0
- package/lib/commands/optimize.js +216 -0
- package/lib/commands/package.js +208 -0
- package/lib/commands/serve.js +105 -0
- package/lib/commands/validate.js +191 -0
- package/lib/lib/api-client.js +357 -0
- package/lib/lib/dev-server.js +2618 -0
- package/lib/lib/file-watcher.js +80 -0
- package/lib/lib/hot-reload.js +106 -0
- package/lib/lib/liquid-engine.js +822 -0
- package/lib/lib/liquid-filters.js +671 -0
- package/lib/lib/mock-api-server.js +989 -0
- package/lib/lib/mock-data.js +1468 -0
- package/lib/lib/widget-service.js +321 -0
- package/package.json +70 -0
- package/test-theme/README.md +27 -0
- package/test-theme/assets/async-sections.js +446 -0
- package/test-theme/assets/cart-drawer.js +463 -0
- package/test-theme/assets/cart-manager.js +223 -0
- package/test-theme/assets/checkout-price-handler.js +368 -0
- package/test-theme/assets/components.css +4629 -0
- package/test-theme/assets/delivery-zone.css +299 -0
- package/test-theme/assets/delivery-zone.js +396 -0
- package/test-theme/assets/logo.png +0 -0
- package/test-theme/assets/sections.css +48 -0
- package/test-theme/assets/theme.css +3500 -0
- package/test-theme/assets/theme.js +3745 -0
- package/test-theme/config/settings_data.json +292 -0
- package/test-theme/config/settings_schema.json +1050 -0
- package/test-theme/layout/theme.liquid +195 -0
- package/test-theme/locales/en.default.json +260 -0
- package/test-theme/sections/content-fallback.liquid +53 -0
- package/test-theme/sections/content.liquid +57 -0
- package/test-theme/sections/footer-fallback.liquid +328 -0
- package/test-theme/sections/footer.liquid +278 -0
- package/test-theme/sections/header-fallback.liquid +1805 -0
- package/test-theme/sections/header.liquid +1145 -0
- package/test-theme/sections/hero-fallback.liquid +212 -0
- package/test-theme/sections/hero.liquid +136 -0
- package/test-theme/snippets/account-sidebar.liquid +200 -0
- package/test-theme/snippets/add-to-cart-modal.liquid +484 -0
- package/test-theme/snippets/breadcrumbs.liquid +134 -0
- package/test-theme/snippets/cart-drawer.liquid +467 -0
- package/test-theme/snippets/delivery-zone-city-selector.liquid +79 -0
- package/test-theme/snippets/delivery-zone-modal.liquid +337 -0
- package/test-theme/snippets/delivery-zone-search.liquid +78 -0
- package/test-theme/snippets/icon.liquid +105 -0
- package/test-theme/snippets/login-modal.liquid +346 -0
- package/test-theme/snippets/mega-menu.liquid +812 -0
- package/test-theme/snippets/news-thumbnail.liquid +187 -0
- package/test-theme/snippets/pagination.liquid +120 -0
- package/test-theme/snippets/price.liquid +92 -0
- package/test-theme/snippets/product-card-related.liquid +78 -0
- package/test-theme/snippets/product-card-simple.liquid +41 -0
- package/test-theme/snippets/product-card.liquid +697 -0
- package/test-theme/snippets/rating.liquid +85 -0
- package/test-theme/snippets/skeleton-collection-grid.liquid +114 -0
- package/test-theme/snippets/skeleton-product-card.liquid +124 -0
- package/test-theme/snippets/skeleton-product-grid.liquid +34 -0
- package/test-theme/snippets/social-sharing.liquid +185 -0
- package/test-theme/templates/account/dashboard.liquid +401 -0
- package/test-theme/templates/account/loyalty-redemption.liquid +405 -0
- package/test-theme/templates/account/loyalty.liquid +588 -0
- package/test-theme/templates/account/order-detail.liquid +230 -0
- package/test-theme/templates/account/orders.liquid +349 -0
- package/test-theme/templates/account/profile.liquid +758 -0
- package/test-theme/templates/account/register.liquid +232 -0
- package/test-theme/templates/account/return-orders.liquid +348 -0
- package/test-theme/templates/account/store-credit.liquid +464 -0
- package/test-theme/templates/account/subscriptions.liquid +601 -0
- package/test-theme/templates/account/wishlist.liquid +419 -0
- package/test-theme/templates/address-book.liquid +1092 -0
- package/test-theme/templates/categories.liquid +452 -0
- package/test-theme/templates/checkout.liquid +4511 -0
- package/test-theme/templates/error.liquid +384 -0
- package/test-theme/templates/index.liquid +11 -0
- package/test-theme/templates/login.liquid +185 -0
- package/test-theme/templates/order-confirmation.liquid +720 -0
- package/test-theme/templates/page.liquid +297 -0
- package/test-theme/templates/product-detail.liquid +4363 -0
- package/test-theme/templates/products.liquid +518 -0
- package/test-theme/templates/search.liquid +922 -0
- package/test-theme/theme.json.example +19 -0
- package/test-theme/widgets/brand-carousel.liquid +676 -0
- package/test-theme/widgets/brand.liquid +245 -0
- package/test-theme/widgets/carousel.liquid +843 -0
- package/test-theme/widgets/category-list-carousel.liquid +656 -0
- package/test-theme/widgets/category-list.liquid +340 -0
- package/test-theme/widgets/category.liquid +475 -0
- package/test-theme/widgets/discount-time.liquid +176 -0
- package/test-theme/widgets/footer-menu.liquid +695 -0
- package/test-theme/widgets/footer.liquid +179 -0
- package/test-theme/widgets/gallery.liquid +271 -0
- package/test-theme/widgets/header-menu.liquid +932 -0
- package/test-theme/widgets/header.liquid +159 -0
- package/test-theme/widgets/html.liquid +214 -0
- package/test-theme/widgets/news.liquid +217 -0
- package/test-theme/widgets/product-canvas.liquid +235 -0
- package/test-theme/widgets/product-carousel.liquid +502 -0
- package/test-theme/widgets/product.liquid +45 -0
- package/test-theme/widgets/recently-viewed.liquid +26 -0
- package/test-theme/widgets/shared/product-grid.liquid +339 -0
- package/test-theme/widgets/simple-product.liquid +42 -0
- package/test-theme/widgets/single-product.liquid +610 -0
- package/test-theme/widgets/spacebar-carousel.liquid +663 -0
- package/test-theme/widgets/spacebar.liquid +279 -0
- package/test-theme/widgets/splash.liquid +378 -0
- package/test-theme/widgets/testimonial-carousel.liquid +709 -0
|
@@ -0,0 +1,758 @@
|
|
|
1
|
+
{% layout 'layout/theme' %}
|
|
2
|
+
|
|
3
|
+
<section class="account-page">
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="account-header">
|
|
6
|
+
<h1 class="account-title">My Profile</h1>
|
|
7
|
+
<p class="account-subtitle">Manage your account information and preferences</p>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div class="account-layout">
|
|
11
|
+
<!-- Account Sidebar -->
|
|
12
|
+
<aside class="account-sidebar">
|
|
13
|
+
{% render 'snippets/account-sidebar' %}
|
|
14
|
+
</aside>
|
|
15
|
+
|
|
16
|
+
<!-- Profile Content -->
|
|
17
|
+
<div class="account-content">
|
|
18
|
+
{% hook 'account_profile_before' %}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
<div class="profile-form-container">
|
|
23
|
+
<div class="form-section-header">
|
|
24
|
+
<h3 class="form-section-title">Personal Information</h3>
|
|
25
|
+
<p class="form-section-description">Update your personal details and contact information</p>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<form id="profile-form" class="profile-form">
|
|
29
|
+
<div class="form-grid">
|
|
30
|
+
<div class="form-group">
|
|
31
|
+
<label for="profile-first-name" class="form-label">
|
|
32
|
+
<svg class="label-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
33
|
+
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
|
34
|
+
<circle cx="12" cy="7" r="4"></circle>
|
|
35
|
+
</svg>
|
|
36
|
+
Full Name
|
|
37
|
+
</label>
|
|
38
|
+
<input
|
|
39
|
+
type="text"
|
|
40
|
+
id="profile-first-name"
|
|
41
|
+
name="firstName"
|
|
42
|
+
class="form-input"
|
|
43
|
+
value="{{ customer.fullName }}"
|
|
44
|
+
placeholder="Enter your full name"
|
|
45
|
+
required
|
|
46
|
+
>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="form-group">
|
|
50
|
+
<label for="profile-email" class="form-label">
|
|
51
|
+
<svg class="label-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
52
|
+
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path>
|
|
53
|
+
<polyline points="22,6 12,13 2,6"></polyline>
|
|
54
|
+
</svg>
|
|
55
|
+
Email Address
|
|
56
|
+
</label>
|
|
57
|
+
<div class="input-with-badge">
|
|
58
|
+
<input
|
|
59
|
+
type="email"
|
|
60
|
+
id="profile-email"
|
|
61
|
+
name="email"
|
|
62
|
+
class="form-input"
|
|
63
|
+
value="{{ customer.email }}"
|
|
64
|
+
readonly
|
|
65
|
+
>
|
|
66
|
+
<span class="input-badge">Verified</span>
|
|
67
|
+
</div>
|
|
68
|
+
<p class="form-help-text">Contact support to change your email address</p>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<div class="form-group">
|
|
72
|
+
<label for="profile-phone" class="form-label">
|
|
73
|
+
<svg class="label-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
74
|
+
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>
|
|
75
|
+
</svg>
|
|
76
|
+
Phone Number
|
|
77
|
+
</label>
|
|
78
|
+
<input
|
|
79
|
+
type="tel"
|
|
80
|
+
id="profile-phone"
|
|
81
|
+
name="phone"
|
|
82
|
+
class="form-input"
|
|
83
|
+
value="{{ customer.phone }}"
|
|
84
|
+
placeholder="+1 (555) 000-0000"
|
|
85
|
+
>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div class="form-actions">
|
|
90
|
+
<button type="submit" class="btn btn-primary" id="save-profile-btn">
|
|
91
|
+
<svg class="btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
92
|
+
<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path>
|
|
93
|
+
<polyline points="17 21 17 13 7 13 7 21"></polyline>
|
|
94
|
+
<polyline points="7 3 7 8 15 8"></polyline>
|
|
95
|
+
</svg>
|
|
96
|
+
<span class="btn-text">Save Changes</span>
|
|
97
|
+
<span class="btn-loading" style="display: none;">
|
|
98
|
+
<span class="btn-spinner"></span>
|
|
99
|
+
<span>Saving...</span>
|
|
100
|
+
</span>
|
|
101
|
+
</button>
|
|
102
|
+
<button type="reset" class="btn btn-outline">Cancel</button>
|
|
103
|
+
</div>
|
|
104
|
+
</form>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<!-- Danger Zone -->
|
|
108
|
+
<div class="danger-zone">
|
|
109
|
+
<div class="danger-zone-header">
|
|
110
|
+
<svg class="danger-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
111
|
+
<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path>
|
|
112
|
+
<line x1="12" y1="9" x2="12" y2="13"></line>
|
|
113
|
+
<line x1="12" y1="17" x2="12.01" y2="17"></line>
|
|
114
|
+
</svg>
|
|
115
|
+
<div>
|
|
116
|
+
<h3 class="danger-zone-title">Danger Zone</h3>
|
|
117
|
+
<p class="danger-zone-text">
|
|
118
|
+
Permanently delete your account and all associated data. This action cannot be undone.
|
|
119
|
+
</p>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
<button type="button" class="btn btn-danger" id="request-account-deletion-btn">
|
|
123
|
+
<svg class="btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
124
|
+
<polyline points="3 6 5 6 21 6"></polyline>
|
|
125
|
+
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
|
|
126
|
+
</svg>
|
|
127
|
+
Request Account Deletion
|
|
128
|
+
</button>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
{% hook 'account_profile_after' %}
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</section>
|
|
136
|
+
|
|
137
|
+
<script>
|
|
138
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
139
|
+
// Initialize intl-tel-input for profile phone
|
|
140
|
+
const profilePhoneInput = document.getElementById('profile-phone');
|
|
141
|
+
let profilePhoneIti = null;
|
|
142
|
+
|
|
143
|
+
if (profilePhoneInput && typeof intlTelInput !== 'undefined') {
|
|
144
|
+
const existingPhone = profilePhoneInput.value || '';
|
|
145
|
+
|
|
146
|
+
profilePhoneIti = intlTelInput(profilePhoneInput, {
|
|
147
|
+
utilsScript: 'https://cdn.jsdelivr.net/npm/intl-tel-input@23.0.0/build/js/utils.js',
|
|
148
|
+
initialCountry: 'auto',
|
|
149
|
+
geoIpLookup: function(callback) {
|
|
150
|
+
fetch('https://ipapi.co/json/')
|
|
151
|
+
.then(res => res.json())
|
|
152
|
+
.then(data => callback(data.country_code ? data.country_code.toLowerCase() : 'us'))
|
|
153
|
+
.catch(() => callback('us'));
|
|
154
|
+
},
|
|
155
|
+
preferredCountries: ['us', 'gb', 'ca', 'au', 'in'],
|
|
156
|
+
separateDialCode: true,
|
|
157
|
+
nationalMode: false
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
// Store instance for form submission
|
|
161
|
+
window.profilePhoneIti = profilePhoneIti;
|
|
162
|
+
|
|
163
|
+
// Set existing phone number if available (after a small delay to ensure utils are loaded)
|
|
164
|
+
if (existingPhone) {
|
|
165
|
+
setTimeout(function() {
|
|
166
|
+
profilePhoneIti.setNumber(existingPhone);
|
|
167
|
+
}, 100);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Button loading utility function
|
|
172
|
+
function setButtonLoading(button, loading, loadingText = null) {
|
|
173
|
+
if (!button) return;
|
|
174
|
+
|
|
175
|
+
const btnText = button.querySelector('.btn-text');
|
|
176
|
+
const btnLoading = button.querySelector('.btn-loading');
|
|
177
|
+
|
|
178
|
+
if (loading) {
|
|
179
|
+
button.disabled = true;
|
|
180
|
+
button.classList.add('loading');
|
|
181
|
+
if (btnText) btnText.style.display = 'none';
|
|
182
|
+
if (btnLoading) {
|
|
183
|
+
btnLoading.style.display = 'flex';
|
|
184
|
+
if (loadingText && btnLoading.querySelector('span:last-child')) {
|
|
185
|
+
btnLoading.querySelector('span:last-child').textContent = loadingText;
|
|
186
|
+
}
|
|
187
|
+
} else if (loadingText) {
|
|
188
|
+
button.textContent = loadingText;
|
|
189
|
+
}
|
|
190
|
+
} else {
|
|
191
|
+
button.disabled = false;
|
|
192
|
+
button.classList.remove('loading');
|
|
193
|
+
if (btnText) btnText.style.display = 'inline';
|
|
194
|
+
if (btnLoading) btnLoading.style.display = 'none';
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Handle form submission
|
|
199
|
+
const profileForm = document.getElementById('profile-form');
|
|
200
|
+
if (profileForm) {
|
|
201
|
+
profileForm.addEventListener('submit', async function(e) {
|
|
202
|
+
e.preventDefault();
|
|
203
|
+
|
|
204
|
+
const submitBtn = document.getElementById('save-profile-btn');
|
|
205
|
+
setButtonLoading(submitBtn, true, 'Saving...');
|
|
206
|
+
|
|
207
|
+
const formData = new FormData(this);
|
|
208
|
+
|
|
209
|
+
// Get phone number from intl-tel-input if available
|
|
210
|
+
let phoneNumber = formData.get('phone');
|
|
211
|
+
if (window.profilePhoneIti) {
|
|
212
|
+
const fullPhoneNumber = window.profilePhoneIti.getNumber();
|
|
213
|
+
if (fullPhoneNumber) {
|
|
214
|
+
// Remove leading + sign
|
|
215
|
+
phoneNumber = fullPhoneNumber.replace(/^\+/, '');
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
const data = {
|
|
220
|
+
fullName: formData.get('firstName'),
|
|
221
|
+
phone: phoneNumber
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
try {
|
|
225
|
+
const response = await fetch('/webstoreapi/customer/profile', {
|
|
226
|
+
method: 'PUT',
|
|
227
|
+
headers: {
|
|
228
|
+
'Content-Type': 'application/json',
|
|
229
|
+
'X-Requested-With': 'XMLHttpRequest'
|
|
230
|
+
},
|
|
231
|
+
body: JSON.stringify(data)
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
if (response.ok) {
|
|
235
|
+
window.location.reload();
|
|
236
|
+
} else {
|
|
237
|
+
const error = await response.json();
|
|
238
|
+
setButtonLoading(submitBtn, false);
|
|
239
|
+
alert('Error updating profile: ' + (error.error || error.message || 'Unknown error'));
|
|
240
|
+
}
|
|
241
|
+
} catch (error) {
|
|
242
|
+
console.error('Error updating profile:', error);
|
|
243
|
+
setButtonLoading(submitBtn, false);
|
|
244
|
+
alert('Error updating profile. Please try again.');
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
</script>
|
|
250
|
+
|
|
251
|
+
<style>
|
|
252
|
+
/* Account profile page uses theme.css variables - no local :root needed */
|
|
253
|
+
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
254
|
+
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
255
|
+
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
256
|
+
--radius-sm: 0.375rem;
|
|
257
|
+
--radius-md: 0.5rem;
|
|
258
|
+
--radius-lg: 0.75rem;
|
|
259
|
+
--radius-xl: 1rem;
|
|
260
|
+
--transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
* {
|
|
264
|
+
box-sizing: border-box;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.account-page {
|
|
268
|
+
padding: 2rem 1rem;
|
|
269
|
+
background: linear-gradient(to bottom, var(--color-background) 0%, #ffffff 100%);
|
|
270
|
+
min-height: 100vh;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.container {
|
|
274
|
+
max-width: 1200px;
|
|
275
|
+
margin: 0 auto;
|
|
276
|
+
padding: 0 1rem;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.account-header {
|
|
280
|
+
text-align: center;
|
|
281
|
+
margin-bottom: 3rem;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.account-title {
|
|
285
|
+
font-size: clamp(2rem, 5vw, 2.5rem);
|
|
286
|
+
font-weight: 700;
|
|
287
|
+
color: var(--color-text);
|
|
288
|
+
margin: 0 0 0.5rem 0;
|
|
289
|
+
letter-spacing: -0.025em;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.account-subtitle {
|
|
293
|
+
font-size: clamp(0.9375rem, 2vw, 1.125rem);
|
|
294
|
+
color: var(--color-text-muted);
|
|
295
|
+
margin: 0;
|
|
296
|
+
max-width: 600px;
|
|
297
|
+
margin-left: auto;
|
|
298
|
+
margin-right: auto;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.account-layout {
|
|
302
|
+
display: grid;
|
|
303
|
+
grid-template-columns: 280px 1fr;
|
|
304
|
+
gap: 2rem;
|
|
305
|
+
align-items: start;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.account-sidebar {
|
|
309
|
+
position: sticky;
|
|
310
|
+
top: 2rem;
|
|
311
|
+
background: var(--color-background);
|
|
312
|
+
border-radius: var(--radius-xl);
|
|
313
|
+
padding: 1.5rem;
|
|
314
|
+
box-shadow: var(--shadow-md);
|
|
315
|
+
border: 1px solid var(--color-border);
|
|
316
|
+
transition: var(--transition);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.account-sidebar:hover {
|
|
320
|
+
box-shadow: var(--shadow-lg);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.account-content {
|
|
324
|
+
background: var(--color-background);
|
|
325
|
+
border-radius: var(--radius-xl);
|
|
326
|
+
padding: 0;
|
|
327
|
+
box-shadow: var(--shadow-md);
|
|
328
|
+
border: 1px solid var(--color-border);
|
|
329
|
+
overflow: hidden;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/* Profile Header */
|
|
333
|
+
.profile-header {
|
|
334
|
+
display: flex;
|
|
335
|
+
align-items: center;
|
|
336
|
+
gap: 1.5rem;
|
|
337
|
+
padding: 2rem;
|
|
338
|
+
background: linear-gradient(135deg, var(--color-primary-light) 0%, #ffffff 100%);
|
|
339
|
+
border-bottom: 1px solid var(--color-border);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.profile-avatar {
|
|
343
|
+
width: 80px;
|
|
344
|
+
height: 80px;
|
|
345
|
+
border-radius: 50%;
|
|
346
|
+
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
|
|
347
|
+
display: flex;
|
|
348
|
+
align-items: center;
|
|
349
|
+
justify-content: center;
|
|
350
|
+
box-shadow: var(--shadow-lg);
|
|
351
|
+
flex-shrink: 0;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.avatar-icon {
|
|
355
|
+
width: 45px;
|
|
356
|
+
height: 45px;
|
|
357
|
+
color: white;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.profile-header-text {
|
|
361
|
+
flex: 1;
|
|
362
|
+
min-width: 0;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.profile-name {
|
|
366
|
+
font-size: 1.5rem;
|
|
367
|
+
font-weight: 700;
|
|
368
|
+
color: var(--color-text);
|
|
369
|
+
margin: 0 0 0.25rem 0;
|
|
370
|
+
overflow: hidden;
|
|
371
|
+
text-overflow: ellipsis;
|
|
372
|
+
white-space: nowrap;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.profile-email {
|
|
376
|
+
font-size: 1.4rem;
|
|
377
|
+
color: var(--color-text-muted);
|
|
378
|
+
margin: 0;
|
|
379
|
+
overflow: hidden;
|
|
380
|
+
text-overflow: ellipsis;
|
|
381
|
+
white-space: nowrap;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/* Form Container */
|
|
385
|
+
.profile-form-container {
|
|
386
|
+
padding: 2rem;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.form-section-header {
|
|
390
|
+
margin-bottom: 2rem;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.form-section-title {
|
|
394
|
+
font-size: 1.4em;
|
|
395
|
+
font-weight: 600;
|
|
396
|
+
color: var(--color-text);
|
|
397
|
+
margin: 0 0 0.5rem 0;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.form-section-description {
|
|
401
|
+
font-size:1.4rem;
|
|
402
|
+
color: var(--color-text-muted);
|
|
403
|
+
margin: 0;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* Form Styles */
|
|
407
|
+
.profile-form {
|
|
408
|
+
width: 100%;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.form-grid {
|
|
412
|
+
display: grid;
|
|
413
|
+
grid-template-columns: 1fr;
|
|
414
|
+
gap: 1.5rem;
|
|
415
|
+
margin-bottom: 2rem;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.form-group {
|
|
419
|
+
display: flex;
|
|
420
|
+
flex-direction: column;
|
|
421
|
+
gap: 0.5rem;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.form-label {
|
|
425
|
+
display: flex;
|
|
426
|
+
align-items: center;
|
|
427
|
+
gap: 0.5rem;
|
|
428
|
+
font-size: 1.4rem;
|
|
429
|
+
font-weight: 600;
|
|
430
|
+
color: var(--color-text);
|
|
431
|
+
letter-spacing: 0.01em;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.label-icon {
|
|
435
|
+
width: 16px;
|
|
436
|
+
height: 16px;
|
|
437
|
+
color: var(--color-primary);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.form-input {
|
|
441
|
+
width: 100%;
|
|
442
|
+
padding: 0.75rem 1rem;
|
|
443
|
+
font-size: 1.4rem;
|
|
444
|
+
color: var(--color-text);
|
|
445
|
+
background: var(--color-background);
|
|
446
|
+
border: 1.5px solid var(--color-border);
|
|
447
|
+
border-radius: var(--radius-md);
|
|
448
|
+
transition: var(--transition);
|
|
449
|
+
outline: none;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/* intl-tel-input styling for profile */
|
|
453
|
+
#profile-phone {
|
|
454
|
+
padding-left: 3.5rem;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.iti {
|
|
458
|
+
width: 100%;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.iti__flag-container {
|
|
462
|
+
z-index: 1;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.iti__selected-flag {
|
|
466
|
+
padding: 0 0.75rem 0 0.5rem;
|
|
467
|
+
border-right: 1.5px solid var(--color-border);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.iti__selected-flag:hover {
|
|
471
|
+
background-color: var(--color-background);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.iti__country-list {
|
|
475
|
+
z-index: 1000;
|
|
476
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
477
|
+
border: 1.5px solid var(--color-border);
|
|
478
|
+
border-radius: var(--radius-md);
|
|
479
|
+
max-height: 200px;
|
|
480
|
+
overflow-y: auto;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.iti__country {
|
|
484
|
+
padding: 0.5rem 0.75rem;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.iti__country:hover,
|
|
488
|
+
.iti__country.iti__highlight {
|
|
489
|
+
background-color: var(--color-primary-light);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.form-input:hover {
|
|
493
|
+
border-color: var(--color-text-light);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.form-input:focus {
|
|
497
|
+
border-color: var(--color-primary);
|
|
498
|
+
box-shadow: 0 0 0 3px var(--color-primary-light);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.form-input:disabled,
|
|
502
|
+
.form-input:read-only {
|
|
503
|
+
background: var(--color-background);
|
|
504
|
+
cursor: not-allowed;
|
|
505
|
+
opacity: 0.7;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.form-input::placeholder {
|
|
509
|
+
color: var(--color-text-light);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.input-with-badge {
|
|
513
|
+
position: relative;
|
|
514
|
+
display: flex;
|
|
515
|
+
align-items: center;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.input-badge {
|
|
519
|
+
position: absolute;
|
|
520
|
+
right: 0.75rem;
|
|
521
|
+
top: 50%;
|
|
522
|
+
transform: translateY(-50%);
|
|
523
|
+
padding: 0.25rem 0.75rem;
|
|
524
|
+
font-size: 0.75rem;
|
|
525
|
+
font-weight: 600;
|
|
526
|
+
color: var(--color-success);
|
|
527
|
+
background: var(--color-success-light);
|
|
528
|
+
border-radius: var(--radius-sm);
|
|
529
|
+
pointer-events: none;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.form-help-text {
|
|
533
|
+
font-size: 0.8125rem;
|
|
534
|
+
color: var(--color-text-light);
|
|
535
|
+
margin: 0;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/* Buttons */
|
|
539
|
+
.form-actions {
|
|
540
|
+
display: flex;
|
|
541
|
+
flex-wrap: wrap;
|
|
542
|
+
gap: 1rem;
|
|
543
|
+
padding-top: 1.5rem;
|
|
544
|
+
border-top: 1px solid var(--color-surface);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.btn {
|
|
548
|
+
display: inline-flex;
|
|
549
|
+
align-items: center;
|
|
550
|
+
justify-content: center;
|
|
551
|
+
gap: 0.5rem;
|
|
552
|
+
padding: 0.75rem 1.75rem;
|
|
553
|
+
font-size: 1.4rem;
|
|
554
|
+
font-weight: 600;
|
|
555
|
+
text-decoration: none;
|
|
556
|
+
border-radius: var(--radius-md);
|
|
557
|
+
border: 2px solid transparent;
|
|
558
|
+
cursor: pointer;
|
|
559
|
+
transition: var(--transition);
|
|
560
|
+
white-space: nowrap;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.btn-icon {
|
|
564
|
+
width: 18px;
|
|
565
|
+
height: 18px;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.btn-primary {
|
|
569
|
+
background: var(--color-primary);
|
|
570
|
+
color: white;
|
|
571
|
+
border-color: var(--color-primary);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.btn-primary:hover {
|
|
575
|
+
background: var(--color-primary-hover);
|
|
576
|
+
border-color: var(--color-primary-hover);
|
|
577
|
+
transform: translateY(-2px);
|
|
578
|
+
box-shadow: var(--shadow-lg);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.btn-primary:active {
|
|
582
|
+
transform: translateY(0);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.btn-outline {
|
|
586
|
+
background: transparent;
|
|
587
|
+
color: var(--color-text);
|
|
588
|
+
border-color: var(--color-border);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.btn-outline:hover {
|
|
592
|
+
background: var(--color-background);
|
|
593
|
+
border-color: var(--color-text-light);
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.btn-danger {
|
|
597
|
+
background: var(--color-danger);
|
|
598
|
+
color: white;
|
|
599
|
+
border-color: var(--color-danger);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.btn-danger:hover {
|
|
603
|
+
background: var(--color-danger-hover);
|
|
604
|
+
border-color: var(--color-danger-hover);
|
|
605
|
+
transform: translateY(-2px);
|
|
606
|
+
box-shadow: var(--shadow-lg);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/* Danger Zone */
|
|
610
|
+
.danger-zone {
|
|
611
|
+
margin: 2rem;
|
|
612
|
+
padding: 1.5rem;
|
|
613
|
+
background: var(--color-danger-light);
|
|
614
|
+
border: 2px solid var(--color-danger);
|
|
615
|
+
border-radius: var(--radius-lg);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.danger-zone-header {
|
|
619
|
+
display: flex;
|
|
620
|
+
gap: 1rem;
|
|
621
|
+
margin-bottom: 1.5rem;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
.danger-icon {
|
|
625
|
+
width: 24px;
|
|
626
|
+
height: 24px;
|
|
627
|
+
color: var(--color-danger);
|
|
628
|
+
flex-shrink: 0;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
.danger-zone-title {
|
|
632
|
+
font-size: 1.3rem;
|
|
633
|
+
font-weight: 700;
|
|
634
|
+
color: var(--color-danger-hover);
|
|
635
|
+
margin: 0 0 0.5rem 0;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.danger-zone-text {
|
|
639
|
+
font-size: 1.2rem;
|
|
640
|
+
color: var(--color-text-muted);
|
|
641
|
+
margin: 0;
|
|
642
|
+
line-height: 1.6;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/* Responsive Design */
|
|
646
|
+
@media (min-width: 640px) {
|
|
647
|
+
.form-grid {
|
|
648
|
+
grid-template-columns: repeat(2, 1fr);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
.form-group:nth-child(2) {
|
|
652
|
+
grid-column: span 2;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
@media (max-width: 1024px) {
|
|
657
|
+
.account-layout {
|
|
658
|
+
grid-template-columns: 1fr;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
.account-content {
|
|
664
|
+
order: 1;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
@media (max-width: 640px) {
|
|
669
|
+
.account-page {
|
|
670
|
+
padding: 1.5rem 0.5rem;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
.profile-header {
|
|
674
|
+
flex-direction: column;
|
|
675
|
+
text-align: center;
|
|
676
|
+
padding: 1.5rem;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.profile-avatar {
|
|
680
|
+
width: 70px;
|
|
681
|
+
height: 70px;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
.avatar-icon {
|
|
685
|
+
width: 38px;
|
|
686
|
+
height: 38px;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.profile-form-container {
|
|
690
|
+
padding: 1.5rem;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.form-actions {
|
|
694
|
+
flex-direction: column;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
/* Button loading states */
|
|
698
|
+
.btn.loading {
|
|
699
|
+
opacity: 0.7;
|
|
700
|
+
cursor: not-allowed;
|
|
701
|
+
pointer-events: none;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.btn-loading {
|
|
705
|
+
display: flex;
|
|
706
|
+
align-items: center;
|
|
707
|
+
gap: 0.5rem;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
.btn-spinner {
|
|
711
|
+
width: 14px;
|
|
712
|
+
height: 14px;
|
|
713
|
+
border: 2px solid currentColor;
|
|
714
|
+
border-top-color: transparent;
|
|
715
|
+
border-radius: 50%;
|
|
716
|
+
animation: spin 0.6s linear infinite;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
@keyframes spin {
|
|
720
|
+
to {
|
|
721
|
+
transform: rotate(360deg);
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
.btn {
|
|
727
|
+
width: 100%;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
.danger-zone {
|
|
731
|
+
margin: 1.5rem;
|
|
732
|
+
padding: 1.25rem;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
.danger-zone-header {
|
|
736
|
+
flex-direction: column;
|
|
737
|
+
text-align: center;
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
@media (max-width: 400px) {
|
|
742
|
+
.container {
|
|
743
|
+
padding: 0 0.5rem;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
.account-title {
|
|
747
|
+
font-size: 1.75rem;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.profile-form-container {
|
|
751
|
+
padding: 1rem;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
.danger-zone {
|
|
755
|
+
margin: 1rem;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
</style>
|