Statt Homepage von generischem Multisection-Template auf Homepage-Template umgestellt.

This commit is contained in:
Stephan 2021-02-04 21:02:33 +01:00
parent 3f8a3a70bd
commit 30ad57f4e0
6 changed files with 75 additions and 21 deletions

View File

@ -1,4 +1,21 @@
_model: multisection
_model: homepage
---
title: Multisection
---
claim_heading:
## <span>Werde <em>Teilchen&shy;beschleu&shy;nigerIn</em></span><br><span>in der chaosnahen Genossenschaft.</span>
---
claim_content:
Booste Projekte mit Unterstütung von 150 GenossInnen<br>Genossen&shy;schaftlich & solidarisch.
---
subclaim_heading:
## Genossenschaft zur Erschließung neuer<br />Betätigungs­formen in der Informations­technologie.
---
subclaim_content:
Wir halten Mitglieder und Interessierte durch regelmäßige Rundmails, Beiträge im Wiki und unseren Podcast auf dem Laufenden.<br>
Unseren Podcast findest du auf [vebit.xyz/podcast](https://vebit.xyz/pocast).
---

26
models/homepage.ini Normal file
View File

@ -0,0 +1,26 @@
[model]
name = Homepage
label = Homepage
[fields.title]
label = Title
type = string
[fields.claim_heading]
label = Claim Heading
type = markdown
[fields.claim_content]
label = Claim Content
type = markdown
[fields.subclaim_heading]
label = Subclaim Heading
type = markdown
[fields.subclaim_content]
label = Subclaim Content
type = markdown
[children]
order_by = sort_key

25
templates/homepage.html Normal file
View File

@ -0,0 +1,25 @@
{% extends "layout.html" %}
{% from "macros/multisection.html" import render_section %}
{% block body %}
<div class="content__box">
<div class="content__inner_box">
<h1>{{ this.title }}</h1>
</div>
</div>
{% for child in this.children %}
{% if child._model == 'section' %}
<section class="content {{ loop.cycle('-odd', '-even') }} -columns">
{% if child.title %}
<div class="content__box">
<div class="content__inner_box">
<h2>{{ child.title }}</h2><hr>
</div>
</div>
{% endif %}
<div class="content__box -columns">
{{ render_section(child) }}
</div>
</section>
{% endif %}
{% endfor %}
{% endblock %}

View File

@ -102,25 +102,13 @@
<!-- background for header box - end -->
<section class="header__claim">
<!-- TODO: Claims in Lektor editierbar. -->
<h2>
<span>Werde <em>Teilchen&shy;beschleu&shy;nigerIn</em></span><br>
<span>in der chaosnahen Genossenschaft.</span>
</h2>
<p>
Booste Projekte mit Unterstütung von 150 GenossInnen<br>
Genossen&shy;schaftlich & solidarisch.
</p>
{{ this.claim_heading }}
{{ this.claim_content }}
</section>
<section class="header__sub_claim">
<div class="sub_claim__box">
<h2>
Genossenschaft zur Erschließung neuer<br>
Betätigungs&shy;formen in der Informations&shy;technologie.
</h2>
<p>
Wir halten Mitglieder und Interessierte durch regelmäßige Rundmails, Beiträge im Wiki und unseren Podcast auf dem Laufenden.<br>
Unseren Podcast findest du auf <a href="https://vebit.xyz/pocast">vebit.xyz/podcast</a>.
</p>
{{ this.subclaim_heading }}
{{ this.subclaim_content }}
</div>
<!-- TODO: Zielseite für "MEMBER WERDEN"-Button -->
<button class="header__button sub_claim__button">MEMBER WERDEN</button>

View File

@ -1,5 +1,5 @@
{% macro render_section(section) %}
<div class="content__wrapper -columns">
<div class="content__inner_box">
{{ section.body }}
</div>
{% endmacro %}

View File

@ -5,9 +5,7 @@
{% if child._model == 'section' %}
<section class="content {{ loop.cycle('-odd', '-even') }} -columns">
<div class="content__box -columns">
<div class="content__inner_box">
{{ render_section(child) }}
</div>
{{ render_section(child) }}
</div>
</section>
{% endif %}