From 9a8f01266dc4dafbf2d0ef17dd9a49695d031650 Mon Sep 17 00:00:00 2001 From: L3D Date: Fri, 30 Nov 2018 01:23:15 +0100 Subject: [PATCH] Add flowblock for images Former-commit-id: b7d8a1e9c747d1b6794905f11534215cc034c03f [formerly a5ba32508b2443e151b2a6eeb6a8146c68e31969] [formerly 1d264ce107f18188eca33f09d3e4cab3ec57de77 [formerly 57b7f8d59b9f6d8cff17389a8639d921d14da555]] Former-commit-id: 28ff10f6c80e469e25a122428ff65346ce705d85 [formerly 0754f0ea986eb131959f1fbbfdb9b999653ba8e0] Former-commit-id: 843a7eb673e9cd4dd0d0005652752ae259a8461c --- assets/images/c3woc.svg | 1434 ++++++++++++++++++++++++++++++ assets/images/logo | 1 - content/blog/gluehpn/contents.lr | 9 + flowblocks/image.ini | 9 + models/blog-post.ini | 6 + templates/blocks/image.html | 4 + templates/layout.html | 2 +- templates/macros/blog.html | 17 +- 8 files changed, 1475 insertions(+), 7 deletions(-) create mode 100644 assets/images/c3woc.svg delete mode 160000 assets/images/logo create mode 100644 flowblocks/image.ini create mode 100644 templates/blocks/image.html diff --git a/assets/images/c3woc.svg b/assets/images/c3woc.svg new file mode 100644 index 0000000..e71cc18 --- /dev/null +++ b/assets/images/c3woc.svg @@ -0,0 +1,1434 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/logo b/assets/images/logo deleted file mode 160000 index ea629a0..0000000 --- a/assets/images/logo +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ea629a08b9bf19b71637deedc20557a09abeda5b diff --git a/content/blog/gluehpn/contents.lr b/content/blog/gluehpn/contents.lr index dcf97a5..ebed6cf 100644 --- a/content/blog/gluehpn/contents.lr +++ b/content/blog/gluehpn/contents.lr @@ -66,3 +66,12 @@ Am Samstag ist dann auch die Unterstützung aus Darmstadt aufgetaucht. Und es ha +--- +project: + +#### image #### +image: vegan.jpg +#### image #### +image: vegan.jpg +--- +galerie: diff --git a/flowblocks/image.ini b/flowblocks/image.ini new file mode 100644 index 0000000..c60421c --- /dev/null +++ b/flowblocks/image.ini @@ -0,0 +1,9 @@ +[block] +name = Bild +button_label = [[image]] + +[fields.image] +label = Bild (im Anhnag dieser Seite) +type = select +source = record.attachments.images + diff --git a/models/blog-post.ini b/models/blog-post.ini index 78e0630..fb03cf1 100644 --- a/models/blog-post.ini +++ b/models/blog-post.ini @@ -46,3 +46,9 @@ type = markdown label = Non Public Body type = markdown +[fields.galerie] +label = Galerie +type = flow +flow_blocks = image +width = 1/2 + diff --git a/templates/blocks/image.html b/templates/blocks/image.html new file mode 100644 index 0000000..0065290 --- /dev/null +++ b/templates/blocks/image.html @@ -0,0 +1,4 @@ +{% set img = record.attachments.images.get(this.image) %} + + + diff --git a/templates/layout.html b/templates/layout.html index 22e6c04..3998cce 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -84,7 +84,7 @@

{% if bag('translate', this.alt, 'whoami') %}{{ bag('translate', this.alt, 'whoami') }}{% else %}Das C3WOC besteht aus Hackern aus dem Chaosumfeld. Nimm doch mal mit uns Kontakt auf und lass uns zusammen Waffeln machen!

{% endif %}
- +