splitted twig templates in multiple files
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user