feat: Modernize change_password.liquid with updated styles and layout

This commit is contained in:
Kerby Martino (aider) committed 2025-05-04 01:31:12 +08:00
1 parent 14cf1324da
commit 8daf52faac
1 file changed
+30 -35
+30 -35
View File
@@ -1,37 +1,32 @@
<form class="space-y-4">
<div class="w-full overflow-x-auto">
<table class="w-full" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<table class="w-full min-w-[300px] table-auto" border="0">
<tbody>
<tr>
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">New Password:</td>
<td><input type="password" name="new_password" class="w-full max-w-full sm:w-[350px] md:w-[450px] text-primary text-sm px-3 py-1 border border-gray-300 rounded"></td>
</tr>
<tr>
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Confirm New Password:</td>
<td><input type="password" name="confirm_password" class="w-full max-w-full sm:w-[350px] md:w-[450px] text-primary text-sm px-3 py-1 border border-gray-300 rounded"></td>
</tr>
<tr>
<td class="py-2"></td>
<td>
<font size="2" class="text-primary text-sm">Passwords do not match</font>
</td>
</tr>
<tr>
<td class="py-2 w-24 sm:w-32"></td>
<td><button type="submit" class="px-2 py-1 bg-primary text-white rounded hover:bg-primary-dark">Change Password</button></td>
</tr>
</tbody>
</table>
<div class="mt-4">
<p class="text-primary text-sm">Please check your email to verify the password change.</p>
<div class="flex items-center justify-center overflow-hidden">
<div class="w-full max-w-md mx-auto rounded-lg p-6 bg-bg-footer">
<h2 class="text-xl font-semibold text-center text-primary mb-6">Change Your Password</h2>
<p class="text-center text-sm text-text-muted mb-6">
Enter and confirm your new password below.
</p>
<form class="space-y-6">
<div>
<label for="new_password" class="block text-sm font-medium text-primary mb-1">New Password</label>
<input type="password" id="new_password" name="new_password" placeholder="Enter your new password" class="w-full text-primary text-base px-3 py-2 bg-transparent border-b-2 border-gray-300 focus:outline-none focus:border-primary transition duration-150 ease-in-out placeholder:text-xs" required>
<p class="mt-1 text-xs text-text-muted">Must be at least 8 characters long.</p>
</div>
</td>
</tr>
</tbody>
</table>
<div>
<label for="confirm_password" class="block text-sm font-medium text-primary mb-1">Confirm New Password</label>
<input type="password" id="confirm_password" name="confirm_password" placeholder="Confirm your new password" class="w-full text-primary text-base px-3 py-2 bg-transparent border-b-2 border-gray-300 focus:outline-none focus:border-primary transition duration-150 ease-in-out placeholder:text-xs" required>
</div>
</form>
<!-- Error message with improved presentation -->
<div class="bg-red-50 border border-red-200 rounded-md p-3 hidden">
<p class="text-sm text-red-500 text-center">Passwords do not match</p>
</div>
<!-- Success message placeholder -->
<!--
<div class="bg-green-50 border border-green-200 rounded-md p-3 hidden">
<p class="text-sm text-green-600 text-center">Password successfully changed. Please check your email for verification.</p>
</div>
-->
<div class="pt-2">
<button type="submit" class="w-full px-6 py-3 bg-primary text-white text-base font-medium rounded-md hover:bg-primary-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition duration-150 ease-in-out font-monda font-action">Change Password</button>
</div>
</form>
</div>
</div>