Added new events and more

This commit is contained in:
Bashy 2026-06-08 10:22:23 +02:00
parent 9ea7891f73
commit e820431d0c
6 changed files with 93 additions and 34 deletions

View file

@ -17,13 +17,15 @@ social:
- url: http://discord.openalt.ro
icon: fab fa-discord
enable: true
- url: https://mastodon.social/@OpenAltRo
- url: https://mastodon.social/@OpenAltRO
relme: true
icon: fab fa-mastodon
enable: true
- url: https://vhsky.cz/c/openaltro/videos
icon: fa-solid fa-circle-play
enable: true
- url: https://www.linkedin.com/company/openaltro/
relme: true
icon: fab fa-linkedin
enable: true
- url: https://matrix.to/#/#OpenAltRO:matrix.org

View file

@ -1,9 +1,19 @@
<%
<% {
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 };
const day = ((d => {
if (d > 3 && d < 21) return d + 'th';
switch (d % 10) {
case 1: return d + 'st';
case 2: return d + 'nd';
case 3: return d + 'rd';
default: return d + 'th';
}
})(posted.getDate()));
const options = now.getFullYear() === posted.getFullYear()
? { month: 'long', hour: 'numeric', minute: 'numeric', hour12: true }
: { year: 'numeric', month: 'long'};
%>
<%= posted.toLocaleString('en-US', format ) %>
<%= day %> <%= posted.toLocaleString('en-US', options).replace(/^(\d+)\s/, '') %>
<% } %>

View file

@ -57,7 +57,11 @@
<% theme.social.forEach(function(social) { %>
<% if (social.enable) { %>
<span class="social-icon">
<a href="<%= social.url %>" target="_blank">
<% if (social.relme) { %>
<a rel="me" href="<%= social.url %>" target="_blank">
<% } else { %>
<a href="<%= social.url %>" target="_blank">
<% } %>
<% if (theme.fontawesome) { %>
<i class="<%= social.icon %>"></i>
<% } else { %>