Skip to content

Commit

Permalink
SGD8-2848: Update timeline frame templates for anchor support
Browse files Browse the repository at this point in the history
  • Loading branch information
Lennart Van Vaerenbergh committed Aug 21, 2024
1 parent e257f43 commit c897ea3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
{% block paragraph %}
{% block content %}
{% if first_timeframe == TRUE %}
<div {{ attributes.addClass('roadmap-wrapper') }}>
<div class="roadmap-wrapper">
<dl class="roadmap">
{% endif %}

<h2>{{ content.title }}</h2>
<h2 {{ attributes }}>{{ content.title }}</h2>

{{ content.timeline_items }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,20 @@
{% set reversed = content.reversed.0 %}
{% set first_timeframe = content.first_timeframe.0 %}
{% set last_timeframe = content.last_timeframe.0 %}
{% set classes = [
'timeline-slot',
items_total is odd ? 'timeline-slot-odd' : 'timeline-slot-even',
reversed ? 'timeline-slot-reverse',
] %}

{% block paragraph %}
{% block content %}
{% if first_timeframe == TRUE %}
<div{{ attributes.addClass('timeline-wrapper') }}>
<div class="timeline-wrapper">
<h2 class="visually-hidden">{{ 'timeline'|t }}</h2>
<dl class="timeline accordion">
{% endif %}
<div class="timeline-slot {{ items_total is odd ? 'timeline-slot-odd' : 'timeline-slot-even'}} {{ reversed ? 'timeline-slot-reverse' : '' }}" role="listitem">
<div {{ attributes.addClass(classes).setAttribute('role', 'listitem') }}>
{% if content.title|render is not empty %}
<dt>
<h3 class="dt-title">{{ content.title }}</h3>
Expand Down

0 comments on commit c897ea3

Please sign in to comment.