segmentation du corps de page en fonction de la presence d'aside dans l'element main de la page et ajustement du css en consequence

This commit is contained in:
2026-03-11 23:13:15 +01:00
parent 3e9580b3b1
commit 71e544f24a
9 changed files with 33 additions and 20 deletions

View File

@@ -16,13 +16,9 @@
</ul>
</nav>
<div class="layout">
<main class="main-content">{% block content %} {% endblock content %}</main>
{% if page.extra.aside %}
<aside>
{% include "partials/aside.html" %}
</aside>
{% endif %}
</div>
{% block content %} {% endblock content %}
{% include "partials/aside.html" %}
</div>
</body>
<footer>
<small class="footer-text">© <script>document.write(new Date().getFullYear())</script> Hatmos. All Rights Reserved.</small>

View File

@@ -1,5 +1,7 @@
{% extends "base.html" %}
{% block content %}
{{ section.content | safe }}
<main class="main-content">
{{ section.content | safe }}
</main>
{% endblock content %}

View File

@@ -1,5 +1,7 @@
{% extends "base.html" %}
{% block content %}
{{ page.content | safe }}
<main class="main-content">
{{ page.content | safe }}
</main>
{% endblock content %}

View File

@@ -1,2 +1,6 @@
{% set aside = get_page(path="aside/" ~ page.extra.aside) %}
{{ aside.content | safe }}
{% if page.extra.aside %}
<aside>
{% set aside = get_page(path="aside/" ~ page.extra.aside) %}
{{ aside.content | safe }}
</aside>
{% endif %}

View File

@@ -1,12 +1,14 @@
{% extends "base.html" %}
{% block content %}
<h1>
{{section.title}}
</h1>
<ul>
{% for page in section.pages %}
<li><a href="{{page.permalink | safe }}">{{ page.title }}</a></li>
{% endfor %}
</ul>
<main class="main-content">
<h1>
{{section.title}}
</h1>
<ul>
{% for page in section.pages %}
<li><a href="{{page.permalink | safe }}">{{ page.title }}</a></li>
{% endfor %}
</ul>
</main>
{% endblock content %}