FEAT: Update schedule publication mechanics

This commit is contained in:
Raoul 2018-04-29 20:01:45 +02:00
parent c3a3fc53ba
commit 6382fdcc17
No known key found for this signature in database
GPG key ID: C7493D73B67C1842
14 changed files with 67 additions and 13 deletions

View file

@ -9,8 +9,7 @@ menu:
## Fahrplan {{< cosin "date_year" >}} ## Fahrplan {{< cosin "date_year" >}}
Der Fahrplan für die diesjährige CoSin erscheint Anfang Juni. {{< schedule >}}
## Ältere Fahrpläne ## Ältere Fahrpläne

View file

@ -9,8 +9,7 @@ menu:
## Schedule {{< cosin "date_year" >}} ## Schedule {{< cosin "date_year" >}}
Schedule of this year's CoSin will be online in early June. {{< schedule >}}
## Older schedules ## Older schedules

View file

@ -9,8 +9,7 @@ menu:
## Programme {{< cosin "date_year" >}} ## Programme {{< cosin "date_year" >}}
Der Fahrplan für die diesjährige CoSin erscheint Anfang Juni. {{< schedule >}}
## Anciens programmes ## Anciens programmes

View file

@ -9,8 +9,7 @@ menu:
## Tabella di marcia {{< cosin "date_year" >}} ## Tabella di marcia {{< cosin "date_year" >}}
Der Fahrplan für die diesjährige CoSin erscheint Anfang Juni. {{< schedule >}}
## Tabelle di marcia precedenti ## Tabelle di marcia precedenti

View file

@ -36,7 +36,8 @@ cfp_url = "https://frab.ccczh.ch/en/cosin/cfp/session/new"
schedule_available = true schedule_available = true
schedule_urls = [ schedule_main_url = "https://www.cosin.ch/fahrplan/2017/index.html"
schedule_day_urls = [
"https://www.cosin.ch/fahrplan/2017/schedule/1.html", "https://www.cosin.ch/fahrplan/2017/schedule/1.html",
"https://www.cosin.ch/fahrplan/2017/schedule/2.html", "https://www.cosin.ch/fahrplan/2017/schedule/2.html",
"https://www.cosin.ch/fahrplan/2017/schedule/3.html"] "https://www.cosin.ch/fahrplan/2017/schedule/3.html"]

View file

@ -0,0 +1,9 @@
{{ if eq .Site.Language.Lang "de" }}
{{ partial "fahrplan.de.html" . }}
{{ else if eq .Site.Language.Lang "fr" }}
{{ partial "fahrplan.fr.html" . }}
{{ else if eq .Site.Language.Lang "it" }}
{{ partial "fahrplan.it.html" . }}
{{ else if eq .Site.Language.Lang "en" }}
{{ partial "fahrplan.en.html" . }}
{{ end }}

View file

@ -0,0 +1,12 @@
{{ if .Site.Data.cosin.schedule_available }}
<p>
Der Fahrplan für die diesjährige CoSin ist da!
</p>
<ul>
<li><a href="{{ .Site.Data.cosin.date_year | safeURL }}">CoSin {{ .Site.Data.cosin.date_year }}</a></li>
</ul>
{{ else }}
<p>
Der Fahrplan für die diesjährige CoSin erscheint Anfang Juni.
</p>
{{ end}}

View file

@ -0,0 +1,12 @@
{{ if .Site.Data.cosin.schedule_available }}
<p>
Schedule of this year's CoSin is ready!
</p>
<ul>
<li><a href="{{ .Site.Data.cosin.date_year | safeURL }}">CoSin {{ .Site.Data.cosin.date_year }}</a></li>
</ul>
{{ else }}
<p>
Schedule of this year's CoSin will be online in early June.
</p>
{{ end}}

View file

@ -0,0 +1,12 @@
{{ if .Site.Data.cosin.schedule_available }}
<p>
Der Fahrplan für die diesjährige CoSin ist da!
</p>
<ul>
<li><a href="{{ .Site.Data.cosin.date_year | safeURL }}">CoSin {{ .Site.Data.cosin.date_year }}</a></li>
</ul>
{{ else }}
<p>
Der Fahrplan für die diesjährige CoSin erscheint Anfang Juni.
</p>
{{ end}}

View file

@ -0,0 +1,12 @@
{{ if .Site.Data.cosin.schedule_available }}
<p>
Der Fahrplan für die diesjährige CoSin ist da!
</p>
<ul>
<li><a href="{{ .Site.Data.cosin.date_year | safeURL }}">CoSin {{ .Site.Data.cosin.date_year }}</a></li>
</ul>
{{ else }}
<p>
Der Fahrplan für die diesjährige CoSin erscheint Anfang Juni.
</p>
{{ end}}

View file

@ -41,7 +41,7 @@
{{ if .schedule_available }} {{ if .schedule_available }}
<p><strong>Fahrplan:</strong></p> <p><strong>Fahrplan:</strong></p>
<ul> <ul>
{{ range $index, $element := .schedule_urls }} {{ range $index, $element := .schedule_day_urls }}
<li><a href="{{ $element | safeURL }}">Tag {{ add $index 1 }}</a></li> <li><a href="{{ $element | safeURL }}">Tag {{ add $index 1 }}</a></li>
{{ end }} {{ end }}
</ul> </ul>

View file

@ -41,7 +41,7 @@
{{ if .schedule_available }} {{ if .schedule_available }}
<p><strong>Schedule:</strong></p> <p><strong>Schedule:</strong></p>
<ul> <ul>
{{ range $index, $element := .schedule_urls }} {{ range $index, $element := .schedule_day_urls }}
<li><a href="{{ $element | safeURL }}">Day {{ add $index 1 }}</a></li> <li><a href="{{ $element | safeURL }}">Day {{ add $index 1 }}</a></li>
{{ end }} {{ end }}
</ul> </ul>

View file

@ -41,7 +41,7 @@
{{ if .schedule_available }} {{ if .schedule_available }}
<p><strong>Programme:</strong></p> <p><strong>Programme:</strong></p>
<ul> <ul>
{{ range $index, $element := .schedule_urls }} {{ range $index, $element := .schedule_day_urls }}
<li><a href="{{ $element | safeURL }}">Jour {{ add $index 1 }}</a></li> <li><a href="{{ $element | safeURL }}">Jour {{ add $index 1 }}</a></li>
{{ end }} {{ end }}
</ul> </ul>

View file

@ -41,7 +41,7 @@
{{ if .schedule_available }} {{ if .schedule_available }}
<p><strong>Tabella di marcia:</strong></p> <p><strong>Tabella di marcia:</strong></p>
<ul> <ul>
{{ range $index, $element := .schedule_urls }} {{ range $index, $element := .schedule_day_urls }}
<li><a href="{{ $element | safeURL }}">Giorno {{ add $index 1 }}</a></li> <li><a href="{{ $element | safeURL }}">Giorno {{ add $index 1 }}</a></li>
{{ end }} {{ end }}
</ul> </ul>