|
11 | 11 |
|
12 | 12 | {% if upcoming_events %}
|
13 | 13 | ## Upcoming events
|
14 |
| -<table width="100%" style="border: 5px solid #ccc; border-collapse: collapse;"> |
15 |
| - {% assign today = site.time | date: "%Y-%m-%d" %} |
16 |
| - {% for event in site.data.events %} |
17 |
| - {% assign event_date = event.date | date: "%Y-%m-%d" %} |
18 |
| - {% if event_date >= today %} |
19 |
| - <tr {% if event_date == today %}class="today-event"{% endif %}> |
20 |
| - <td> |
| 14 | + |
| 15 | +<div class="events-grid"> |
| 16 | +{% for event in site.data.events %} |
| 17 | + {% assign event_date = event.date | date: "%Y-%m-%d" %} |
| 18 | + {% assign today = site.time | date: "%Y-%m-%d" %} |
| 19 | + |
| 20 | + {% if event_date >= today %} |
| 21 | + <article class="event-card" data-event-id="{{ event.id }}"> |
| 22 | + <div class="event-banner"> |
| 23 | + <img src="https://raw.githubusercontent.com/CloudNativeLinz/go-image-generator/main/artifacts/{{ event.id }}.jpg" |
| 24 | + alt="{{ event.title }}" |
| 25 | + loading="lazy" |
| 26 | + onerror="this.src='https://via.placeholder.com/400x200/1f2937/ffffff?text=Event+{{ event.id }}'" |
| 27 | + /> |
| 28 | + <div class="event-overlay"> |
| 29 | + <div class="event-date"> |
21 | 30 | {% if event_date == today %}
|
22 |
| - <span class="label">TODAY</span> |
| 31 | + <span class="today-badge">TODAY</span> |
23 | 32 | {% else %}
|
24 |
| - <span class="label">{{ event.date }}</span> |
| 33 | + {{ event.date | date: "%b %d, %Y" }} |
25 | 34 | {% endif %}
|
26 |
| - {% if event.host != nil and event.host != "" %} |
27 |
| - <span class="label">hosted by {{ event.host }}</span> |
| 35 | + </div> |
| 36 | + {% if event.host != nil and event.host != "" %} |
| 37 | + <div class="event-host">📍 {{ event.host }}</div> |
| 38 | + {% endif %} |
| 39 | + </div> |
| 40 | + </div> |
| 41 | + |
| 42 | + <div class="event-content"> |
| 43 | + <h3 class="event-title"> |
| 44 | + <a href="{{ event.title | datapage_url: 'meetup' | remove: '.html' }}">{{ event.title }}</a> |
| 45 | + </h3> |
| 46 | + |
| 47 | + {% if event.talks %} |
| 48 | + <div class="event-talks"> |
| 49 | + {% for talk in event.talks limit:2 %} |
| 50 | + <div class="talk-item"> |
| 51 | + <div class="talk-title">{{ talk.title }}</div> |
| 52 | + <div class="talk-speaker"> |
| 53 | + <span class="emoji" style="font-style: normal;">👨💻</span> |
| 54 | + <span class="talk-speaker-name">{{ talk.speaker }}</span><br> |
| 55 | + {% if talk.file %} |
| 56 | + <a href="{{ event.title | datapage_url: 'meetup' | remove: '.html' }}"> |
| 57 | + 📎 Get the slides |
| 58 | + </a> |
| 59 | + {% endif %} |
| 60 | + {% if talk.recording %} |
| 61 | + <a href="{{ event.title | datapage_url: 'meetup' | remove: '.html' }}"> |
| 62 | + 📺 Watch the recording |
| 63 | + </a> |
| 64 | + {% endif %} |
| 65 | + </div> |
| 66 | + </div> |
| 67 | + {% endfor %} |
| 68 | + {% if event.talks.size > 2 %} |
| 69 | + <div class="talk-item more-talks"> |
| 70 | + <div class="talk-title">+{{ event.talks.size | minus: 2 }} more talk{% if event.talks.size > 3 %}s{% endif %}</div> |
| 71 | + </div> |
28 | 72 | {% endif %}
|
29 |
| - {% if event.event_link == nil or event.event_link == "" %} |
30 |
| - <span class="label">registration not yet open</span> |
31 |
| - {% endif %} |
32 |
| - <br /> |
33 |
| - <strong><a href="/events/{{ event.title | datapage_url: 'meetup' | remove: '.html' }}">{{ event.title }}</a></strong> |
| 73 | + </div> |
| 74 | + {% endif %} |
| 75 | + |
| 76 | + <div class="event-meta"> |
| 77 | + {% if event.participants != "" %} |
| 78 | + <span class="meta-item"> |
| 79 | + <svg class="icon" viewBox="0 0 20 20" fill="currentColor"> |
| 80 | + <path d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3z"/> |
| 81 | + </svg> |
| 82 | + {{ event.participants }} cloud-natives participated |
| 83 | + </span> |
| 84 | + {% else %} |
| 85 | + <span class="meta-item"> |
| 86 | + <svg class="icon" viewBox="0 0 20 20" fill="currentColor"> |
| 87 | + <path d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/> |
| 88 | + </svg> |
| 89 | + Please don't forget to RSVP :) |
| 90 | + </span> |
| 91 | + {% endif %} |
| 92 | + |
| 93 | + <a class="meta-link" href="{{ event.title | datapage_url: 'meetup' | remove: '.html' }}">Event details</a> |
34 | 94 |
|
| 95 | + {% if event.event_link and event.event_link != "" %} |
| 96 | + <a href="{{ event.event_link }}" class="meta-link" target="_blank" rel="noopener"> |
| 97 | + <svg class="icon" viewBox="0 0 20 20" fill="currentColor"> |
| 98 | + <path fill-rule="evenodd" d="M12.586 4.586a2 2 0 112.828 2.828l-3 3a2 2 0 01-2.828 0 1 1 0 00-1.414 1.414 4 4 0 005.656 0l3-3a4 4 0 00-5.656-5.656l-1.5 1.5a1 1 0 101.414 1.414l1.5-1.5zm-5 5a2 2 0 012.828 0 1 1 0 101.414-1.414 4 4 0 00-5.656 0l-3 3a4 4 0 105.656 5.656l1.5-1.5a1 1 0 10-1.414-1.414l-1.5 1.5a2 2 0 11-2.828-2.828l3-3z" clip-rule="evenodd"/> |
| 99 | + </svg> |
| 100 | + RSVP and join this awesome event! |
| 101 | + </a> |
| 102 | + {% else %} |
| 103 | + <span class="meta-item"> |
| 104 | + <svg class="icon" viewBox="0 0 20 20" fill="currentColor"> |
| 105 | + <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/> |
| 106 | + </svg> |
| 107 | + Registration opening soon |
| 108 | + </span> |
| 109 | + {% endif %} |
| 110 | + </div> |
| 111 | + </div> |
| 112 | + </article> |
| 113 | + {% endif %} |
| 114 | +{% endfor %} |
| 115 | +</div> |
35 | 116 |
|
36 |
| - </td> |
37 |
| - </tr> |
38 |
| - {% endif %} |
39 |
| - {% endfor %} |
40 |
| -</table> |
| 117 | +<script> |
| 118 | +// Add intersection observer for scroll animations (upcoming events) |
| 119 | +if ('IntersectionObserver' in window) { |
| 120 | + const upcomingCards = document.querySelectorAll('.event-card'); |
| 121 | + const upcomingObserver = new IntersectionObserver((entries) => { |
| 122 | + entries.forEach((entry, index) => { |
| 123 | + if (entry.isIntersecting) { |
| 124 | + setTimeout(() => { |
| 125 | + entry.target.style.opacity = '1'; |
| 126 | + entry.target.style.transform = 'translateY(0)'; |
| 127 | + }, index * 100); |
| 128 | + upcomingObserver.unobserve(entry.target); |
| 129 | + } |
| 130 | + }); |
| 131 | + }, { |
| 132 | + threshold: 0.1, |
| 133 | + rootMargin: '50px' |
| 134 | + }); |
| 135 | + |
| 136 | + upcomingCards.forEach((card) => { |
| 137 | + if (!card.style.opacity) { // Only apply if not already set by past events script |
| 138 | + card.style.opacity = '0'; |
| 139 | + card.style.transform = 'translateY(30px)'; |
| 140 | + card.style.transition = 'opacity 0.6s ease, transform 0.6s ease'; |
| 141 | + upcomingObserver.observe(card); |
| 142 | + } |
| 143 | + }); |
| 144 | +} |
| 145 | +</script> |
41 | 146 | {% endif %}
|
0 commit comments