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,12 +16,8 @@
</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 %}
<aside>
{% include "partials/aside.html" %} {% include "partials/aside.html" %}
</aside>
{% endif %}
</div> </div>
</body> </body>
<footer> <footer>

View File

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

View File

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