Initial upload

uploaded v0.1
This commit is contained in:
Bashy 2025-02-10 17:38:16 +02:00 • committed by GitHub
parent 7ca416624c
commit ffb8736de2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 642 additions and 0 deletions

11
layout/_partial/date.ejs Normal file
View file

@ -0,0 +1,11 @@
<div class="date smoll">
<%
const posted = new Date(date);
const now = new Date();
const year = 365 * 24 * 60 * 60 * 1000;
const format = (now - posted) < year ?
{ day: 'numeric', month: 'long', hour: 'numeric', minute: 'numeric', hour12: true } :
{ day: 'numeric', month: 'long', year: 'numeric', hour: 'numeric', minute: 'numeric', hour12: true };
%>
<%= posted.toLocaleString('en-US', format ) %>
</div>