From d2108b2078d33a187c075a661456b946ad33ce06 Mon Sep 17 00:00:00 2001 From: L3D Date: Sun, 25 Jun 2023 22:54:42 +0200 Subject: [PATCH] update kalendar --- Makefile | 1 - content/waffeln.ics/contents.lr | 2 +- templates/blocks/flow_calendar.html | 38 +++++++++++++++++------------ templates/events/event.ics | 19 +++++++++------ templates/events/header.ics | 2 +- 5 files changed, 36 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index dd0cf66..9a69893 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,6 @@ deploy: else \ lektor plugin flush-cache; \ lektor clean --yes; \ - rm assets/svg/*; \ if python3 -m lektor --version 2>/dev/null; then \ python3 -m lektor build $(LEKTOR_PLUGIN_FLAGS) $(LEKTOR_DEPLOY_FLAGS); \ unix2dos temp/builds/c3woc.de/waffeln.ics; \ diff --git a/content/waffeln.ics/contents.lr b/content/waffeln.ics/contents.lr index 488db57..9b6b0f0 100644 --- a/content/waffeln.ics/contents.lr +++ b/content/waffeln.ics/contents.lr @@ -533,7 +533,7 @@ ort: Ziegeleipark Mildenberg ---- url: https://events.ccc.de/camp/2023/infos/ ---- -description: +description: Chaos Communication Camp 2023 im Ziegeleipark Mildenberg. Leider ohne Waffeln, weil man bisher mit der PL keinen Weg gefunden hat, wie es Waffeln auf so einem Event geben könnte. ---- mail: Waffel Operation Center ---- diff --git a/templates/blocks/flow_calendar.html b/templates/blocks/flow_calendar.html index e89887d..0dac1f2 100644 --- a/templates/blocks/flow_calendar.html +++ b/templates/blocks/flow_calendar.html @@ -22,10 +22,8 @@ {%- if blk.confirmed == 'true' -%} - {%- elif blk.confirmed == 'canceled' -%} - - {% else %} - + {%- elif blk.confirmed == 'canceled' -%} + {% else %} {% endif %} {%- if blk.start.strftime('%d.%m') == blk.ende.strftime('%d.%m') -%} {{- '\n ' -}} @@ -34,13 +32,15 @@ {{- '\n ' -}} {{ blk.start.strftime('%d.%m') }} - {{ blk.ende.strftime('%d.%m.%Y') }} {%- endif -%} + {%- if blk.confirmed == 'true' -%} + {%- elif blk.confirmed == 'canceled' -%} + {% else %} + {% endif %} {{- '\n ' -}} {{- '\n ' -}} {%- if blk.confirmed == 'true' -%} - {%- elif blk.confirmed == 'canceled' -%} - - {% else %} - + {%- elif blk.confirmed == 'canceled' -%} + {% else %} {% endif %} {{- '\n ' -}} {{- blk.event -}} @@ -51,15 +51,23 @@ {% else %} {% endif %} - {{- '\n ' -}} - {{- '\n ' -}} {{ blk.ort }} {%- if blk.confirmed == 'true' -%} - {%- elif blk.confirmed == 'canceled' -%} - - {% else %} - + {%- elif blk.confirmed == 'canceled' -%} + {% else %} {% endif %} - {{- '\n ' -}} + {{- '\n ' -}} + {{- '\n ' -}} + {%- if blk.confirmed == 'true' -%} + {%- elif blk.confirmed == 'canceled' -%} + {% else %} + {% endif %} + {{ blk.ort }} + {%- if blk.confirmed == 'true' -%} + {%- elif blk.confirmed == 'canceled' -%} + {% else %} + {% endif %} + + {{- '\n ' -}} {%- endif -%} {%- endfor -%} {%- endif -%} diff --git a/templates/events/event.ics b/templates/events/event.ics index 5c7c0d3..0a81650 100644 --- a/templates/events/event.ics +++ b/templates/events/event.ics @@ -11,17 +11,20 @@ DESCRIPTION;LANGUAGE={{ this.lang }}:{{ blk.description|replace( "|", "\\n") | Weiteres dazu auf {{ blk.url | wordwrap(width=65, wrapstring='\n ') }}{% endif %} LOCATION;LANGUAGE={{ this.lang }}:{{ blk.ort | wordwrap(width=45, wrapstring='\n ') }} -STATUS: - {%- if blk.confirmed == 'true' -%} - CONFIRMED - {%- elif blk.confirmed == 'canceled' -%} - CANCELLED - {%- else %} - TENTATIVE - {%- endif %} + {%- if blk.confirmed == 'true' -%}{{- '\n' -}} +STATUS:CONFIRMED +METHOD:PUBLISH + {%- elif blk.confirmed == 'canceled' -%}{{- '\n' -}} +STATUS:CANCELLED +METHOD:CANCEL + {%- else -%}{{- '\n' -}} +STATUS:TENTATIVE + {%- endif -%} {{- '\n' -}} SUMMARY;LANGUAGE={{ this.lang }}:{{ blk.event | wordwrap(width=45, wrapstring='\n ') }} TRANSP:OPAQUE +{%- if blk.url is defined %} URL:{{ blk.url }} +{%- endif %} DTEND;VALUE=DATE-TIME;TZID=Europe/Berlin:{{ blk.ende.strftime('%Y%m%dT%H%M%S') }} CONTACT;LANGUAGE={{ this.lang }}:{{ blk.mail }} COLOR:{{ blk.color }} diff --git a/templates/events/header.ics b/templates/events/header.ics index f73400a..ba6bf76 100644 --- a/templates/events/header.ics +++ b/templates/events/header.ics @@ -5,7 +5,7 @@ CALSCALE:GREGORIAN METHOD:PUBLISH UID:{{ this._gid }} URL:{{ this.moreinfourl }} -REFRESH-INTERVAL;VALUE=DURATION:P2D +REFRESH-INTERVAL;VALUE=DURATION:PT6H SOURCE;VALUE=URI:{{ this._path | url(external=true) }} COLOR:{{ this.color }} {#- NAME;LANGUAGE={{ this.lang }}:{{ this.name | wordwrap(width=45, wrapstring='\n ') }} #}