diff --git a/_includes/projects_list.html b/_includes/projects_list.html new file mode 100644 index 0000000000000000000000000000000000000000..456e4c4b38b378a72b23890a1cb8ba604c3610a9 --- /dev/null +++ b/_includes/projects_list.html @@ -0,0 +1,27 @@ +{% comment %} + Generates a list of projects. + Expects 'projects' as an argument, representing the list of projects to show. +{% endcomment %} + +{% for role in site.roles %} + {% assign rollers = projects | where: "role", role.id %} + + {% if rollers.size > 0 %} + <ul class="collection with-header"> + <li class="collection-header"><h4>{{role.name}}</h4></li> + {% for project in rollers %} + <li class="collection-item avatar"> + <a href="{{project.url}}" class="title">{{project.fullname}}</a> + <p> + {% if project.start_date %} + from {{project.start_date}} <br/> + {% endif %} + {% if project.end_date %} + until {{project.end_date}} <br/> + {% endif %} + </p> + </li> + {% endfor %} + </ul> + {% endif %} +{% endfor %} diff --git a/projects/index.html b/projects/index.html new file mode 100644 index 0000000000000000000000000000000000000000..80b93a00bda2f5ec9a17a36325243defccb1a128 --- /dev/null +++ b/projects/index.html @@ -0,0 +1,9 @@ +--- +layout: default +title: KWARC Projects +--- + +<h2>Current Projects of the KWARC Group</h2> + +{% assign projects = site.pages | where: "layout", "project" | where_exp: "project", "project.end_date == null" | sort: "start_date" %} +{% include projects_list.html %}