Fix CSS stuff (#61)

Co-authored-by: Halfdan Mouritzen <halfdan@robothangarskib.dk>
Co-authored-by: halfd <halfd@noreply@git.data.coop>
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/61
Co-authored-by: Víðir Valberg Guðmundsson <valberg@orn.li>
Co-committed-by: Víðir Valberg Guðmundsson <valberg@orn.li>
This commit is contained in:
Víðir Valberg Guðmundsson 2025-01-22 21:26:06 +00:00 committed by valberg
parent cda633134e
commit e2cb4b220d
7 changed files with 176 additions and 122 deletions

View file

@ -65,3 +65,8 @@ html.dark input[type="email"] {
width: 100%; width: 100%;
color: var(--light-dust); color: var(--light-dust);
} }
html.dark div.services>div,
html.dark div.infobox {
background: var(--dark);
}

View file

@ -51,7 +51,6 @@ h6 {
--light-dust: #fefef9; --light-dust: #fefef9;
--dust: #f4f1ef; --dust: #f4f1ef;
--medium-dust: #dadada; --medium-dust: #dadada;
--medium-dust : #dadada;
--dark-dust: #bfbfbf; --dark-dust: #bfbfbf;
--fade: #878787; --fade: #878787;
--twilight: #4a4a4a; --twilight: #4a4a4a;
@ -72,16 +71,24 @@ h6 {
--outer-space: var(--double-space); --outer-space: var(--double-space);
} }
/* Media queries */
@media (min-width: 1380px) { @media (min-width: 1380px) {
:root { :root {
--outer-space: 15%; --outer-space: 15%;
} }
} }
@media (max-width: 720px) {
body header h1 {
font-size: 1em;
}
}
html, html,
body { body {
height: 100%; height: 100%;
font-size: 1.05em; /* font-size: 1.05em; */
font-size: 16px;
} }
h1, h1,
@ -375,6 +382,12 @@ article table#user_email_table tbody tr td:first-child {
text-align: center; text-align: center;
} }
article table tbody td input[type="radio"] {
width: var(--double-space);
height: var(--double-space);
vertical-align: middle;
}
form>div { form>div {
margin: 0 0 var(--double-space); margin: 0 0 var(--double-space);
} }
@ -386,9 +399,9 @@ form>div>label {
form>div>input[type="text"], form>div>input[type="text"],
form>div>input[type="password"], form>div>input[type="password"],
input[type="email"] { form>div>input[type="email"] {
border: 2px solid var(--twilight); border: 2px solid var(--twilight);
border-radius: 6px; border-radius: var(--quarter-space);
padding: 8px; padding: 8px;
background: var(--light-dust); background: var(--light-dust);
width: 100%; width: 100%;
@ -423,7 +436,7 @@ form div.buttonHolder button {
padding: var(--double-space); padding: var(--double-space);
} }
#email-add-overlay .content-view p { #email-add-overlay .panel-body div {
margin: var(--double-space) 0; margin: var(--double-space) 0;
} }
@ -505,7 +518,9 @@ footer {
opacity: 0.8; opacity: 0.8;
} }
footer a, footer a:visited, footer a:active { footer a,
footer a:visited,
footer a:active {
color: var(--dust); color: var(--dust);
text-decoration: underline; text-decoration: underline;
} }

View file

@ -81,14 +81,13 @@
<div class="content-view"> <div class="content-view">
<h3>{% trans "Add E-mail" %}</h3> <h3>{% trans "Add E-mail" %}</h3>
<div class="panel-body"> <div class="panel-body">
<form method="post" action="{% url 'account_email' %}" <form method="post" action="{% url 'account_email' %}" class="add_email">
class="add_email">
{% csrf_token %} {% csrf_token %}
{{ form.as_p }} {{ form.as_div }}
<button name="action_add" style="float:right" type="submit"> <button name="action_add" style="float:right" type="submit">
{% trans "Add E-mail" %} {% trans "Add E-mail" %}
</button> </button>
<button id="overlay-close-button" class="secondary">Cancel</button> <button id="overlay-close-button" class="secondary">{% trans "Cancel" %}</button>
</form> </form>
</div> </div>
</div> </div>

View file

