Styling and accessibility tweaks
Add .dark-mode for .errors Use more correct tags for onClick and form behavior
This commit is contained in:
parent
f0f19d7d41
commit
09f182fcd0
|
@ -131,7 +131,7 @@ def create_account() -> Response:
|
|||
password = request.form['password']
|
||||
|
||||
if password != request.form['confirm-password']:
|
||||
return render_index(error="Password and confirm password must match!", status=400)
|
||||
return render_index(error="Passwords did not match!", status=400)
|
||||
password_len = len(password)
|
||||
if password_len < 8 or password_len > 64:
|
||||
return render_index(error="Password must be between 8 and 64 characters", status=400)
|
||||
|
|
|
@ -236,7 +236,6 @@ input.btn {
|
|||
flex-direction: row;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
font-size: 90%;
|
||||
}
|
||||
.user.logged-in {
|
||||
margin-bottom: 1em;
|
||||
|
@ -269,6 +268,12 @@ textarea {
|
|||
.errors {
|
||||
color: #a40f0f;
|
||||
}
|
||||
body.dark-mode .errors {
|
||||
color: white;
|
||||
background-color: red;
|
||||
padding: 0.2em;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
#body {
|
||||
flex-grow: 1;
|
||||
|
@ -481,3 +486,11 @@ body.dark-mode .text-button:hover {
|
|||
.scroll-lock {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.dark-light {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.dark-light:hover {
|
||||
color: black;
|
||||
}
|
||||
|
|
|
@ -24,9 +24,10 @@
|
|||
{% endmacro %}
|
||||
|
||||
{% macro form_submit_button(text, id, action, errors) %}
|
||||
<a href="javascript:void(0)"
|
||||
<button type="button"
|
||||
id="{{ id }}"
|
||||
class="wipe up-wipe"
|
||||
style="font-size: 1em;"
|
||||
{% if errors %}
|
||||
onclick="/*clearErrors();*/const e = document.getElementById('create-account-form'); e.action = '{{ action }}'; e.submit()"
|
||||
{% else %}
|
||||
|
|
|
@ -86,10 +86,10 @@
|
|||
{% else %}
|
||||
<div class="user logged-out">
|
||||
<form action="/create_account">
|
||||
<div class="btn primary color-fade" style="font-family: 'BarlowMedium'; margin-right: 1em; padding: 0.4em 1em;" onclick="showModal(false, 'Create your account')">
|
||||
<button type="button" class="btn primary color-fade" style="font-family: 'BarlowMedium'; margin-right: 1em; padding: 0.6em 2em;" onclick="showModal(false, 'Create your account')">
|
||||
Create account
|
||||
</div>
|
||||
<div class="btn secondary color-fade" style="margin: 0; padding: 0.4em 1em;" onclick="showModal(true, 'Login now')">Log in</div>
|
||||
</button>
|
||||
<button type="button" class="btn secondary color-fade" style="margin: 0; padding: 0.6em 2em;" onclick="showModal(true, 'Login now')">Log in</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -83,11 +83,9 @@
|
|||
{% endif %}
|
||||
|
||||
<div style="text-align: right; margin-bottom: 2em;">
|
||||
<a href="javascript:void(0)"
|
||||
class="wipe up-wipe"
|
||||
style="margin-bottom: 1em;"
|
||||
onclick="clearErrors();document.getElementById('letter-form').submit()"
|
||||
>Generate PDF</a>
|
||||
<span class="wipe up-wipe" style="margin-bottom: 1em; padding: 0;">
|
||||
<input type="submit" value="Generate PDF" class="transition dark-light" style="background: rgba(0, 0, 0, 0); border: none; margin: 0; padding: 1em; cursor: pointer;">
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
|
Loading…
Reference in New Issue