Add template for articles
This commit is contained in:
+17
-1
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user