diff --git a/templates/blocks/flow_calendar.html b/templates/blocks/flow_calendar.html index 31ba33c..5bfb4f8 100644 --- a/templates/blocks/flow_calendar.html +++ b/templates/blocks/flow_calendar.html @@ -1,27 +1,26 @@ {#- 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) -%} + {%- for blk in page.dates.blocks|sort(attribute='ende', 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 ' -}} + {%- if counter == ['1'] -%} +
DatumVeranstaltungOrt
+ + + + + + + + {%- endif -%} - {%- if counter.append('1') -%} + {%- if counter.append('X') -%} {#- Counter zum zaehlen ob es mehr wie 1 Temrin gibt -#} {%- endif -%} - {{- '\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 @@ -40,7 +39,7 @@ {%- endif -%} {%- endfor -%} {%- endif -%} - {%- if counter|length < 2 and loop.index == 1 %} + {%- if counter|length < 1 and loop.index == 1 %} {{- '\n ' -}}

Leider derzeit noch keine neuen Termine geplant!

{%- endif -%} {%- endfor %}