Skip to content

Commit 3fce6bd

Browse files
authored
Merge pull request #147 from CloudNativeLinz/fix/remove-doors-open-past-event
remove "doors open" from past events
2 parents 6c49ede + d432b0e commit 3fce6bd

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

Gemfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@ gem "jekyll-datapage-generator"
1212
gem "sassc", "~> 2.4"
1313
gem "jekyll-sass-converter", "~> 2.2"
1414

15+
# Required standard library gems for Ruby 3.4+
16+
gem "bigdecimal"
17+
1518
# Platform-specific gems for better compatibility
16-
gem "ffi", "~> 1.17", platforms: [:mingw, :x64_mingw, :mswin]
19+
gem "ffi", "~> 1.17"

Gemfile.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ GEM
44
addressable (2.8.7)
55
public_suffix (>= 2.0.2, < 7.0)
66
base64 (0.3.0)
7+
bigdecimal (4.0.1)
78
colorator (1.1.0)
89
concurrent-ruby (1.3.5)
910
csv (3.3.5)
@@ -12,6 +13,7 @@ GEM
1213
http_parser.rb (~> 0)
1314
eventmachine (1.2.7)
1415
ffi (1.17.2-x86_64-linux-gnu)
16+
ffi (1.17.2-x86_64-linux-musl)
1517
forwardable-extended (2.6.0)
1618
http_parser.rb (0.8.0)
1719
i18n (1.14.7)
@@ -76,8 +78,10 @@ GEM
7678

7779
PLATFORMS
7880
x86_64-linux
81+
x86_64-linux-musl
7982

8083
DEPENDENCIES
84+
bigdecimal
8185
ffi (~> 1.17)
8286
jekyll (~> 4.4)
8387
jekyll-datapage-generator

_layouts/event.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@
243243
<div class="event-detail-overlay">
244244
<div class="event-detail-date">
245245
{% if event_date == today %}
246-
🔥 TODAY - {{ page.date | date: "%B %d, %Y" }} - doors open at {{ page.doors_open }}
246+
🔥 TODAY - {{ page.date | date: "%B %d, %Y" }}{% if page.doors_open and page.doors_open != "" %} - doors open at {{ page.doors_open }}{% endif %}
247247
{% else %}
248-
📅 {{ page.date | date: "%B %d, %Y" }} - doors open at {{ page.doors_open }}
248+
📅 {{ page.date | date: "%B %d, %Y" }}{% if event_date >= today and page.doors_open and page.doors_open != "" %} - doors open at {{ page.doors_open }}{% endif %}
249249
{% endif %}
250250
</div>
251251
{% if page.host and page.host != "" %}
@@ -278,7 +278,7 @@ <h1 class="event-detail-title">{{ page.title }}</h1>
278278
<span class="meta-badge success">👥 {{ page.participants }} Participants</span>
279279
{% endif %}
280280
<span class="meta-badge">📅 {{ page.date | date: "%a, %B %d, %Y" }}</span>
281-
{% if page.doors_open and page.doors_open != "" %}
281+
{% if event_date >= today and page.doors_open and page.doors_open != "" %}
282282
<span class="meta-badge">🕒 Doors open at {{ page.doors_open }}</span>
283283
{% endif %}
284284
<span class="meta-badge">📍 Hosted by {{ page.host }}</span>

0 commit comments

Comments
 (0)