diff --git a/content/contents.lr b/content/contents.lr index 9704628..7213626 100644 --- a/content/contents.lr +++ b/content/contents.lr @@ -35,4 +35,10 @@ title: Mastodon sm_link: https://chaos.social/@hackergeno ----- sm_image: /images/mastodon_logo.svg +---- +content_image: nasa-space-shuttle.jpg +---- +content_image_alt: Startendes Space Shuttle +---- +content_image_src: images.nasa.gov/details-sts057-s-055 #### flow_seperator #### diff --git a/flowblocks/flow_text_image_section.ini b/flowblocks/flow_text_image_section.ini index 053be29..5daa9d7 100644 --- a/flowblocks/flow_text_image_section.ini +++ b/flowblocks/flow_text_image_section.ini @@ -19,3 +19,22 @@ type = markdown label = Content footer type = flow flow_blocks = flow_social_media_link + +[fields.content_image] +label = Content Image +description = Upload a Image to select it here +type = select +source = record.attachments.images +width = 1/2 + +[fields.content_image_alt] +label = Content Image ALT tag +description = Description of the Image +type = string +width = 1/4 + +[fields.content_image_src] +label = Content Image Source +description = Woher kommt das Bild (Optional) +type = string +width = 1/4 diff --git a/templates/blocks/flow_text_image_section.html b/templates/blocks/flow_text_image_section.html index a828da1..b57fecf 100644 --- a/templates/blocks/flow_text_image_section.html +++ b/templates/blocks/flow_text_image_section.html @@ -19,11 +19,10 @@ {% endfor %} -{# - {% if this.attachments.images %} + {% if this.content_image %}
{{ this.content_image_src }}
+ {% endif %}