WIP: Added flow_block_page model to not break pages without flow blocks.
This commit is contained in:
parent
c15a4cfd7c
commit
e66422ae1e
@ -1,4 +1,4 @@
|
|||||||
_model: page
|
_model: flow_block_page
|
||||||
---
|
---
|
||||||
title: Hacken in bester Genossenschaft
|
title: Hacken in bester Genossenschaft
|
||||||
---
|
---
|
||||||
|
28
models/flow_block_page.ini
Normal file
28
models/flow_block_page.ini
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
[model]
|
||||||
|
name = Flow Block Page
|
||||||
|
label = {{ this.title }}
|
||||||
|
inherits = header_slim
|
||||||
|
|
||||||
|
[fields.title]
|
||||||
|
label = Title
|
||||||
|
description = Der Seitentitel und die Überschrift dieser Seite
|
||||||
|
type = string
|
||||||
|
|
||||||
|
[fields.meta_description]
|
||||||
|
label = Meta Beschreibung
|
||||||
|
description = Hier kommt die Beschreibung rein, die von Suchmachinen, Seitencrawlern und Previews auf diese Seite generiert werden
|
||||||
|
type = string
|
||||||
|
|
||||||
|
[fields.teaser]
|
||||||
|
label = Teaser
|
||||||
|
description = Erster, hervorgehobener Absatz des Texts (Vorspann).
|
||||||
|
type = markdown
|
||||||
|
|
||||||
|
[fields.body]
|
||||||
|
label = Body
|
||||||
|
type = markdown
|
||||||
|
|
||||||
|
[fields.section]
|
||||||
|
label = Sections
|
||||||
|
type = flow
|
||||||
|
flow_blocks = flow_text_section
|
@ -21,8 +21,3 @@ type = markdown
|
|||||||
[fields.body]
|
[fields.body]
|
||||||
label = Body
|
label = Body
|
||||||
type = markdown
|
type = markdown
|
||||||
|
|
||||||
[fields.section]
|
|
||||||
label = Sections
|
|
||||||
type = flow
|
|
||||||
flow_blocks = flow_text_section
|
|
||||||
|
53
templates/flow_block_page.html
Normal file
53
templates/flow_block_page.html
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
{% extends "header_slim.html" %}
|
||||||
|
{%- block title -%}{{ this.title }}{%- endblock -%}
|
||||||
|
{%- block meta_description -%}
|
||||||
|
{%- if this.meta_description is defined and this.meta_description != "" -%}
|
||||||
|
{{ this.meta_description }}
|
||||||
|
{%- else -%}
|
||||||
|
Werkkooperative der Technikfreundinnen eG
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endblock -%}
|
||||||
|
{% block body %}
|
||||||
|
<!-- 50/50 Layout - start -->
|
||||||
|
<section class="content">
|
||||||
|
<div class="content__box -heading">
|
||||||
|
<div class="content__inner_box">
|
||||||
|
<h2>{{ this.title }}</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content__half_box">
|
||||||
|
<div class="content__inner_half_box">
|
||||||
|
<div class="content__teaser">
|
||||||
|
{{ this.teaser }}
|
||||||
|
</div>
|
||||||
|
<div class="content__body">
|
||||||
|
{{ this.body }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% if this.attachments.images %}
|
||||||
|
<div class="content__inner_half_box">
|
||||||
|
{% for image in this.attachments.images %}
|
||||||
|
<img class="content__half_box_image" src="{{ image|url }}" width="{{ image.width / 2 }}" alt="{{ image.description }}" srcset="{{ image.thumbnail(image.width / 2)|url }} 1x, {{ image|url }} 2x">
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<!-- 50/50 Layout - end -->
|
||||||
|
|
||||||
|
<!-- Icon boxes - start -->
|
||||||
|
<section class="content">
|
||||||
|
<div class="content__box -card_box">
|
||||||
|
<div class="content__inner_box -card_box">
|
||||||
|
{% for block in this.section.blocks %}
|
||||||
|
<div class="card">
|
||||||
|
<h3 class="card__heading">{{ block.title }}</h3>
|
||||||
|
<!-- <p class="card__text">Eine Hackergemeinschaft ist aeine Aufstellung, die im Markt allerhand bewegen kann.</p> -->
|
||||||
|
{{ block.body }}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{% endblock %}
|
@ -8,46 +8,16 @@
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<!-- 50/50 Layout - start -->
|
<div class="content__box">
|
||||||
<section class="content">
|
<div class="content__inner_box">
|
||||||
<div class="content__box -heading">
|
<h1>{{ this.title }}</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<section class="content -odd -columns">
|
||||||
|
<div class="content__box">
|
||||||
<div class="content__inner_box">
|
<div class="content__inner_box">
|
||||||
<h2>{{ this.title }}</h2>
|
{{ this.body }}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="content__half_box">
|
|
||||||
<div class="content__inner_half_box">
|
|
||||||
<div class="content__teaser">
|
|
||||||
{{ this.teaser }}
|
|
||||||
</div>
|
|
||||||
<div class="content__body">
|
|
||||||
{{ this.body }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% if this.attachments.images %}
|
|
||||||
<div class="content__inner_half_box">
|
|
||||||
{% for image in this.attachments.images %}
|
|
||||||
<img class="content__half_box_image" src="{{ image|url }}" width="{{ image.width / 2 }}" alt="{{ image.description }}" srcset="{{ image.thumbnail(image.width / 2)|url }} 1x, {{ image|url }} 2x">
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<!-- 50/50 Layout - end -->
|
|
||||||
|
|
||||||
<!-- Icon boxes - start -->
|
|
||||||
<section class="content">
|
|
||||||
<div class="content__box -card_box">
|
|
||||||
<div class="content__inner_box -card_box">
|
|
||||||
{% for block in this.section.blocks %}
|
|
||||||
<div class="card">
|
|
||||||
<h3 class="card__heading">{{ block.title }}</h3>
|
|
||||||
<!-- <p class="card__text">Eine Hackergemeinschaft ist aeine Aufstellung, die im Markt allerhand bewegen kann.</p> -->
|
|
||||||
{{ block.body }}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
{% endblock %}
|
||||||
{% endblock %}
|
|
Loading…
Reference in New Issue
Block a user