Commit afd72bc9 authored by betz's avatar betz

events shortcode

parent 21c41ce4
Pipeline #36118953 passed with stages
in 19 seconds
......@@ -2,3 +2,11 @@
title: "Events"
linktitle: "Events"
---
{{ .Page.CurrentSection }}
## Upcoming events
{{< events when="upcoming" series="all" >}}
## Past events
{{< events when="past" series="all" >}}
\ No newline at end of file
......@@ -2,6 +2,7 @@
startdate: 2018-11-19
starttime: "14h"
type: events
eventtype: "Workshop"
title: "PANPANPAN: V-2 Install PartyI"
......@@ -10,6 +11,7 @@ image: "Studioonboard.jpg"
location: "HSBXL"
price: "free contribution / hardware mim 65"
series: panpanpan
---
The PiBox is a modular system of radio/streaming broadcast, composed of multiplers inputs and outputs. The box provides a multi-functional and easy-to-use micro-fm streaming station. The PiBox has been developed within the collective ∏-node.org. The system isbased on open source software / open hardware.
......
---
title: "Panpanpan"
linktitle: "Panpanpan"
---
Some intro about Panpanpan...
## Upcoming panpanpan
{{< events when="upcoming" series="panpanpan" >}}
## Pastpanpanpan
{{< events when="past" series="panpanpan" >}}
\ No newline at end of file
{{ partial "top.html" . }}
<h1>Agenda</h1>
<h1>{{ .Title }}</h1>
<article>
{{ if isset .Params "image"}}
<img src="{{ .Site.BaseURL }}images/{{ .Params.image }}">
{{ end }}
{{ .Params.series }}
<h2>Upcoming events</h2>
<ul>
{{ range $.Site.RegularPages.ByParam "startdate" }}
{{ if or (eq .Type "events") (eq .Type "techtuesday") }}
{{ if ge .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 }}
</ul>
<h2>Past events</h2>
<ul>
{{ range $.Site.RegularPages.ByParam "startdate" }}
{{ if or (eq .Type "events") (eq .Type "techtuesday") }}
{{ 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 }}
</ul>
{{ .Content }}
</article>
{{ .Content }}
{{ if .IsPage }}
[<a href="{{ .Site.Params.giteditpath }}/{{ .File.Path }}">Edit this page</a>]
......
......@@ -24,10 +24,11 @@
<ul>
{{ range $.Site.RegularPages.ByParam "startdate" }}
{{ if eq .Type "events" }}
{{ if ge .Params.startdate (now.Format "2006-01-02") }}
{{ if isset .Params "startdate" }}
{{ if ge .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 }}
</ul>
......
{{ $when := .Get "when"}}
{{ $series := .Get "series"}}
{{ if or (eq $when "upcoming") }}
<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 ge .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 ge .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 }}
</ul>
</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 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 }}
</ul>
</div>
{{ end }}
\ No newline at end of file
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