Skip to content

Commit

Permalink
Revert "fix capitalisation"
Browse files Browse the repository at this point in the history
This reverts commit 02db9a1.
  • Loading branch information
mo-nika committed Oct 30, 2024
1 parent 02db9a1 commit b63651d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 53 deletions.
69 changes: 34 additions & 35 deletions _includes/participations.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
{% assign participant = include.participant %} {% assign section =
include.section %}
{% assign participant = include.participant %}
{% assign section = include.section %}

<!-- keynote -->
{% if section == "keynotes"%} {% for keynote in site.keynotes %} {% if
keynote.speakers contains participant.path %}
<a href="{{ keynote.url | relative_url }}">
<p class="item-training">{{ keynote.title }}</p>
</a>
{% endif %} {% endfor %} {% endif %}
{% if section == "keynotes"%}
{% for keynote in site.keynotes %}
{% if keynote.speakers contains participant.path %}
<a href="{{ keynote.url | relative_url }}">
<p class="item-training">
{{ keynote.title }}</p>
</a>
{% endif %}
{% endfor %}
{% endif %}

<!-- speaker -->
{% if section == "speakers" %} {% for talk in site.talks %} {% if talk.speakers
contains participant.path %}
<a href="{{ talk.url | relative_url }}">
<p class="item-training">{{ talk.title }}</p>
</a>
{% endif %} {% endfor %} {% endif %}
{% if section == "speakers" %}
{% for talk in site.talks %}
{% if talk.speakers contains participant.path %}
<a href="{{ talk.url | relative_url }}">
<p class="item-training">
{{ talk.title }}</p>
</a>
{% endif %}
{% endfor %}
{% endif %}

<!-- trainer -->
{% if section == "trainers" %} {% for training in site.trainings %} {% if
training.trainers contains participant.path %}
<a href="{{ training.url | relative_url }}">
<p class="item-training">
{% 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 %}
</p>
</a>
{% endif %} {% endfor %} {% endif %} ``` The main change is in the trainers
section, where we've replaced: ```html
<p class="item-training">{{ training.title }}</p>
``` with our word handling logic: ```html
<p class="item-training">
{% 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 %}
</p>

<!-- speaker -->
{% if section == "trainers" %}
{% for training in site.trainings %}
{% if training.trainers contains participant.path %}
<a href="{{ training.url | relative_url }}">
<p class="item-training">
{{ training.title }}</p>
</a>
{% endif %}
{% endfor %}
{% endif %}
9 changes: 2 additions & 7 deletions _includes/training.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,12 @@ <h2 class="title">TRAINING & TUTORIAL</h2>

<div class="item-col item-training">
<a href="{{training.url | relative_url }}">
<p class="item-title">
{% 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 %}
</p>
<p class="item-title">{{training.title }}</p>
</a>
{% for trainer_path in training.trainers %} {% assign
participant = site.participants | where_exp: "x", "trainer_path
== x.path" | first %}

<a href="{{ participant.url | relative_url }}">
<p class="item-trainer">Trainer: {{ participant.name}}</p>
</a>
Expand Down
14 changes: 3 additions & 11 deletions _layouts/training.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,17 @@
<html>
{% include imports/head.html %}


<body>

</div>
{% include navigation_2.html %}
<div class="training-content">
<div class="training-card">
<div class="training-head">
<div class="training-col">
<h1 class="training-name">
{% 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 }}
</h1>
{% assign schedule = site.data.training-list.trainings | where_exp: "item", "item.training == page.path" | first %}
<div class="training-info">
Expand Down

0 comments on commit b63651d

Please sign in to comment.