Commit 058b3c0c authored by tron's avatar tron
Browse files

- temp bug fix

parent 1e401175
Pipeline #32608 passed with stage
in 12 minutes and 24 seconds
---
layout: base
---
<h1>{{ page.title }}</h1>
{% if page.topic-status == "open" %}
<hr/>
<div id="react-placeholder-topicSelector" status="{{ page.topic-status }}"></div>
<hr/>
{% endif %}
{% assign topics = site.topics %}
{% if page.topic-status == "open" %}
{% assign array = site.emptyArray %}
{% capture now %}{{ 'now' | date: '%s' | plus: 0 }}{% endcapture %}
{% for topic in topics %}
{% capture expiration-date %}{{ topic.expiration-date | date: '%s' | plus: 0 }}{% endcapture %}
{% unless topic.expiration-date and expiration-date < now %}
{% assign array = array | push: topic %}
{% endunless %}
{% endfor %}
{% assign topics = array %}
{% endif %}
<div class="column-layout">
<!-- expired topics -->
{% if page.topic-status == "expired" %}
{% capture now %}{{ 'now' | date: '%s' | plus: 0 }}{% endcapture %}
{% for topic in site.topics %}
{% capture expiration-date %}{{ topic.expiration-date | date: '%s' | plus: 0 }}{% endcapture %}
{% if topic.expiration-date and expiration-date < now %}
{% include block image=topic.image title=topic.title teaser=topic.teaser url=topic.url %}
{% endif %}
{% endfor %}
{% else %}
{% assign topics = topics | where:"status",page.topic-status | sort:"date" | reverse %}
{% assign topTopics = site.emptyArray %}
{% assign otherTopics = site.emptyArray %}
{% for topic in topics %}
{% if topic.put-on-top-of-the-list == true %}
{% assign topTopics = topTopics | push: topic %}
{% else %}
{% assign otherTopics = otherTopics | push: topic %}
{% endif %}
{% endfor %}
{% assign topics = topTopics | concat: otherTopics %}
{% assign counter = 0 %}
{% for topic in topics %}
{% for t in topic.topic-category %}
{% assign typeClasses = "topic" %}
{% assign typeClasses = typeClasses | append: " " | append: t.focus | append: " " | append: t.level | append: " " | append: t.type %}
{% endfor %}
{% assign title = topic.title %}
{% if t.put-on-top-of-the-list == true %}
{% assign title = title | append: " &#9733;" %}
{% endif %}
{% include block class=typeClasses image=topic.image title=title teaser=topic.teaser url=topic.url %}
{% assign counter = counter | plus: 1 %}
{% endfor %}
{% include placeholderBlocks itemListLength=counter hiddenItems=0 %}
{% endif %}
</div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment