Commit d4523deb authored by betz's avatar betz

events shortcode

parent afd72bc9
Pipeline #36119291 passed with stages
in 30 seconds
......@@ -3,8 +3,6 @@ title: "Events"
linktitle: "Events"
---
{{ .Page.CurrentSection }}
## Upcoming events
{{< events when="upcoming" series="all" >}}
......
......@@ -9,5 +9,5 @@ Some intro about Panpanpan...
## Upcoming panpanpan
{{< events when="upcoming" series="panpanpan" >}}
## Pastpanpanpan
## Past panpanpan
{{< events when="past" series="panpanpan" >}}
\ No newline at end of file
......@@ -33,17 +33,29 @@
</div>
{{ end }}
{{ if or (eq $when "past") }}
<div class="events">
<ul>
{{ range $.Site.RegularPages.ByParam "startdate" }}
{{ if or (eq .Type "events") (eq .Type "techtuesday") }}
{{ if ne $series "all" }}
{{ if eq .Params.series $series}}
{{ if isset .Params "startdate" }}
{{ if le .Params.startdate (now.Format "2006-01-02") }}
<li><a href="{{ .Permalink }}">{{ .Params.startdate | dateFormat "Mon 2 Jan 2006"}}: {{ .Params.linktitle }}</a></li>
{{ end }}
{{ end }}
{{ end }}
{{ else }}
{{ if isset .Params "startdate" }}
{{ if le .Params.startdate (now.Format "2006-01-02") }}
<li><a href="{{ .Permalink }}">{{ .Params.startdate | dateFormat "Mon 2 Jan 2006"}}: {{ .Params.linktitle }}</a></li>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment