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" %} {% extends "small_page.html" %}
{% block "title" %}
{% endblock %}
{% block "content" %} {% block "content" %}
<h1>Connexion par mot de passe</h1> <h1>Connexion par mot de passe</h1>

View file

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

View file

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

View file

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

View file

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

View file

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