From 1ef4ba27e275cdd52a4ede967b5ee90f624951cb Mon Sep 17 00:00:00 2001 From: Veikka Kähkönen Date: Mon, 27 Nov 2017 16:38:31 +0200 Subject: Add generic dynamic layout for lists of contacts --- _layouts/people_generic.html | 42 ++++++++++++++++++++++++++++++++++++++++++ _sass/_contacts.scss | 2 ++ 2 files changed, 44 insertions(+) create mode 100644 _layouts/people_generic.html diff --git a/_layouts/people_generic.html b/_layouts/people_generic.html new file mode 100644 index 0000000..86e01bc --- /dev/null +++ b/_layouts/people_generic.html @@ -0,0 +1,42 @@ +--- +layout: page +--- + +
+ {{ content }} + + {% assign committees = site.data[page.data].committees %} + {% if committees[0] %} + {% for committee in committees %} +

{{ committee.name }}

+ {% for position in committee.positions%} +

{{ position.name }}

+

{{ position.description }}

+
+ {% assign i = 0 %} + {% for member in position.members %} + {% assign columnI = i | modulo: 2 %} + {% if columnI == 0 %} +
+ {% endif %} +
+ +

{{ member.name }}

+ {% if member.email %} +
+ {% assign email_tokens = member.email | split: '@' %} + {{ email_tokens[0] }}
+
+ {% endif %} +
+ {% assign lastElement = position.members | size | minus: 1 %} + {% if columnI == 1 or i == lastElement %} +
+ {% endif %} + {% assign i = i | plus: 1 %} + {% endfor %} +
+ {% endfor %} + {% endfor %} + {% endif %} +
diff --git a/_sass/_contacts.scss b/_sass/_contacts.scss index 2c28ff8..10fe4be 100644 --- a/_sass/_contacts.scss +++ b/_sass/_contacts.scss @@ -22,6 +22,8 @@ $contact-vspacing: 2em; margin-bottom: 0; } +.contact__person_name--generic { + margin-top: $contact-internal-vgap*2; } .contact__section { -- cgit v1.3