@ -3,7 +3,6 @@
{% load static %} {% load static %}
{% block non_login_content %} {% block non_login_content %}
<div id="loginbox"> <div id="loginbox">
<div class="login"> <div class="login">
{% if form.non_field_errors %} {% if form.non_field_errors %}
@ -13,7 +12,7 @@
</div> </div>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<h2>Login</h2> <h2>{% trans "Login "%}</h2>
<form method="post" action=""> <form method="post" action="">
{% csrf_token %} {% csrf_token %}
@ -46,8 +45,7 @@
</div> </div>
</form> </form>
<div> <div>
<a href="{% url "account_reset_password" %}" <a href="{% url "account_reset_password" %}">
class="w-100 btn btn-lg btn-outline-info">
{% trans "Forgot password?" %} {% trans "Forgot password?" %}
</a> </a>
</div> </div>
@ -60,5 +58,4 @@
</div> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View file

@ -6,44 +6,51 @@
{% block head_title %}{% trans "Password Reset" %}{% endblock %} {% block head_title %}{% trans "Password Reset" %}{% endblock %}
{% block non_login_content %} {% block non_login_content %}
<div id="loginbox">
<div class="login">
<h2>{% trans "Password Reset" %}</h1>
<h1 class="h3 mb-3 fw-normal">{% trans "Password Reset" %}</h1> {% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
{% if user.is_authenticated %} <p>{% trans "Enter your e-mail address below, and we'll send you an e-mail allowing you to reset your password." %}</p>
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p> <form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
{% csrf_token %}
<form method="POST" action="{% url 'account_reset_password' %}" class="password_reset"> <div>
{% csrf_token %} <label for="id_email" class="visually-hidden">
<label for="id_email" class="visually-hidden"> {% trans "E-mail" %}
{% trans "E-mail address" %} </label>
</label> <input type="email"
<input type="email" id="id_email"
id="id_email" name="email"
name="email" class="form-control mb-lg-2 {% if form.email.errors %}is-invalid{% elif form.is_bound %}is-valid{% endif %}"
class="form-control mb-lg-2 {% if form.email.errors %}is-invalid{% elif form.is_bound %}is-valid{% endif %}" placeholder="{% trans "E-mail" %}"
placeholder="{% trans "E-mail address" %}" required>
required> {% if form.email.errors %}
{% if form.email.errors %} {% for error in form.email.errors %}
{% for error in form.email.errors %} <div class="invalid-feedback mb-lg-2">
<div class="invalid-feedback mb-lg-2"> {{ error }}
{{ error }} </div>
{% endfor %}
{% endif %}
</div> </div>
{% endfor %} <button type="submit">{% trans 'Reset My Password' %}</button>
{% endif %} </form>
<input class="w-100 btn btn-lg btn-primary" <p><small>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</small></p>
type="submit" value="{% trans 'Reset My Password' %}" />
</form>
<p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p> <a href="{% url "account_login" %}">
{% trans "To login" %}
<hr> </a>
<a class="w-100" </div>
type="submit" <div class="signup">
href="{% url "account_login" %}"> <img src="https://data.coop/static/img/logo_da.svg" alt="data.coop logo">
{% trans "To login" %} <div class="new_here">
</a> <h2>{% trans "Are you new here?" %}</h2>
<a class="button" href="{% url "account_signup" %}">{% trans "Become a member" %}</a>
</div>
</div>
</div>
{% endblock %} {% endblock %}

View file

@ -6,11 +6,30 @@
{% block head_title %}{% trans "Password Reset" %}{% endblock %} {% block head_title %}{% trans "Password Reset" %}{% endblock %}
{% block non_login_content %} {% block non_login_content %}
<h1>{% trans "Password Reset" %}</h1> <div id="loginbox">
<div class="login">
<div>
<h2>{% trans "Password Reset" %}</h2>
{% if user.is_authenticated %} <hr />
{% include "account/snippets/already_logged_in.html" %} {% if user.is_authenticated %}
{% endif %} {% include "account/snippets/already_logged_in.html" %}
{% endif %}
<p>{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p> <p>{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
</div>
<a class="w-100"
type="submit"
href="{% url "account_login" %}">
{% trans "To login" %}
</a>
</div>
<div class="signup">
<img src="https://data.coop/static/img/logo_da.svg" alt="data.coop logo">
<div class="new_here">
<h2>{% trans "Are you new here?" %}</h2>
<a class="button" href="{% url "account_signup" %}">{% trans "Become a member" %}</a>
</div>
</div>
</div>
{% endblock %} {% endblock %}

View file

@ -3,73 +3,85 @@
{% load static %} {% load static %}
{% block non_login_content %} {% block non_login_content %}
<h1 class="h3 mb-3 fw-normal">{% trans "Become a member" %}</h1> <div id="loginbox">
<div class="login">
<h2>{% trans "Become a member" %}</h2>
{% if form.non_field_errors %} {% if form.non_field_errors %}
{% for error in form.non_field_errors %} {% for error in form.non_field_errors %}
<div class="alert alert-danger" role="alert"> <div class="alert alert-danger" role="alert">
{{ error }} {{ error }}
</div>
{% endfor %}
{% endif %}
{{ form.email.errors }}
{{ form.password1.errors }}
<p>{% trans "To become a member, you need to have an account. Create one here." %}</p>
<form method="post" action="">
{% csrf_token %}
<div>
<label for="id_email"
class="visually-hidden">
{% trans "E-mail" %}
</label>
<input type="email"
id="id_email"
name="email"
class="form-control mb-lg-2 {% if form.email.errors %}is-invalid{% elif form.is_bound %}is-valid{% endif %}"
placeholder="{% trans "E-mail" %}"
required
autofocus>
{% if form.email.errors %}
{% for error in form.email.errors %}
<div class="invalid-feedback">
{{ error }}
</div>
{% endfor %}
{% endif %}
</div>
<div>
<label for="id_password" class="visually-hidden">
{% trans "Password" %}
</label>
<input type="password"
id="id_password"
name="password1"
class="form-control mb-lg-2 {% if form.password1.errors %}is-invalid{% elif form.is_bound %}is-valid{% endif %}"
placeholder="{% trans "Password" %}"
required>
{% if form.password1.errors %}
{% for error in form.password1.errors %}
<div class="invalid-feedback">
{{ error }}
</div>
{% endfor %}
{% endif %}
</div>
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}"
value="{{ redirect_field_value }}"/>
{% endif %}
<button type="submit">{% trans "Sign up" %}</button>
</form>
<div>
<a href="{% url "account_login" %}">
{% trans "To login" %}
</a>
</div> </div>
{% endfor %} </div>
{% endif %} <div class="signup">
<img src="https://data.coop/static/img/logo_da.svg" alt="data.coop logo">
{{ form.email.errors }} <div class="new_here">
{{ form.password1.errors }} <h2>{% trans "Are you new here?" %}</h2>
<a class="button" href="{% url "account_signup" %}">{% trans "Become a member" %}</a>
<p>{% trans "To become a member, you need to have an account. Create one here." %}</p> </div>
</div>
<form method="post" action=""> </div>
{% csrf_token %}
<label for="id_email"
class="visually-hidden">
{% trans "E-mail" %}
</label>
<input type="email"
id="id_email"
name="email"
class="form-control mb-lg-2 {% if form.email.errors %}is-invalid{% elif form.is_bound %}is-valid{% endif %}"
placeholder="{% trans "E-mail" %}"
required
autofocus>
{% if form.email.errors %}
{% for error in form.email.errors %}
<div class="invalid-feedback">
{{ error }}
</div>
{% endfor %}
{% endif %}
<label for="id_password" class="visually-hidden">
{% trans "Password" %}
</label>
<input type="password"
id="id_password"
name="password1"
class="form-control mb-lg-2 {% if form.password1.errors %}is-invalid{% elif form.is_bound %}is-valid{% endif %}"
placeholder="{% trans "Password" %}"
required>
{% if form.password1.errors %}
{% for error in form.password1.errors %}
<div class="invalid-feedback">
{{ error }}
</div>
{% endfor %}
{% endif %}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}"
value="{{ redirect_field_value }}"/>
{% endif %}
<button class="w-100 btn btn-lg btn-primary"
type="submit">{% trans "Sign up" %}</button>
</form>
<hr>
<a class="w-100"
type="submit"
href="{% url "account_login" %}">
{% trans "To login" %}
</a>
{% endblock %} {% endblock %}