Skip to content

Commit ce88402

Browse files
Josh SagerGitHub Enterprise
authored andcommitted
Merge pull request linode#30 from abailly/DLC-10
DLC-10 - Events fixes
2 parents 0a3cbbd + b73c30a commit ce88402

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

content/events/2018/08-25.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: "FOSSCON"
33
date: "2018-08-16T11:02:00-04:00"
44
start_date: "2018-08-25T11:02:00-04:00"
5+
end_date: "2018-08-25T11:02:00-04:00"
56
description: "FOSSCON"
67
location: "Philadelphia, PA"
78
event_url: "https://fosscon.us/"

content/events/2018/10-05.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
title: "Asbury Agile"
3-
date: "2018-10-05T11:02:00-04:00"
3+
date: "2018-08-28T11:02:00-04:00"
44
start_date: "2018-10-05T11:02:00-04:00"
5+
end_date: "2018-10-05T11:02:00-04:00"
56
description: "Asbury Agile"
67
location: "Asbury Park, NJ"
78
event_url: "http://www.asburyagile.com/"

themes/dlc/layouts/index.html

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,23 @@ <h2 class="mt-0 font-normal"><a href="https://www.linode.com/community/" target=
4444
<h2>Events</h2>
4545
<div class="text-2xl my-3">Catch us on the road at conferences, meetups, and job fairs</div>
4646
</div>
47-
<div class="flex flex-wrap my-8 -mx-4 pb-8">
48-
{{ range first 3 ((where .Pages "Section" "events").ByParam "start_date") }}
49-
<article class="w-full md:w-1/3 px-4 mb-4 md:mb-8">
50-
<div class="p-8 h-full bg-d-cell tile-border">
51-
<header>
52-
<h3 class="mt-0 mb-4"><a href="{{ .Params.event_url }}" class="text-black tile-link" target="_blank">{{ .Title | markdownify }}</a></h3>
53-
</header>
54-
<section>
55-
<div><strong>{{ .Params.location }}</strong></div>
56-
<div><strong>{{ dateFormat "Jan 2, 2006" .Params.start_date }}</strong></div>
57-
<p>{{ .Content }}</p>
58-
</section>
59-
</div>
60-
</article>
47+
<div class="flex flex-wrap my-8 -mx-4 pb-8 justify-center">
48+
{{ range last 3 ((where .Pages "Section" "events").ByParam "start_date") }}
49+
{{ $t := (time .Params.end_date) }}
50+
{{ if ge ($t.Unix) (now.Unix) }}
51+
<article class="w-full md:w-1/3 px-4 mb-4 md:mb-8">
52+
<div class="p-8 h-full bg-d-cell tile-border">
53+
<header>
54+
<h3 class="mt-0 mb-4"><a href="{{ .Params.event_url }}" class="text-black tile-link" target="_blank">{{ .Title | markdownify }}</a></h3>
55+
</header>
56+
<section>
57+
<div><strong>{{ .Params.location }}</strong></div>
58+
<div><strong>{{ dateFormat "Jan 2, 2006" .Params.start_date }}</strong></div>
59+
<p>{{ .Content }}</p>
60+
</section>
61+
</div>
62+
</article>
63+
{{ end }}
6164
{{ end }}
6265
</div>
6366

0 commit comments

Comments
 (0)