Add template for articles

This commit is contained in:
2024-03-12 11:48:49 +01:00
parent 7ec6624a79
commit 7ea1ddf3b6
+17 -1
View File
@@ -13,6 +13,22 @@
<title>G.O.N.G - Groupe d'Organisation Nationale de la Guadeloupe</title> <title>G.O.N.G - Groupe d'Organisation Nationale de la Guadeloupe</title>
</head> </head>
<body> <body>
<div hx-boost hx-ext="client-side-templates">
<div
hx-get="http://localhost:1337/api/articles?populate=couverture"
hx-trigger="load"
mustache-template="articles"
>
<p>Chargement...</p>
</div>
<script id="articles" type="x-tmpl-mustache">
{{#data}}
<h4>{{attributes.titre}}</h4>
{{{attributes.contenu}}}
<small>{{attributes.date}}</small>
<hr/>
{{/data}}
</script>
</div>
</body> </body>
</html> </html>