Commit bcd19e20 authored by betz's avatar betz

series shortcode, dont show startpages on event shortcode

parent 1ee38f72
Pipeline #41245652 passed with stages
in 1 minute and 21 seconds
......@@ -7,12 +7,13 @@ price: "Free"
series: "byteweek"
---
8 days before Fosdem conference, HSBXL compiles ByteWeek.
Eight ‘Bitdays’ of hackatons, workshops and talks.
We end the octaweek with the notorious Bytenight!
The week before Fosdem conference, HSBXL compiles ByteWeek.
Eight 'Bitdays' of hackatons, workshops and talks.
We end our week with the notorious [Bytenight](/bytenight)!
## Upcoming Byteweek
{{< events when="upcoming" series="byteweek2019" >}}
{{< series when="upcoming" series="byteweek2019" >}}
## Past Byteweeks
{{< events when="past" series="byteweek2019" >}}
\ No newline at end of file
{{< series when="past" series="byteweek2019" >}}
\ No newline at end of file
{{ $when := .Get "when"}}
{{ $series := .Get "series"}}
{{ $startpage := .Get "startpage"}}
{{ $t := (time $when) }}
{{ if eq $when "" }}
......@@ -8,8 +9,10 @@
{{ range $.Site.RegularPages.ByParam "startdate" }}
{{ if or (eq .Type "events") (eq .Type "techtuesday") }}
{{ if ne $series "all" }}
{{ if eq .Params.series $series}}
<li><a href="{{ .Permalink }}">{{ .Params.startdate | dateFormat "Mon 02 Jan 2006"}}{{ if and (isset .Params "enddate") (ne .Params.startdate .Params.enddate ) }} till {{ .Params.enddate | dateFormat "Mon 2 Jan 2006"}}{{ end }}: {{ .Params.linktitle }}</a></li>
{{ if ne .Params.start "true"}}
{{ if eq .Params.series $series}}
<li><a href="{{ .Permalink }}">{{ .Params.startdate | dateFormat "Mon 02 Jan 2006"}}{{ if and (isset .Params "enddate") (ne .Params.startdate .Params.enddate ) }} till {{ .Params.enddate | dateFormat "Mon 2 Jan 2006"}}{{ end }}: {{ .Params.linktitle }}</a></li>
{{ end }}
{{ end }}
{{ else }}
<li><a href="{{ .Permalink }}">{{ .Params.startdate | dateFormat "Mon 02 Jan 2006"}}{{ if and (isset .Params "enddate") (ne .Params.startdate .Params.enddate ) }} till {{ .Params.enddate | dateFormat "Mon 2 Jan 2006"}}{{ end }}: {{ .Params.linktitle }}</a></li>
......@@ -25,9 +28,11 @@
{{ 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 02 Jan 2006"}}{{ if and (isset .Params "enddate") (ne .Params.startdate .Params.enddate ) }} till {{ .Params.enddate | dateFormat "Mon 2 Jan 2006"}}{{ end }}: {{ .Params.linktitle }}</a></li>
{{ if ne .Params.start "true"}}
{{ if isset .Params "startdate" }}
{{ if ge .Params.startdate (now.Format "2006-01-02") }}
<li><a href="{{ .Permalink }}">{{ .Params.startdate | dateFormat "Mon 02 Jan 2006"}}{{ if and (isset .Params "enddate") (ne .Params.startdate .Params.enddate ) }} till {{ .Params.enddate | dateFormat "Mon 2 Jan 2006"}}{{ end }}: {{ .Params.linktitle }}</a></li>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
......@@ -37,7 +42,6 @@
<li><a href="{{ .Permalink }}">{{ .Params.startdate | dateFormat "Mon 02 Jan 2006"}}{{ if and (isset .Params "enddate") (ne .Params.startdate .Params.enddate ) }} till {{ .Params.enddate | dateFormat "Mon 2 Jan 2006"}}{{ end }}: {{ .Params.linktitle }}</a></li>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
......@@ -54,9 +58,11 @@
{{ if ne $series "all" }}
{{ if eq .Params.series $series}}
{{ if isset .Params "startdate" }}
{{ if lt .Params.startdate (now.Format "2006-01-02") }}
<li><a href="{{ .Permalink }}">{{ .Params.startdate | dateFormat "Mon 02 Jan 2006"}}{{ if and (isset .Params "enddate") (ne .Params.startdate .Params.enddate ) }} till {{ .Params.enddate | dateFormat "Mon 2 Jan 2006"}}{{ end }}: {{ .Params.linktitle }}</a></li>
{{ if ne .Params.start "true"}}
{{ if isset .Params "startdate" }}
{{ if lt .Params.startdate (now.Format "2006-01-02") }}
<li><a href="{{ .Permalink }}">{{ .Params.startdate | dateFormat "Mon 02 Jan 2006"}}{{ if and (isset .Params "enddate") (ne .Params.startdate .Params.enddate ) }} till {{ .Params.enddate | dateFormat "Mon 2 Jan 2006"}}{{ end }}: {{ .Params.linktitle }}</a></li>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
......@@ -85,9 +91,11 @@
{{ if ne $series "all" }}
{{ if eq .Params.series $series}}
{{ if isset .Params "startdate" }}
{{ if and ( ge $when .Params.startdate) (le $when .Params.enddate) (ne .Params.start "true") }}
<li><a href="{{ .Permalink }}">{{ .Params.linktitle }}</a></li>
{{ if ne .Params.start "true"}}
{{ if isset .Params "startdate" }}
{{ if and ( ge $when .Params.startdate) (le $when .Params.enddate) (ne .Params.start "true") }}
<li><a href="{{ .Permalink }}">{{ .Params.linktitle }}</a></li>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
......
{{ $when := .Get "when"}}
{{ $series := .Get "series"}}
{{ if 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 eq .Params.start "true"}}
{{ if isset .Params "startdate" }}
{{ if ge .Params.startdate (now.Format "2006-01-02") }}
<li><a href="{{ .Permalink }}">{{ .Params.startdate | dateFormat "Mon 02 Jan 2006"}}{{ if and (isset .Params "enddate") (ne .Params.startdate .Params.enddate ) }} till {{ .Params.enddate | dateFormat "Mon 2 Jan 2006"}}{{ end }}: {{ .Params.linktitle }}</a></li>
{{ end }}
{{ 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 02 Jan 2006"}}{{ if and (isset .Params "enddate") (ne .Params.startdate .Params.enddate ) }} till {{ .Params.enddate | dateFormat "Mon 2 Jan 2006"}}{{ end }}: {{ .Params.linktitle }}</a></li>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
</ul>
</div>
{{ else if 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 eq .Params.start "true"}}
{{ if isset .Params "startdate" }}
{{ if lt .Params.startdate (now.Format "2006-01-02") }}
<li><a href="{{ .Permalink }}">{{ .Params.startdate | dateFormat "Mon 02 Jan 2006"}}{{ if and (isset .Params "enddate") (ne .Params.startdate .Params.enddate ) }} till {{ .Params.enddate | dateFormat "Mon 2 Jan 2006"}}{{ end }}: {{ .Params.linktitle }}</a></li>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ else }}
{{ if isset .Params "startdate" }}
{{ if lt .Params.startdate (now.Format "2006-01-02") }}
<li><a href="{{ .Permalink }}">{{ .Params.startdate | dateFormat "Mon 02 Jan 2006"}}{{ if and (isset .Params "enddate") (ne .Params.startdate .Params.enddate ) }} till {{ .Params.enddate | dateFormat "Mon 2 Jan 2006"}}{{ end }}: {{ .Params.linktitle }}</a></li>
{{ end }}
{{ 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