From a4dc773df3533ed4ec00a9efdfaaacc62be8f890 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 4 Jan 2020 14:03:03 +0100 Subject: [PATCH] Prepare/move main pages to 2020 layout --- content/contents.lr | 3 ++- content/u/contents.lr | 6 +++++- models/page-2020.ini | 11 +++++++++++ models/projects.ini | 15 +++++++++++++++ templates/page-2020.html | 13 +++++++++++++ templates/projects.html | 1 + templates/summary-page.html | 32 ++++++++++++++++++++++++++++++++ 7 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 models/page-2020.ini create mode 100644 models/projects.ini create mode 100644 templates/page-2020.html create mode 120000 templates/projects.html create mode 100644 templates/summary-page.html diff --git a/content/contents.lr b/content/contents.lr index 211965f..4775b03 100644 --- a/content/contents.lr +++ b/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. diff --git a/content/u/contents.lr b/content/u/contents.lr index e887d76..b873b52 100644 --- a/content/u/contents.lr +++ b/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 +--- diff --git a/models/page-2020.ini b/models/page-2020.ini new file mode 100644 index 0000000..88d59f7 --- /dev/null +++ b/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 diff --git a/models/projects.ini b/models/projects.ini new file mode 100644 index 0000000..1cb2e71 --- /dev/null +++ b/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 \ No newline at end of file diff --git a/templates/page-2020.html b/templates/page-2020.html new file mode 100644 index 0000000..71b3dec --- /dev/null +++ b/templates/page-2020.html @@ -0,0 +1,13 @@ +{% extends "layout-2020.html" %} +{% block title %}{{ this.title }}{% endblock %} +{% block subtitle %}{{ this.subtitle }}{% endblock %} + +{% block content %} +
+
+
+ {{ this.content }} +
+
+
+{% endblock %} diff --git a/templates/projects.html b/templates/projects.html new file mode 120000 index 0000000..c166ef2 --- /dev/null +++ b/templates/projects.html @@ -0,0 +1 @@ +summary-page.html \ No newline at end of file diff --git a/templates/summary-page.html b/templates/summary-page.html new file mode 100644 index 0000000..f1df195 --- /dev/null +++ b/templates/summary-page.html @@ -0,0 +1,32 @@ +{% extends "layout-2020.html" %} +{% block title %}{{ this.title }}{% endblock %} +{% block subtitle %}{{ this.subtitle }}{% endblock %} + +{% block content %} + +
+ {% for product in this.children %} + {% if loop.first %} +
+ {% endif %} +
+
+
+
{{ product.title }}
+

{{ product.subtitle }}

+ Check it out +
+
+
+ {% if loop.index is divisibleby 3 %} +
+
+ {% endif %} + {% if loop.last %} +
+ {% endif %} + {% endfor %} +
+ + +{% endblock %}