splitted twig templates in multiple files

This commit is contained in:
julien
2026-02-22 19:48:40 +01:00
parent 76134c9e40
commit 6ef1eb9508
9 changed files with 38 additions and 10 deletions

View File

@@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8">
<title>{% block title %}Mon Blog{% endblock %}</title>
{# <link rel="stylesheet" href="/css/main.css"> #}
<style>
body {font-family: Arial, sans-serif; margin: 2rem;}
.post {border-bottom: 1px solid #ccc; padding: 1rem 0;}
@@ -11,11 +12,21 @@
</style>
</head>
<body>
<h1>
<a href="/">Mon Blog</a> |
<a href="/admin">Admin</a>
</h1>
{% block content %}{% endblock %}
</body>
</html>
{# Header commun #}
{% include 'partials/_header.twig' %}
{# Zone principale chaque page injecte son contenu #}
<main>
{% block content %}{% endblock %}
</main>
{# Footer commun #}
{% include 'partials/_footer.twig' %}
{# Scripts globaux #}
<script src="/js/app.js"></script>
{% block scripts %}{% endblock %}</body>
</html>