mirror of
https://gitlab.com/OpenAlt/OpenAltRO/openalt_ro.git
synced 2026-11-23 15:19:15 +00:00
Design updates, adding 2027 posts
This commit is contained in:
parent
2d50bec4cb
commit
e51d53994a
30 changed files with 521 additions and 81 deletions
55
themes/openalt/layout/events.ejs
Normal file
55
themes/openalt/layout/events.ejs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<div class="timeline-page">
|
||||
<h1 class="article"><%= page.title || "Events" %></h1>
|
||||
<% if (page.content) { %>
|
||||
<div class="post-content"><%- page.content %></div>
|
||||
<% } %>
|
||||
|
||||
<% var events = site.allEvents || []; %>
|
||||
<% if (!events.length) { %>
|
||||
<p>No events yet.</p>
|
||||
<% } else { %>
|
||||
<ol class="timeline">
|
||||
<% events.forEach(function(item) {
|
||||
var p = item.post;
|
||||
var ev = p.event || {};
|
||||
var cancelled = ev.status === "cancelled";
|
||||
var hasVideo = ev.video && ev.video !== "TBD";
|
||||
var labels = { past: "Past", next: "Next meetup", upcoming: "Upcoming" };
|
||||
%>
|
||||
<li class="timeline-item <%= item.state %><%= cancelled ? ' cancelled' : '' %>"<% if (item.state === 'next') { %> id="next-event"<% } %>>
|
||||
<div class="timeline-card">
|
||||
<div class="timeline-kicker"><%= cancelled ? "Cancelled" : labels[item.state] %></div>
|
||||
<h2 class="timeline-title">
|
||||
<% var title = (cancelled ? "[Cancelled] " : "") + (p.title || "Untitled"); %>
|
||||
<% if (item.hasPage) { %><a href="<%- url_for(p.path) %>"><%= title %></a><% } else { %><%= title %><% } %>
|
||||
</h2>
|
||||
<p class="timeline-meta">
|
||||
<strong><%= ev.date %></strong><% if (ev.time) { %> · <strong><%= ev.time %></strong><% } %>
|
||||
<% if (ev.place && ev.place !== "TBD") { %>
|
||||
<br><span class="timeline-loc"><%- icon('lucide:map-pin') %> <%= ev.place.name %></span>
|
||||
<% } %>
|
||||
</p>
|
||||
<div class="event-actions">
|
||||
<% if (!cancelled && item.state !== "past" && ev.luma) { %>
|
||||
<a href="<%- ev.luma %>" target="_blank" class="btn-event btn-luma"><%- icon('lucide:calendar-check') %> RSVP on Luma</a>
|
||||
<% } %>
|
||||
<% if (item.hasPage && hasVideo) { %>
|
||||
<a href="<%- url_for(p.path) %>" class="btn-event btn-speaker"><%- icon('lucide:play') %> Watch video</a>
|
||||
<% } else if (item.hasPage) { %>
|
||||
<a href="<%- url_for(p.path) %>" class="btn-event btn-speaker">Details</a>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<% }); %>
|
||||
</ol>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
var target = document.getElementById("next-event") ||
|
||||
document.querySelector(".timeline-item:last-child");
|
||||
if (target) target.scrollIntoView({ block: "center" });
|
||||
})();
|
||||
</script>
|
||||
<% } %>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue