setup htmx to swap (or not) inner html

This commit is contained in:
Agahnim 2026-03-19 15:46:26 +01:00
parent 7815b07f81
commit bfc2721f28
6 changed files with 23 additions and 9 deletions

View file

@ -5,13 +5,16 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/gif" href="/static/assets/gifs/pcgif.gif" />
<title></title>
<link rel="stylesheet" href="/static/style.css">
<link rel="stylesheet" href="/static/style.css" />
<script src="/static/vendor/htmx.min.js"></script>
</head>
<body>
<body hx-boost="true" hx-target="#content">
{% include "partials/header.html" %}
{% block content %}{% endblock %}
<main id="content">
{% block content %}{% endblock %}
</main>
</body>

View file

@ -2,6 +2,5 @@
{% block content %}
<h1>Bonjour</h1>
<p>Bienvenue sur mon site.</p>
{% include "partials/index.html" %}
{% endblock %}

View file

@ -1,6 +1,5 @@
<header>
<nav>
<a href="/">Accueil</a>
<a href="/blog">Blog</a>
</nav>
</header>

View file

@ -0,0 +1 @@
<h1>Bonjour</h1>