redesign website #1
1 changed files with 15 additions and 16 deletions
|
@ -1,27 +1,26 @@
|
|||
{#- HTML Calender Renderer for Startpage -#}
|
||||
{{- '\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) -%}
|
||||
{%- 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 ' -}} <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>
|
||||
{%- if counter == ['1'] -%}
|
||||
<table class="template">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Datum</th>
|
||||
<th>Veranstaltung</th>
|
||||
<th>Ort</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{%- endif -%}
|
||||
{%- if counter.append('1') -%}
|
||||
{%- if counter.append('X') -%}
|
||||
{#- Counter zum zaehlen ob es mehr wie 1 Temrin gibt -#}
|
||||
{%- endif -%}
|
||||
{{- '\n ' -}} <tr>
|
||||
{{- '\n ' -}} <th>
|
||||
<tr>
|
||||
<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
|
||||
|
@ -40,7 +39,7 @@
|
|||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- if counter|length < 2 and loop.index == 1 %}
|
||||
{%- if counter|length < 1 and loop.index == 1 %}
|
||||
{{- '\n ' -}} <p><i>Leider derzeit noch keine neuen Termine geplant!</i></p>
|
||||
{%- endif -%}
|
||||
{%- endfor %}
|
||||
|
|
Loading…
Reference in a new issue