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

@@ -4,6 +4,7 @@ description = "Site portefolio de mes objectifs et accomplissements"
[extra] [extra]
keywords = ["Hatmos", "hatmos", "portefolio"] keywords = ["Hatmos", "hatmos", "portefolio"]
aside = "aside-index.md"
+++ +++
# Accomplissements # Accomplissements

View File

@@ -0,0 +1,6 @@
+++
title = "photo red glass porsche"
description = "une photo d'une porsche 944 avec uniquement la couleur rouge et en effet verre raye"
+++
{{ image(src="/porsche-944-turbo-red-glass.jpg", alt="Une photo d'une porsche 944 avec uniquement la couleur rouge et un effet de verre raye", height="100%") }}

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

View File

@@ -57,7 +57,7 @@ footer{
margin: 5px; margin: 5px;
} }
.layout{ .layout:has(aside) {
display: grid; display: grid;
grid-template-columns: 2fr 1fr; grid-template-columns: 2fr 1fr;
} }

View File

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

View File

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

View File

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

View File

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