Update terminkalender

This commit is contained in:
L3D 2021-09-05 03:09:52 +02:00
parent e45b6a8e73
commit 43cd597f99
Signed by: l3d
GPG key ID: CD08445BFF4313D1

View file

@ -1,52 +1,51 @@
{#- 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/>
{{- '\n ' -}} <!-- Flow Calendar -->
{%- 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 loop.index == 1 -%}
{{- '\n ' -}} <table class="template">
{{- '\n ' -}} <thead>
{{- '\n ' -}} <tr>
{{- '\n ' -}} <th>Datum</th>
{{- '\n ' -}} <th>Veranstaltung</th>
{{- '\n ' -}} <th>Ort</th>
{{- '\n ' -}} </tr>
{{- '\n ' -}} </thead>
{{- '\n ' -}} <tbody>
{%- endif -%}
{%- 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 and loop.index == 1 %}
{{- '\n ' -}} <p><i>Leider derzeit noch keine neuen Termine geplant!</i></p>
{%- endif -%}
{%- endfor %}
{%- if counter|length > 1 -%}
{{- '\n ' -}} </tbody>
{{- '\n ' -}}</table>
{{- '\n ' -}}<br/>
{%- endif -%}