Simplify html structure to remove useless div

This commit is contained in:
Guillaume Bertholon 2020-12-18 21:20:59 +01:00
parent d56d0b44f3
commit f401c66f97
6 changed files with 27 additions and 33 deletions

View file

@ -1,8 +1,5 @@
{% extends "small_page.html" %}
{% block "title" %}
{% endblock %}
{% block "content" %}
<h1>Connexion par mot de passe</h1>

View file

@ -1,8 +1,8 @@
$page_bg_color: #f6fbfd;
$page_text_color: #250f2d;
$page_link_color: #1e464c;
$page_width: 800px;
$small_page_width: 500px;
$page_width: 850px;
$small_page_width: 550px;
$help_text_color: rgba($page_text_color, .65);

View file

@ -31,20 +31,20 @@ body {
}
main {
display: flex;
justify-content: center;
flex: 1 0 auto;
}
#main_content {
width: $page_width;
padding: 20px;
margin-bottom: 50px;
max-width: $page_width;
width: 100%;
padding: 20px 40px;
margin: 0 auto 50px;
text-align: justify;
flex: 1 0 auto;
@media (max-width: 700px) {
padding: 15px 30px;
}
&.small_page {
width: $small_page_width;
max-width: $small_page_width;
}
}

View file

@ -203,17 +203,17 @@ body {
font-size: 12pt; } }
main {
display: flex;
justify-content: center;
max-width: 850px;
width: 100%;
padding: 20px 40px;
margin: 0 auto 50px;
text-align: justify;
flex: 1 0 auto; }
#main_content {
width: 800px;
padding: 20px;
margin-bottom: 50px;
text-align: justify; }
#main_content.small_page {
width: 500px; }
@media (max-width: 700px) {
main {
padding: 15px 30px; } }
main.small_page {
max-width: 550px; }
footer {
background-color: #6bb8c4;

View file

@ -9,13 +9,10 @@
<body>
{% include "partials/header.html" %}
<main>
<div id="main_content" class="{% block "main_content_class" %}{% endblock %}">
<main {% block "main_attributes" %}{% endblock %}>
{% include "partials/messages.html" %}
{% block "content" %}
{% endblock %}
</div>
{% block "content" %}{% endblock %}
</main>
{% include "partials/footer.html" %}

View file

@ -1,3 +1,3 @@
{% extends "base.html" %}
{% block "main_content_class" %}small_page{% endblock %}
{% block "main_attributes" %}class="small_page"{% endblock %}