mirror of
https://gitlab.com/OpenAlt/OpenAltRO/openalt_ro.git
synced 2026-11-23 15:19:15 +00:00
Add the theme
This commit is contained in:
parent
cff7000285
commit
142a478a6a
21 changed files with 663 additions and 1 deletions
11
themes/openalt/layout/_partial/date.ejs
Normal file
11
themes/openalt/layout/_partial/date.ejs
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue