Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_wcms_gesso
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_wcms_gesso
Commits
a49b5b78
Commit
a49b5b78
authored
3 years ago
by
m26lebla
Browse files
Options
Downloads
Patches
Plain Diff
more twig logic for timeline
parent
0539362d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!47
ISTWCMS-4184 m26lebla theme timeline
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/_patterns/04-components/timeline/timeline.twig
+30
-31
30 additions, 31 deletions
source/_patterns/04-components/timeline/timeline.twig
source/_patterns/04-components/timeline/timeline.yml
+155
-169
155 additions, 169 deletions
source/_patterns/04-components/timeline/timeline.yml
with
185 additions
and
200 deletions
source/_patterns/04-components/timeline/timeline.twig
+
30
−
31
View file @
a49b5b78
...
...
@@ -5,42 +5,41 @@
{%
set
display_year
=
timeline_items
[
0
]
.
year
%}
<ol
class=
"
{{
modifier_classes
}}
"
>
{%
for
item
in
timeline_items
%}
{%
for
years
in
timeline_items
%}
{%
if
loop.index
==
1
or
item
.year
!=
display_year
%}
{%
if
loop.index
==
1
or
loop.index
==
2
or
loop.index
==
3
or
years
.year
!=
display_year
%}
<li>
<span
class=
"timeline-year"
>
{{
item.year
}}
</span>
<ol>
{%
endif
%}
{%
if
item.month
and
style
==
'month'
%}
<li>
<span
class=
"timeline-month"
>
{{
item.month
}}
</span>
<span
class=
"timeline-year"
>
{{
years.year
}}
</span>
<ol>
{%
endif
%}
{%
for
entry
in
item.entries
%}
<li
class=
"timeline-info"
>
{%
if
entry.image
%}
<img
src=
"
{{
entry.image
}}
"
alt=
""
class=
"timeline-photo"
/>
{%
endif
%}
<div
class=
"timeline-headline"
><strong>
{{
entry.headline
}}
</strong></div>
<p>
{{
entry.content
}}
</p>
</li>
{%
endfor
%}
{%
if
item.month
and
style
==
'month'
%}
{%
endif
%}
{%
for
months
in
years.month
%}
{%
if
style
==
'month'
%}
<li>
<span
class=
"timeline-month"
>
{{
months.name
}}
</span>
<ol>
{%
endif
%}
{%
for
item
in
months.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'
%}
</ol>
</li>
{%
endif
%}
{%
endfor
%}
{%
if
loop.index
==
1
or
loop.index
==
2
or
loop.index
==
3
or
years.year
!=
display_year
%}
</ol>
</li>
{%
endif
%}
{%
if
item.year
!=
display_year
%}
</ol>
</li>
{%
set
display_year
=
item.year
%}
{%
set
display_year
=
years.year
%}
{%
endif
%}
{%
endfor
%}
</ol>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
source/_patterns/04-components/timeline/timeline.yml
+
155
−
169
View file @
a49b5b78
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment