From 43cd597f9944548ba2913d5046f8f78581af1dcd Mon Sep 17 00:00:00 2001 From: L3D Date: Sun, 5 Sep 2021 03:09:52 +0200 Subject: [PATCH] Update terminkalender --- templates/blocks/flow_calendar.html | 101 ++++++++++++++-------------- 1 file changed, 50 insertions(+), 51 deletions(-) diff --git a/templates/blocks/flow_calendar.html b/templates/blocks/flow_calendar.html index 8727cfd..31ba33c 100644 --- a/templates/blocks/flow_calendar.html +++ b/templates/blocks/flow_calendar.html @@ -1,52 +1,51 @@ {#- HTML Calender Renderer for Startpage -#} - {{- '\n ' -}} - - - - - - - - - - - {%- 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 ' -}} - {{- '\n ' -}} - {{- '\n ' -}} - {{- '\n ' -}} - {{- '\n ' -}} - {%- endif -%} - {%- endfor -%} - {%- endif -%} - {%- if counter|length < 2 %} - {{- '\n ' -}} - {{- '\n ' -}} - {{- '\n ' -}} - {{- '\n ' -}} - {{- '\n ' -}} - {%- endif -%} - {%- endfor %} - {{- '\n ' -}} - {{- '\n ' -}}
DatumVeranstaltungOrt
- {%- 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 ' -}} - {{- '\n ' -}} - {{- blk.event -}} - - {{- '\n ' -}} {{ blk.ort }}
Leider derzeitnoch keine neuen Terminegeplant!
- {{- '\n ' -}}
+ {{- '\n ' -}} + {%- 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 ' -}} + {{- '\n ' -}} + {{- '\n ' -}} + {{- '\n ' -}} + {{- '\n ' -}} + {{- '\n ' -}} + {{- '\n ' -}} + {{- '\n ' -}} + {{- '\n ' -}} + {%- endif -%} + {%- if counter.append('1') -%} + {#- Counter zum zaehlen ob es mehr wie 1 Temrin gibt -#} + {%- endif -%} + {{- '\n ' -}} + {{- '\n ' -}} + {{- '\n ' -}} + {{- '\n ' -}} + {{- '\n ' -}} + {%- endif -%} + {%- endfor -%} + {%- endif -%} + {%- if counter|length < 2 and loop.index == 1 %} + {{- '\n ' -}}

Leider derzeit noch keine neuen Termine geplant!

+ {%- endif -%} + {%- endfor %} + {%- if counter|length > 1 -%} + {{- '\n ' -}} + {{- '\n ' -}}
DatumVeranstaltungOrt
+ {%- 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 ' -}} + {{- '\n ' -}} + {{- blk.event -}} + + {{- '\n ' -}} {{ blk.ort }}
+ {{- '\n ' -}}
+ {%- endif -%}