From b12f8347c8ad7f2d8fb1e628b776ba9a376b9bb4 Mon Sep 17 00:00:00 2001 From: Tom Wiesing <tkw01536@gmail.com> Date: Sun, 15 Oct 2017 15:00:55 +0200 Subject: [PATCH] Handle orphaned systems in page and menu --- README.md | 2 +- _config.yml | 2 ++ _includes/psitem.html | 1 + _layouts/system.html | 11 +++++++++++ systems/kat.md | 1 + systems/{ => meta}/orphans.md | 12 ++++++++++++ 6 files changed, 28 insertions(+), 1 deletion(-) rename systems/{ => meta}/orphans.md (58%) diff --git a/README.md b/README.md index 4ce5efe..fa81002 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ It consists of a set of items, that are defined by the following keys: **Submenus**. The menu allows (up to) one level of submenus. There are three such cases: -1. An item specifies the `folder` key. In this case all pages in the given folder are automatically added. The frontmatter is used for the specification. +1. An item specifies the `folder` key. In this case all pages in the given folder are automatically added. The frontmatter is used for the specification. Items with the `hidden` key in frontmatter set to true are automatically excluded. 2. An item specifies the `items` key. Here the items are used accordingly. 3. An item specifies both the `folder` and `items` keys. The items for both cases are automatically merged. diff --git a/_config.yml b/_config.yml index 3625b74..6c19eaa 100644 --- a/_config.yml +++ b/_config.yml @@ -99,6 +99,8 @@ menu: active: '/systems/' url: '/systems/' items: + - title: 'Orphaned Systems' + url: '/systems/orphans/' - title: 'Historic Systems' url: '/systems/historic/' diff --git a/_includes/psitem.html b/_includes/psitem.html index 9762804..8958be1 100644 --- a/_includes/psitem.html +++ b/_includes/psitem.html @@ -5,6 +5,7 @@ <li class="collection-item"> <a href="{{item.url}}" class="title">{{item.title}}</a> {% if item.funding %} ({{item.funding}}) {% endif %} + {% if item.orphan %}<b>(up for adoption)</b>{% endif %} <div> {% if item.start_date %} diff --git a/_layouts/system.html b/_layouts/system.html index 99f714b..dd82ebe 100644 --- a/_layouts/system.html +++ b/_layouts/system.html @@ -24,6 +24,17 @@ layout: default </p> <hr /> {% endif %} + + {% if page.orphan %} + <p> + <a href="{{ site.baseurl }}/systems/orphans"> + <div class="chip"> + Up for adoption + </div> + </a> + </p> + <hr /> + {% endif %} {% for person in page.people %} {% include people_chip.html %} <br /> diff --git a/systems/kat.md b/systems/kat.md index ca164f6..1590237 100644 --- a/systems/kat.md +++ b/systems/kat.md @@ -5,6 +5,7 @@ title: "KAT: KWARC Annotation Tool" teaser: An Annotation Tool for STEM Documents start_date: 2013-06 +orphan: true people: - mkohlhase diff --git a/systems/orphans.md b/systems/meta/orphans.md similarity index 58% rename from systems/orphans.md rename to systems/meta/orphans.md index ff42f68..8a8bb8a 100644 --- a/systems/orphans.md +++ b/systems/meta/orphans.md @@ -1,8 +1,20 @@ --- layout: page title: Orphaned Systems up for Adoption +permalink: /systems/orphans/ --- + Many of the KWARC projects are the work of students and become orphaned when these move on to greener pastures (e.g. when they graduate). We put these systems up for adoption bt new students. If you are interested, please contact someone from the KWARC group, we would be happy to help you understand the development opportunities and get involved. + +{% assign systems = site.pages | where: "layout", "system" | sort: "pillar" | sort: "start_date" %} + +<ul class="collection"> + {% for item in systems %} + {% if item.orphan %} + {% include psitem.html %} + {% endif %} + {% endfor %} +</ul> \ No newline at end of file -- GitLab