mylloon.fr/templates/blog/index.html
2023-04-25 03:16:47 +02:00

47 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html class="index" lang="fr">
<head dir="ltr">
{{>blog/head.html}}
<link rel="stylesheet" href="/css/blog/index.css" />
</head>
<body class="index">
{{#data}}
<h1>Blog</h1>
{{#no_posts}}
<h2 class="subtitle">Aucun posts</h2>
{{/no_posts}} {{^no_posts}}
<div class="timeline">
<ul>
{{#posts}}
<li onclick="location.href='/blog/{{url}}';">
<span>
{{#date}}
<script>
{
const date = new Date(+"{{year}}", +"{{month}}", +"{{day}}");
document.currentScript.outerHTML = date.toLocaleDateString(
navigator.language || navigator.userLanguage,
{
year: "numeric",
month: "long",
day: "numeric",
}
);
}
</script>
{{/date}}
</span>
<div class="content">
<h2>{{title}}</h2>
{{#desc}}
<p>{{desc}}</p>
{{/desc}}
</div>
</li>
{{/posts}}
</ul>
</div>
{{/no_posts}} {{/data}} {{>footer.html}}
</body>
</html>