Internal
Public Access
Fix dark/light mode support on change password page
Replace all hardcoded colors and CSS variable fallbacks with proper theme CSS variables: - Removed fallback values from all var() calls - Replaced --color-* prefixed variables with actual theme variables: - --color-bg-secondary → --surface - --color-border → --border - --color-text → --text-primary - --color-text-secondary → --text-secondary - --color-primary → --accent (via .btn-primary class) - Updated success alert to use .alert-success class - Updated buttons to use .btn-primary and .btn-secondary classes - Fixed input backgrounds and text colors to use theme variables - Replaced hardcoded error color with --danger variable The page now properly respects the dark/light mode toggle. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.5
parent
b86db7e0e4
commit
1872442016
@@ -5,82 +5,82 @@
|
||||
{% block body %}
|
||||
<div class="app-layout" style="display: flex; min-height: 100vh;">
|
||||
<!-- Simple header for non-dashboard pages -->
|
||||
<div style="position: fixed; top: 0; left: 0; right: 0; background: var(--color-bg-secondary, #fff); border-bottom: 1px solid var(--color-border, #e5e7eb); padding: 1rem 2rem; z-index: 100; display: flex; justify-content: space-between; align-items: center;">
|
||||
<a href="{% url 'dashboard' %}" style="font-size: 1.25rem; font-weight: 600; text-decoration: none; color: var(--color-text, #111);">KeepItGoing</a>
|
||||
<div style="position: fixed; top: 0; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem 2rem; z-index: 100; display: flex; justify-content: space-between; align-items: center;">
|
||||
<a href="{% url 'dashboard' %}" style="font-size: 1.25rem; font-weight: 600; text-decoration: none; color: var(--text-primary);">KeepItGoing</a>
|
||||
<div style="display: flex; gap: 1rem; align-items: center;">
|
||||
<span style="color: var(--color-text-secondary, #666);">{{ user.email }}</span>
|
||||
<a href="{% url 'profile' %}" style="color: var(--color-primary, #3B82F6); text-decoration: none;">Profile</a>
|
||||
<a href="{% url 'logout' %}" style="color: var(--color-text-secondary, #666); text-decoration: none;">Logout</a>
|
||||
<span style="color: var(--text-secondary);">{{ user.email }}</span>
|
||||
<a href="{% url 'profile' %}" style="color: var(--accent); text-decoration: none;">Profile</a>
|
||||
<a href="{% url 'logout' %}" style="color: var(--text-secondary); text-decoration: none;">Logout</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Main content -->
|
||||
<div style="flex: 1; padding: 5rem 2rem 2rem; max-width: 600px; margin: 0 auto; width: 100%;">
|
||||
<h1 style="font-size: 2rem; font-weight: 700; margin-bottom: 2rem; color: var(--color-text, #111);">Change Password</h1>
|
||||
<h1 style="font-size: 2rem; font-weight: 700; margin-bottom: 2rem; color: var(--text-primary);">Change Password</h1>
|
||||
|
||||
{% if success %}
|
||||
<div style="background-color: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; padding: 1rem; border-radius: 0.5rem; margin-bottom: 1.5rem;">
|
||||
<div class="alert alert-success" style="margin-bottom: 1.5rem;">
|
||||
<strong>✓ Success!</strong><br>
|
||||
{{ success }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" style="background: var(--color-bg-secondary, #fff); padding: 2rem; border-radius: 0.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
|
||||
<form method="post" style="background: var(--surface); padding: 2rem; border-radius: 0.5rem; border: 1px solid var(--border);">
|
||||
{% csrf_token %}
|
||||
|
||||
<div style="margin-bottom: 1.5rem;">
|
||||
<label for="old_password" style="display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--color-text, #111);">Current Password</label>
|
||||
<label for="old_password" style="display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text-primary);">Current Password</label>
|
||||
<input type="password"
|
||||
id="old_password"
|
||||
name="old_password"
|
||||
required
|
||||
style="width: 100%; padding: 0.75rem; border: 1px solid var(--color-border, #d1d5db); border-radius: 0.375rem; font-size: 1rem;">
|
||||
style="width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: 0.375rem; font-size: 1rem; background: var(--bg); color: var(--text-primary);">
|
||||
{% if errors.old_password %}
|
||||
<p style="color: #dc2626; margin-top: 0.25rem; font-size: 0.875rem;">{{ errors.old_password }}</p>
|
||||
<p style="color: var(--danger); margin-top: 0.25rem; font-size: 0.875rem;">{{ errors.old_password }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 1.5rem;">
|
||||
<label for="new_password" style="display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--color-text, #111);">New Password</label>
|
||||
<label for="new_password" style="display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text-primary);">New Password</label>
|
||||
<input type="password"
|
||||
id="new_password"
|
||||
name="new_password"
|
||||
required
|
||||
minlength="8"
|
||||
style="width: 100%; padding: 0.75rem; border: 1px solid var(--color-border, #d1d5db); border-radius: 0.375rem; font-size: 1rem;">
|
||||
<p style="color: var(--color-text-secondary, #666); margin-top: 0.25rem; font-size: 0.875rem;">Must be at least 8 characters</p>
|
||||
style="width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: 0.375rem; font-size: 1rem; background: var(--bg); color: var(--text-primary);">
|
||||
<p style="color: var(--text-secondary); margin-top: 0.25rem; font-size: 0.875rem;">Must be at least 8 characters</p>
|
||||
{% if errors.new_password %}
|
||||
<p style="color: #dc2626; margin-top: 0.25rem; font-size: 0.875rem;">{{ errors.new_password }}</p>
|
||||
<p style="color: var(--danger); margin-top: 0.25rem; font-size: 0.875rem;">{{ errors.new_password }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 1.5rem;">
|
||||
<label for="confirm_password" style="display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--color-text, #111);">Confirm New Password</label>
|
||||
<label for="confirm_password" style="display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text-primary);">Confirm New Password</label>
|
||||
<input type="password"
|
||||
id="confirm_password"
|
||||
name="confirm_password"
|
||||
required
|
||||
minlength="8"
|
||||
style="width: 100%; padding: 0.75rem; border: 1px solid var(--color-border, #d1d5db); border-radius: 0.375rem; font-size: 1rem;">
|
||||
style="width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: 0.375rem; font-size: 1rem; background: var(--bg); color: var(--text-primary);">
|
||||
{% if errors.confirm_password %}
|
||||
<p style="color: #dc2626; margin-top: 0.25rem; font-size: 0.875rem;">{{ errors.confirm_password }}</p>
|
||||
<p style="color: var(--danger); margin-top: 0.25rem; font-size: 0.875rem;">{{ errors.confirm_password }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div style="display: flex; gap: 1rem;">
|
||||
<button type="submit"
|
||||
style="flex: 1; background-color: #3B82F6; color: white; padding: 0.75rem 1.5rem; border: none; border-radius: 0.375rem; font-size: 1rem; font-weight: 600; cursor: pointer;">
|
||||
<button type="submit" class="btn btn-primary"
|
||||
style="flex: 1; padding: 0.75rem 1.5rem; font-size: 1rem;">
|
||||
Change Password
|
||||
</button>
|
||||
<a href="{% url 'profile' %}"
|
||||
style="flex: 1; background-color: var(--color-bg, #f3f4f6); color: var(--color-text, #111); padding: 0.75rem 1.5rem; border: none; border-radius: 0.375rem; font-size: 1rem; font-weight: 600; text-decoration: none; text-align: center; display: flex; align-items: center; justify-content: center;">
|
||||
<a href="{% url 'profile' %}" class="btn btn-secondary"
|
||||
style="flex: 1; padding: 0.75rem 1.5rem; font-size: 1rem; text-decoration: none; text-align: center; display: flex; align-items: center; justify-content: center;">
|
||||
Cancel
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div style="margin-top: 2rem; text-align: center;">
|
||||
<a href="{% url 'dashboard' %}" style="color: var(--color-text-secondary, #666); text-decoration: none; font-size: 0.875rem;">← Back to Dashboard</a>
|
||||
<a href="{% url 'dashboard' %}" style="color: var(--text-secondary); text-decoration: none; font-size: 0.875rem;">← Back to Dashboard</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user