From 808a2b656a1fd8df26eeab7209c919a6a9ad988e Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sat, 19 May 2018 15:48:33 +0200 Subject: [PATCH] Added events collection and first event Signed-off-by: Jim Martens --- _config.yml | 10 ++++++ _events/2019-05-26-bezirkswahl.markdown | 8 +++++ _includes/sidebar/events.html | 42 +++++++++++++++++++++++++ _layouts/event.html | 36 +++++++++++++++++++++ index.html | 1 + 5 files changed, 97 insertions(+) create mode 100644 _events/2019-05-26-bezirkswahl.markdown create mode 100644 _includes/sidebar/events.html create mode 100644 _layouts/event.html diff --git a/_config.yml b/_config.yml index afde767..27bdcb5 100644 --- a/_config.yml +++ b/_config.yml @@ -13,6 +13,9 @@ description: > # this means to ignore newlines until "baseurl:" related to me personally. baseurl: "" # the subpath of your site, e.g. /blog url: "https://2martens.de" # the base hostname & protocol for your site +collections: + events: + output: true defaults: - scope: @@ -29,6 +32,13 @@ defaults: values: layout: "page" sidebarboxes: "author encrypted-communication" + - + scope: + path: "" + type: "events" + values: + layout: "event" + sidebarboxes: "author encrypted-communication" # Build settings markdown: kramdown diff --git a/_events/2019-05-26-bezirkswahl.markdown b/_events/2019-05-26-bezirkswahl.markdown new file mode 100644 index 0000000..2cad5d1 --- /dev/null +++ b/_events/2019-05-26-bezirkswahl.markdown @@ -0,0 +1,8 @@ +--- +layout: event +title: "Bezirks- und Europawahl 2019" +date: 2018-05-19 10:00:00 +0200 +start_date: 2019-05-26 10:00:00 +0200 +end_date: 2019-05-26 18:00:00 +0200 +location: Hamburg +--- \ No newline at end of file diff --git a/_includes/sidebar/events.html b/_includes/sidebar/events.html new file mode 100644 index 0000000..0cb3d4e --- /dev/null +++ b/_includes/sidebar/events.html @@ -0,0 +1,42 @@ +{% if site.events.size > 0 %} + +{% endif %} diff --git a/_layouts/event.html b/_layouts/event.html new file mode 100644 index 0000000..fd1314a --- /dev/null +++ b/_layouts/event.html @@ -0,0 +1,36 @@ +--- +layout: default +--- +{% if page.date_modified %} +{% assign modified = page.date_modified %} +{% else %} +{% assign modified = page.date %} +{% endif %} + +
+
+

{{ page.title }}

+
+ +
    +
  • + + {{ page.location }} +
  • +
  • + + +
  • + {% if page.end_date %} +
  • + + +
  • + {% endif %} +
+
{{ content }}
+
diff --git a/index.html b/index.html index 2ed6afc..3dc7157 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,6 @@ --- layout: default +sidebarboxes: author encrypted-communication events ---

2martens.de