Skip to content
Snippets Groups Projects
Commit 9133f5ee authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-4184: fixing yml and twig for timeline

parent a49b5b78
No related branches found
No related tags found
1 merge request!47ISTWCMS-4184 m26lebla theme timeline
This diff is collapsed.
...@@ -2,44 +2,59 @@ ...@@ -2,44 +2,59 @@
uw-timeline vertical-timeline vertical-{{ style }} {{ modifier_classes }} uw-timeline vertical-timeline vertical-{{ style }} {{ modifier_classes }}
{%- endset %} {%- endset %}
{% set display_year = timeline_items[0].year %} {#{% for year, timeline_item in timeline_items %}#}
{# {{ year }}#}
{# {% for month, entries in timeline_item %}#}
{# {{ month }}#}
{# {% for entry in entries %}#}
{# {{ entry.headline }}#}
{# {% endfor %}#}
{# {% endfor %}#}
{#{% endfor %}#}
<ol class="{{ modifier_classes }}"> <ol class="{{ modifier_classes }}">
{% for years in timeline_items %} {% for year, timeline_item in timeline_items %}
{% if loop.index == 1 or loop.index == 2 or loop.index == 3 or years.year != display_year %} <li>
<li> <span class="timeline-year">{{ year }}</span>
<span class="timeline-year">{{ years.year }}</span> <ol>
<ol>
{% endif %} {% for month, entries in timeline_item %}
{% for months in years.month %}
{% if style == 'month' %} {% if style == 'month' %}
<li> <li>
<span class="timeline-month">{{ months.name}}</span> <span class="timeline-month">{{ month }}</span>
<ol> <ol>
{% endif %} {% endif %}
{% for item in months.entries %} {% for entry in entries %}
<li class="timeline-info">
{% if item.image %}
<img src="{{ item.image }}" alt="" class="timeline-photo"/>
{% endif %}
<div class="timeline-headline"><strong>{{ item.headline }}</strong></div>
<p>{{ item.content }}</p>
</li>
{% endfor %}
{% if style == 'month' %} <li class="timeline-info">
</ol> {% if entry.image %}
</li> <img src="{{ entry.image }}" alt="" class="timeline-photo"/>
{% endif %} {% endif %}
<div class="timeline-headline"><strong>{{ entry.headline }}</strong></div>
<p>{{ entry.content }}</p>
</li>
{% endfor %}
{% if style == 'month' %}
</ol>
</li>
{% endif %}
{% endfor %}
</ol>
</li>
{% endfor %} {# {% if timeline_items[loop.index0 + 1].year and timeline_items[loop.index0 + 1].year != display_year %}#}
{# </ol>#}
{# </li>#}
{# {% elseif not timeline_items[loop.index0 + 1].year %}#}
{# </ol>#}
{# </li>#}
{# {% endif %}#}
{% if loop.index == 1 or loop.index == 2 or loop.index == 3 or years.year != display_year %}
</ol>
</li>
{% set display_year = years.year %}
{% endif %}
{% endfor %} {% endfor %}
</ol> </ol>
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment