diff --git a/_includes/participations.html b/_includes/participations.html index e463b78..bf1f9e4 100644 --- a/_includes/participations.html +++ b/_includes/participations.html @@ -1,40 +1,39 @@ -{% assign participant = include.participant %} {% assign section = -include.section %} +{% assign participant = include.participant %} +{% assign section = include.section %} -{% if section == "keynotes"%} {% for keynote in site.keynotes %} {% if -keynote.speakers contains participant.path %} - -

{{ keynote.title }}

-
-{% endif %} {% endfor %} {% endif %} +{% if section == "keynotes"%} + {% for keynote in site.keynotes %} + {% if keynote.speakers contains participant.path %} + +

+ {{ keynote.title }}

+
+ {% endif %} + {% endfor %} +{% endif %} -{% if section == "speakers" %} {% for talk in site.talks %} {% if talk.speakers -contains participant.path %} - -

{{ talk.title }}

-
-{% endif %} {% endfor %} {% endif %} +{% if section == "speakers" %} + {% for talk in site.talks %} + {% if talk.speakers contains participant.path %} + +

+ {{ talk.title }}

+
+ {% endif %} + {% endfor %} +{% endif %} - -{% if section == "trainers" %} {% for training in site.trainings %} {% if -training.trainers contains participant.path %} - -

- {% assign words = training.name | split: ' ' %} {% for word in words %} - {% if word == 'TDD' %} {{ word }} {% elsif word == 'RESTful' %} {{ word - }} {% else %} {{ word | capitalize }} {% endif %} {% unless forloop.last - %} {% endunless %} {% endfor %} -

-
-{% endif %} {% endfor %} {% endif %} ``` The main change is in the trainers -section, where we've replaced: ```html -

{{ training.title }}

-``` with our word handling logic: ```html -

- {% assign words = training.name | split: ' ' %} {% for word in words %} {% - if word == 'TDD' %} {{ word }} {% elsif word == 'RESTful' %} {{ word }} {% - else %} {{ word | capitalize }} {% endif %} {% unless forloop.last %} {% - endunless %} {% endfor %} -

+ + +{% if section == "trainers" %} + {% for training in site.trainings %} + {% if training.trainers contains participant.path %} + +

+ {{ training.title }}

+
+ {% endif %} + {% endfor %} +{% endif %} \ No newline at end of file diff --git a/_includes/training.html b/_includes/training.html index 24523f3..d507974 100644 --- a/_includes/training.html +++ b/_includes/training.html @@ -19,17 +19,12 @@

TRAINING & TUTORIAL

-

- {% assign words = training.name | split: ' ' %} {% for - word in words %} {% if word == 'TDD' %} {{ word }} {% - elsif word == 'RESTful' %} {{ word }} {% else %} {{ word - | capitalize }} {% endif %} {% unless forloop.last %} {% - endunless %} {% endfor %} -

+

{{training.title }}

{% for trainer_path in training.trainers %} {% assign participant = site.participants | where_exp: "x", "trainer_path == x.path" | first %} +

Trainer: {{ participant.name}}

diff --git a/_layouts/training.html b/_layouts/training.html index 1ed95e6..957b32f 100644 --- a/_layouts/training.html +++ b/_layouts/training.html @@ -2,7 +2,9 @@ {% include imports/head.html %} + +
{% include navigation_2.html %}
@@ -10,17 +12,7 @@

- {% assign words = page.name | split: ' ' %} - {% for word in words %} - {% if word == 'TDD' %} - {{ word }} - {% elsif word == 'RESTful' %} - {{ word }} - {% else %} - {{ word | capitalize }} - {% endif %} - {% unless forloop.last %} {% endunless %} - {% endfor %} + {{ page.title }}

{% assign schedule = site.data.training-list.trainings | where_exp: "item", "item.training == page.path" | first %}