add padding on all edited page

This commit is contained in:
Julien Constant 2023-03-13 12:16:10 +01:00
parent 4c921549c2
commit f13abf5c44
7 changed files with 135 additions and 112 deletions

View File

@ -1,3 +1,7 @@
.main {
box-sizing: border-box;
padding: 10px;
}
.navbar { .navbar {
margin-top: 10px; margin-top: 10px;
@ -131,6 +135,7 @@
@media (max-width: 500px) { @media (max-width: 500px) {
width: calc(50% - 5px); width: calc(50% - 5px);
height: 108px;
} }
@media (max-width: 300px) { @media (max-width: 300px) {
@ -170,6 +175,7 @@
@media (max-width: 500px) { @media (max-width: 500px) {
width: 100%; width: 100%;
height: 100%;
} }
&:hover > .text { &:hover > .text {

View File

@ -1,8 +1,11 @@
.main { .main {
box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-top: 0 !important;
padding: 10px;
width: 100%; width: 100%;
} }

View File

@ -4,7 +4,7 @@
gap: 2px; gap: 2px;
&-general { &-general {
>p { > p {
display: flex; display: flex;
flex-direction: row-reverse; flex-direction: row-reverse;
justify-content: left; justify-content: left;
@ -39,3 +39,11 @@
max-width: 100px; max-width: 100px;
} }
} }
.justify {
text-align: justify;
}
.main {
padding: 10px;
}

View File

@ -1,5 +1,6 @@
main { main {
box-sizing: border-box; box-sizing: border-box;
padding: 10px;
} }
.container { .container {
@ -9,9 +10,7 @@ main {
justify-content: center; justify-content: center;
gap: 10px; gap: 10px;
> div {
>div {
padding: 10px;
border-radius: 10px; border-radius: 10px;
background-color: rgba(0, 0, 0, .05); background-color: rgba(0, 0, 0, .05);
width: 210px; width: 210px;

View File

@ -9,6 +9,7 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="main">
{% if can_edit(profile, user) %} {% if can_edit(profile, user) %}
<button id="download_all_pictures", onclick=download_pictures()>{% trans %}Download all my pictures{% endtrans %}</button> <button id="download_all_pictures", onclick=download_pictures()>{% trans %}Download all my pictures{% endtrans %}</button>
{% endif %} {% endif %}
@ -41,6 +42,7 @@
</div> </div>
<br> <br>
{% endfor %} {% endfor %}
</div>
{% endblock %} {% endblock %}
{% block script %} {% block script %}

View File

@ -9,36 +9,37 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h2>{% trans %}Preferences{% endtrans %}</h2> <div class="main">
<h3>{% trans %}General{% endtrans %}</h3> <h2>{% trans %}Preferences{% endtrans %}</h2>
<form class="form form-general" action="" method="post" enctype="multipart/form-data"> <h3>{% trans %}General{% endtrans %}</h3>
<form class="form form-general" action="" method="post" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
{{ form.as_p() }} {{ form.as_p() }}
<input class="form-submit-btn" type="submit" value="{% trans %}Save{% endtrans %}" /> <input class="form-submit-btn" type="submit" value="{% trans %}Save{% endtrans %}" />
</form> </form>
<h3>{% trans %}Trombi{% endtrans %}</h3> <h3>{% trans %}Trombi{% endtrans %}</h3>
{% if trombi_form %} {% if trombi_form %}
<form class="form form-trombi" action="{{ url('trombi:user_tools') }}" method="post" enctype="multipart/form-data"> <form class="form form-trombi" action="{{ url('trombi:user_tools') }}" method="post" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
{{ trombi_form.as_p() }} {{ trombi_form.as_p() }}
<input class="form-submit-btn" type="submit" value="{% trans %}Save{% endtrans %}" /> <input class="form-submit-btn" type="submit" value="{% trans %}Save{% endtrans %}" />
</form> </form>
{% else %} {% else %}
<p>{% trans trombi=user.trombi_user.trombi %}You already choose to be in that Trombi: {{ trombi }}.{% endtrans %} <p>{% trans trombi=user.trombi_user.trombi %}You already choose to be in that Trombi: {{ trombi }}.{% endtrans %}
<br /> <br />
<a href="{{ url('trombi:user_tools') }}">{% trans %}Go to my Trombi tools{% endtrans %}</a> <a href="{{ url('trombi:user_tools') }}">{% trans %}Go to my Trombi tools{% endtrans %}</a>
</p> </p>
{% endif %} {% endif %}
{% if profile.customer %} {% if profile.customer %}
<h3>{% trans %}Student cards{% endtrans %}</h3> <h3>{% trans %}Student cards{% endtrans %}</h3>
{% if profile.customer.student_cards.exists() %} {% if profile.customer.student_cards.exists() %}
<ul> <ul>
{% for card in profile.customer.student_cards.all() %} {% for card in profile.customer.student_cards.all() %}
<li> <li>
{{ card.uid }} {{ card.uid }}
@ -48,19 +49,21 @@
</a> </a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}
<em>{% trans %}No student card registered.{% endtrans %}</em> <em>{% trans %}No student card registered.{% endtrans %}</em>
<p align="justify">{% trans %}You can add a card by asking at a counter or add it yourself here. If you want to manually <p class="justify">
add a student card yourself, you'll need a NFC reader. We store the UID of the card which is 14 characters long.{% {% trans %}You can add a card by asking at a counter or add it yourself here. If you want to manually
endtrans %}</p> add a student card yourself, you'll need a NFC reader. We store the UID of the card which is 14 characters long.{% endtrans %}
{% endif %} </p>
{% endif %}
<form class="form form-cards" action="{{ url('counter:add_student_card', customer_id=profile.customer.pk) }}" <form class="form form-cards" action="{{ url('counter:add_student_card', customer_id=profile.customer.pk) }}"
method="post"> method="post">
{% csrf_token %} {% csrf_token %}
{{ student_card_form.as_p() }} {{ student_card_form.as_p() }}
<input class="form-submit-btn" type="submit" value="{% trans %}Save{% endtrans %}" /> <input class="form-submit-btn" type="submit" value="{% trans %}Save{% endtrans %}" />
</form> </form>
{% endif %} {% endif %}
</div>
{% endblock %} {% endblock %}

View File

@ -35,6 +35,7 @@
{% endmacro %} {% endmacro %}
{% block content %} {% block content %}
<div class="main">
<h3>{% trans %}SAS{% endtrans %}</h3> <h3>{% trans %}SAS{% endtrans %}</h3>
{% if not user.is_authenticated %} {% if not user.is_authenticated %}
@ -105,4 +106,5 @@
</form> </form>
{% endif %} {% endif %}
{% endif %} {% endif %}
</div>
{% endblock %} {% endblock %}