add date
Some checks are pending
ci/woodpecker/push/publish Pipeline is pending

This commit is contained in:
Mylloon 2023-04-24 18:36:01 +02:00
parent 3d538121a9
commit cc0d787328
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -15,7 +15,23 @@
<ul> <ul>
{{#posts}} {{#posts}}
<li> <li>
<span>DATE</span> <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"> <div class="content">
<h3><a href="/blog/{{url}}">{{title}}</a></h3> <h3><a href="/blog/{{url}}">{{title}}</a></h3>
<p>SHORT DESC</p> <p>SHORT DESC</p>