Skip to content
Snippets Groups Projects
Verified Commit b078b2c4 authored by Huste, Tobias's avatar Huste, Tobias :rabbit:
Browse files

Fix roadmap month appearing twice

In case multiple elements with several dates in one month are inserted,
an additional month layer got added to the roadmap. This changes
ensures, that the month is only displayed once.
parent 78f6f8fc
No related branches found
No related tags found
1 merge request!93Fix roadmap month appearing twice
......@@ -12,6 +12,7 @@
{%- assign unique_dates = sorted_roadmap | map: "date" | uniq | sort -%}
{%- assign year = "1999" -%}
{%- assign month = "None" %}
<section>
<div class="timeline">
......@@ -46,10 +47,16 @@
<h1 class="text-center {{ hidden_class }}">{{ newyear }}</h1>
{%- endif -%}
{% assign roadmap_month = date_item | date: "%B" %}
{%- if month != roadmap_month -%}
<div class="roadmap-month {{ hidden_class }}">
<div class="timeline-bubble"></div>
<h2>{{ date_item | date: "%B %Y" }}</h2>
</div>
{%- else -%}
<div class="p-3"></div>
{%- endif -%}
{% assign month = roadmap_month %}
<div class="roadmap-item {{ hidden_class }}">
{%- for roadmap_item in sorted_roadmap_by_date -%}
......
---
date: 2020-10-01
date: 2020-10-15
title: Tasks in Oct 2020
service: cloud
---
......
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