Use blocks to define components

This commit is contained in:
Helen Chong 2024-04-19 06:58:45 +08:00
parent 134aad4423
commit f13dd8c8e1
2 changed files with 8 additions and 4 deletions

View File

@ -25,12 +25,12 @@
<title>{{ pageTitle }}</title>
</head>
<body>
{% include "main/hero.njk" %}
{% include "main/navbar.njk" %}
{% block name %}{% include "global/hero.njk" %}{% endblock %}
{% block navbar %}{% include "global/navbar.njk" %}{% endblock %}
<main>
{{ content | safe }}
</main>
{% include "main/footer.njk" %}
{% block footer %}{% include "global/footer.njk" %}{% endblock %}
{% include "global/top-btn.njk" %}
</body>
</html>

View File

@ -1 +1,5 @@
{% extends "global/baselayout.njk" %}
{% extends "global/baselayout.njk" %}
{% block name %}{% include "main/hero.njk" %}{% endblock %}
{% block navbar %}{% include "main/navbar.njk" %}{% endblock %}
{% block footer %}{% include "main/footer.njk" %}{% endblock %}