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:
@@ -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
|
||||||
|
|||||||
6
content/aside/aside-index.md
Normal file
6
content/aside/aside-index.md
Normal 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%") }}
|
||||||
BIN
static/porsche-944-turbo-red-glass.jpg
Normal file
BIN
static/porsche-944-turbo-red-glass.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 231 KiB |
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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 %}
|
||||||
|
|||||||
@@ -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 %}
|
||||||
|
|||||||
@@ -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 %}
|
||||||
|
|||||||
@@ -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 %}
|
||||||
|
|||||||
Reference in New Issue
Block a user