Browse Source

Prepare/move main pages to 2020 layout

refactoring
Nico Schottelius 2 years ago
parent
commit
a4dc773df3
  1. 3
      content/contents.lr
  2. 6
      content/u/contents.lr
  3. 11
      models/page-2020.ini
  4. 15
      models/projects.ini
  5. 13
      templates/page-2020.html
  6. 1
      templates/projects.html
  7. 32
      templates/summary-page.html

3
content/contents.lr

@ -2,7 +2,8 @@ title: ungleich cms
---
_model: page-2020
---
content: There is not much here - everything is stored below /u/.
content:
There is not much here - everything is stored below /u/.
You should actually not be able to see this page below ungleich.ch. If
you do, please let us know.

6
content/u/contents.lr

@ -2,10 +2,14 @@ _model: page-2020
---
title: /u/: the new home of ungleich
---
body: We are changing our CMS and our blog to a static
content:
We are changing our CMS and our blog to a static
system based on [lektor](https://www.getlektor.com).
Checkout the **source
code** on [code.ungleich.ch](https://code.ungleich.ch/ungleich-public/ungleich-staticcms).
Eventually, we might move all content from
[ungleich.ch](https://ungleich.ch) into this CMS.
---
body: old content
---

11
models/page-2020.ini

@ -0,0 +1,11 @@
[model]
name = Page (2020 Design)
label = {{ this.title }}
[fields.title]
label = Title
type = string
[fields.content]
label = Content
type = markdown

15
models/projects.ini

@ -0,0 +1,15 @@
[model]
name = Projects
label = Projects
hidden = yes
[fields.title]
label = Title
type = string
[fields.subtitle]
label = Subtitle
type = string
[children]
model = page-2020

13
templates/page-2020.html

@ -0,0 +1,13 @@
{% extends "layout-2020.html" %}
{% block title %}{{ this.title }}{% endblock %}
{% block subtitle %}{{ this.subtitle }}{% endblock %}
{% block content %}
<div class="container">
<div class="row mb-3">
<div class="col-md-12">
{{ this.content }}
</div>
</div>
</div>
{% endblock %}

1
templates/projects.html

@ -0,0 +1 @@
summary-page.html

32
templates/summary-page.html

@ -0,0 +1,32 @@
{% extends "layout-2020.html" %}
{% block title %}{{ this.title }}{% endblock %}
{% block subtitle %}{{ this.subtitle }}{% endblock %}
{% block content %}
<div class="container">
{% for product in this.children %}
{% if loop.first %}
<div class="row mb-3">
{% endif %}
<div class="col-md-4 mb-3">
<div class="card">
<div class="card-body">
<h5 class="card-title">{{ product.title }}</h5>
<p class="card-text">{{ product.subtitle }}</p>
<a class="btn btn-primary" href="{{ product|url }}">Check it out</a>
</div>
</div>
</div>
{% if loop.index is divisibleby 3 %}
</div>
<div class="row mb-3">
{% endif %}
{% if loop.last %}
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% endblock %}
Loading…
Cancel
Save