mirror of
https://gitlab.com/OpenAlt/OpenAltRO/openalt_ro.git
synced 2026-11-23 23:29:14 +00:00
Improved homepage, added newsletter self-subscription
This commit is contained in:
parent
e820431d0c
commit
4ac6e74cdc
9 changed files with 348 additions and 36 deletions
|
|
@ -1,23 +1,26 @@
|
|||
|
||||
|
||||
<% if(page.event.video != "TBD") { %>
|
||||
<% if(page.event.video && page.event.video != "TBD") { %>
|
||||
<div>
|
||||
<%- page.event.video %>
|
||||
</div>
|
||||
<%} %>
|
||||
<% } %>
|
||||
|
||||
<div>
|
||||
<h1 class="event">
|
||||
<%- page.event.date %> at <%- page.event.time %>
|
||||
</h1>
|
||||
<div class="event-actions">
|
||||
<% if (page.event.luma && page.event.luma !== false) { %>
|
||||
<a href="<%- page.event.luma %>" target="_blank" class="btn-event btn-luma"><i class="fa-solid fa-calendar-check"></i> RSVP on Luma</a>
|
||||
<% } %>
|
||||
<a href="http://speakers.openalt.ro/" target="_blank" class="btn-event btn-speaker"><i class="fa-solid fa-microphone"></i> Call for Presentations</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if(page.event.program != "TBD") { %>
|
||||
<div>
|
||||
<h2> AGENDA </h2>
|
||||
<!-- When agenda is public -->
|
||||
<% page.event.program.forEach(function(item, index) { %>
|
||||
<h2 class="program"><%- item.name %> by <a href="<%- item.speaker.url %>"><%- item.speaker.name %></a></h2>
|
||||
<h2 class="program"><%- item.name %> by <% if (item.speaker.url) { %><a href="<%- item.speaker.url %>"><%- item.speaker.name %></a><% } else { %><%- item.speaker.name %><% } %></h2>
|
||||
<% if (index < page.event.program.length - 1) { %>
|
||||
<h2 class="program break">B R E A K</h2>
|
||||
<% } %>
|
||||
|
|
@ -30,21 +33,16 @@
|
|||
<h3>
|
||||
<a href='<%- page.event.place.link %>'><i class="fa fa-map-marker-alt"></i> <%- page.event.place.name %></a>
|
||||
</h3>
|
||||
<% if(page.event.place.osm != "TBD" || page.event.place.osm != "") { %>
|
||||
<% if(page.event.place.osm && page.event.place.osm != "TBD" && page.event.place.osm != "") { %>
|
||||
<span class="osm"><%- page.event.place.osm %></span>
|
||||
<% } %>
|
||||
<%} else { %>
|
||||
<% } else { %>
|
||||
<h3>
|
||||
<i class="fa fa-map-marker-alt"></i> TBD
|
||||
</h3>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
<div class="smoll">
|
||||
Would you like to speak on this or our next meetup? <br> Submit your talk here: <a href="http://speakers.openalt.ro/">speakers.openalt.ro</a>.
|
||||
</div>
|
||||
|
||||
<div class="post-content">
|
||||
<%- page.content %>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,44 @@
|
|||
<section class="event">
|
||||
<% counter = 2 %>
|
||||
<% page.posts.forEach(function(post) { %>
|
||||
<% post.tags.data.forEach(function(tag) { %>
|
||||
<% if ( (tag.name == "Events") && (counter != 0) ) { %>
|
||||
<%- include('post_preview', { post: post, source: "index", event: counter }) %>
|
||||
<% counter = counter - 1 %>
|
||||
<% } %>
|
||||
<% }); %>
|
||||
<% }); %>
|
||||
</section>
|
||||
<section class="event" style="display: block;">
|
||||
<% if (site.nextEvent) { var e = site.nextEvent; %>
|
||||
<div class="event-banner">
|
||||
<img class="event-banner-logo" src="/images/assets/OpenAltRomania.svg" alt="">
|
||||
<div class="event-banner-inner">
|
||||
<div class="event-banner-kicker">Next Meetup</div>
|
||||
<h1 class="event-banner-title"><%= e.title %></h1>
|
||||
<p class="event-banner-meta">
|
||||
<strong><%= e.event.date %></strong> · <strong><%= e.event.time %></strong>
|
||||
<% if (e.event.place && e.event.place !== 'TBD') { %>
|
||||
· <span class="event-banner-loc"><i class="fa fa-map-marker-alt"></i><a href="<%- e.event.place.link %>"><%= e.event.place.name %></a></span>
|
||||
<% } %>
|
||||
</p>
|
||||
<div class="event-actions" style="margin-bottom: 2.5em;">
|
||||
<% if (e.event.luma && e.event.luma !== false) { %>
|
||||
<a href="<%- e.event.luma %>" target="_blank" class="btn-event btn-luma"><i class="fa-solid fa-calendar-check"></i> RSVP on Luma</a>
|
||||
<% } %>
|
||||
<a href="http://speakers.openalt.ro/" target="_blank" class="btn-event btn-speaker"><i class="fa-solid fa-microphone"></i> Call for Presentations</a>
|
||||
</div>
|
||||
<div class="event-banner-agenda">
|
||||
<% if (e.event.program && e.event.program !== 'TBD') { %>
|
||||
<% e.event.program.forEach(function(item) { %>
|
||||
<div class="event-banner-agenda-item">
|
||||
<%- item.name %>
|
||||
<span class="event-banner-spk"><% if (item.speaker.url) { %><a href="<%- item.speaker.url %>" target="_blank"><%- item.speaker.name %></a><% } else { %><%- item.speaker.name %><% } %></span>
|
||||
</div>
|
||||
<% }); %>
|
||||
<% } else { %>
|
||||
<div class="event-banner-agenda-item">Agenda TBD</div>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<% if (site.lastEvent) { var l = site.lastEvent; %>
|
||||
<div style="padding-top: 2em;">
|
||||
<a href="<%- url_for(l.path) %>"><h1>Video of our last event: <%= l.title %></h1></a>
|
||||
<% if (l.event.video && l.event.video !== 'TBD') { %>
|
||||
<div class="vhsky-video"><%- l.event.video %></div>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
<div class="homepage">
|
||||
<%- include("_partial/index_event", {
|
||||
item: site.posts.sort('-date')
|
||||
}) %>
|
||||
<style>
|
||||
main { margin-top: 0 !important; }
|
||||
body { overflow-x: hidden; }
|
||||
</style>
|
||||
|
||||
<%- include("_partial/index_minifeed", {
|
||||
<div class="homepage">
|
||||
<%- include("_partial/index_event") %>
|
||||
|
||||
<%- include("_partial/index_minifeed", {
|
||||
item: site.posts.sort('-date')
|
||||
}) %>
|
||||
|
||||
<%- include("_partial/index_partners") %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -82,6 +82,48 @@
|
|||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
<!-- Newsletter side tab -->
|
||||
<div class="newsletter-tab" id="newsletterTab">
|
||||
<div class="newsletter-tab-label" id="newsletterLabel">Newsletter</div>
|
||||
<div class="newsletter-tab-panel">
|
||||
<p class="newsletter-tab-heading">Get notified about future events</p>
|
||||
<form action="https://listmonk.hackman.club/subscription/form" method="post" class="newsletter-tab-form">
|
||||
<input type="hidden" name="l" value="720a8345-78db-420c-ad80-0cfa2be62d9e">
|
||||
<input type="text" name="name" placeholder="Your name" class="newsletter-input">
|
||||
<input type="email" name="email" placeholder="your@email.com" required class="newsletter-input">
|
||||
<button type="submit" class="newsletter-btn">Subscribe</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function() {
|
||||
var tab = document.getElementById('newsletterTab');
|
||||
var label = document.getElementById('newsletterLabel');
|
||||
var focused = false;
|
||||
|
||||
tab.addEventListener('mouseenter', function() { tab.classList.add('is-open'); });
|
||||
tab.addEventListener('mouseleave', function() { if (!focused) tab.classList.remove('is-open'); });
|
||||
|
||||
tab.querySelectorAll('input').forEach(function(el) {
|
||||
el.addEventListener('focus', function() { focused = true; });
|
||||
el.addEventListener('blur', function() { focused = false; });
|
||||
});
|
||||
|
||||
label.addEventListener('click', function() {
|
||||
focused = false;
|
||||
tab.classList.remove('is-open');
|
||||
});
|
||||
|
||||
document.addEventListener('click', function(e) {
|
||||
if (!tab.contains(e.target)) {
|
||||
focused = false;
|
||||
tab.classList.remove('is-open');
|
||||
}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<div class="footer smoll">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue