52 lines
3 KiB
HTML
52 lines
3 KiB
HTML
{#- HTML Calender Renderer for Startpage -#}
|
|
{{- '\n ' -}}
|
|
<!-- Flow Calendar -->
|
|
<table class="template">
|
|
<thead>
|
|
<tr>
|
|
<th>Datum</th>
|
|
<th>Veranstaltung</th>
|
|
<th>Ort</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{%- set pages = site.query('/').include_undiscoverable(true).all() -%}
|
|
{%- set counter = ['1'] -%}
|
|
{%- for page in pages -%}
|
|
{%- if page._path == this.calendar_name -%}
|
|
{%- for blk in page.dates.blocks|sort(attribute='start', reverse = False) -%}
|
|
{%- if blk.start.strftime('%Y%m%d%H%M') > none|datetimeformat('yyyyMMddhhmm') -%}
|
|
{%- if counter.append('1') -%}
|
|
{#- Counter zum zaehlen ob es mehr wie 1 Temrin gibt -#}
|
|
{%- endif -%}
|
|
{{- '\n ' -}} <tr>
|
|
{{- '\n ' -}} <th>
|
|
{%- if blk.start.strftime('%d.%m') == blk.ende.strftime('%d.%m') -%}
|
|
{{- '\n ' -}}
|
|
{{ blk.start.strftime('%d.%m.%y %H') }} - {{ blk.ende.strftime('%H') }} Uhr
|
|
{%- else -%}
|
|
{{- '\n ' -}}
|
|
{{ blk.start.strftime('%d.%m') }} - {{ blk.ende.strftime('%d.%m.%Y') }}
|
|
{%- endif -%}
|
|
{{- '\n ' -}} </th>
|
|
{{- '\n ' -}} <th>
|
|
{{- '\n ' -}} <a href="{{ blk.url }}" title="{{ blk.description|replace("|", " ") }}">
|
|
{{- blk.event -}}
|
|
</a>
|
|
{{- '\n ' -}} </th>
|
|
{{- '\n ' -}} <th>{{ blk.ort }}</th>
|
|
{{- '\n ' -}} </tr>
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
{%- endif -%}
|
|
{%- if counter|length < 2 %}
|
|
{{- '\n ' -}} <tr>
|
|
{{- '\n ' -}} <th>Leider derzeit</th>
|
|
{{- '\n ' -}} <th>noch keine neuen Termine</th>
|
|
{{- '\n ' -}} <th>geplant!</th>
|
|
{{- '\n ' -}} </tr>
|
|
{%- endif -%}
|
|
{%- endfor %}
|
|
{{- '\n ' -}} </tbody>
|
|
{{- '\n ' -}}</table>
|
|
{{- '\n ' -}}<br/>
|