Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions config.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Activate and configure extensions
# https://middlemanapp.com/advanced/configuration/#configuring-extensions
ENV['TZ'] = 'UTC'

activate :autoprefixer do |prefix|
prefix.browsers = "last 2 versions"
Expand Down Expand Up @@ -35,9 +36,9 @@
# https://middlemanapp.com/basics/helper-methods/

helpers do
def group_by_month(articles)
articles.group_by do |article|
article.data.date.strftime('%B %Y')
def group_by_month(collection)
collection.values.sort_by { |item| item.date }.group_by do |item|
item.date.strftime('%B %Y')
end
end
end
Expand Down
12 changes: 12 additions & 0 deletions data/events/cryptobeers-in-leuven-coop-wereldcafe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: CryptoBeers in Leuven @ COOP Wereldcafé
image: /images/20171123_212403.jpg
location: COOP Wereldcafé
date: 2017-11-30T19:30:28+01:00
possible_by: Cryptominded.com
organised_by: Bouke
meetup-link: >-
https://www.meetup.com/The-Cryptominded-Meetup-Belgium-Edition/events/245462570/
City: 'Leuven, BE'
---
Let’s drink a beer and chat cryptocurrencies over at COOP Wereldcafé in the city center of Leuven. Bring a friend and have a good evening!
12 changes: 12 additions & 0 deletions data/events/cryptobeers-in-london.html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: CryptoBeers in London
image: /images/heidi-sandstrom-187259.jpg
location: To be confirmed
date: 2017-12-14T18:30:28+01:00
possible_by: Cryptominded
organised_by: Barry Leybovich
meetup-link: >-
https://www.meetup.com/The-Cryptominded-Meetup-London-Edition/events/244863174/
City: 'London, UK'
---
Whether you're a seasoned crypto-expert or just a beginner, come and have a chat with like-minded enthusiasts and meet some of the Cryptominded team as well!
33 changes: 16 additions & 17 deletions source/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,26 @@ title: Cryptobeers -- by Cryptominded
</div>

<div class="events">
<% group_by_month(page_articles.reverse).each do |month, articles| %>
<% group_by_month(data.events).each do |month, events| %>

<div class="ta-center months">
<h4 class="fw-semibold"><%= month %></h4>
</div>

<% articles.each do |article| %>
<h4 class="fw-semibold"><%= month %></h4>
</div>

<% events.each do |event| %>
<div class="events__card">
<div class="image">
<a href="<%= article.data.meetup_link %>">
<img src="<%= article.data.image %>" width="320" height="220">
<div class="overlay"><button class="btn--secondary">RSVP</button></div>
</a>
</div>
<div class="details">
<span class="date"><%= article.date.strftime('%A, %e %B %Y') %></span> • <span class="city"><%= article.data.City %></span>
<a href="<%= article.data.meetup_link %>"><h4><%= article.title %></h4></a>
<%= article.body %>
<span class="organisor"><strong>Organised by:</strong> <%= article.data.organised_by %></span>
<span class="sponsor"><strong>Made possible by:</strong> <%= article.data.possible_by %></span>
<div class="image">
<a href="<%= event.meetup_link %>">
<img src="<%= event.image %>" width="320" height="220">
<div class="overlay"><button class="btn--secondary">RSVP</button></div>
</a>
</div>
<div class="details">
<span class="date"><%= event.date.strftime('%A, %e %B %Y') %></span> • <span class="city"><%= event.City %></span>
<a href="<%= event.meetup_link %>"><h4><%= event.title %></h4></a>
<div><%= event.postscript %></div>
<span class="organisor"><strong>Organised by:</strong> <%= event.organised_by %></span>
<span class="sponsor"><strong>Made possible by:</strong> <%= event.possible_by %></span>
</div>
</div>

Expand Down