topics 4.68 KB
Newer Older
1 2 3 4
<!-- Filter active topics. Further filter tags when used.  -->
{% if include.tags %}
{% assign taged = include.tags | remove: " " | split: "," %}
    {% assign itemlist = '' | split: ',' %}
Marvin Thäns's avatar
Marvin Thäns committed
5 6
    {% for d in taged %}
      {% assign tag = d | remove: '"'| remove: ',,'| remove: "["| remove: "]"%}
tron's avatar
tron committed
7 8 9 10 11
        {% if include.status%}
          {% assign temp = site.topics  | where: "tags", tag | where: "status",include.status %}
        {% else %}
          {% assign temp = site.topics  | where: "tags", tag %}
        {% endif %}
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
        {% assign itemlist = itemlist | concat: temp | sort: 'date' | reverse | sort:"put-on-top-of-the-list" | reverse%}
    {% endfor %}
{% else %}
{% assign itemlist = site.topics  | where: "status",include.status | sort: 'date' | reverse | sort:"put-on-top-of-the-list" | reverse%}
{% endif %}

<!-- Display data -->
{% if itemlist.size > 0 %}
{% if include.headline %}
    {{include.headline}}
{% else %}
### {{ include.status | capitalize }}
{% endif %}


{% assign counter = 1 %}
{% assign hiddenItems = 0 %}
<div class="column-layout">
    {% for topic in itemlist %}
      {% assign typeClasses = "topic " %}
                   {% assign typeDescription = "unknown format" %}
                   {% if topic.type-mcs-bachelor-project == true %}
                       {% assign typeClasses = typeClasses | append: " " | append: "type-mcsp" %}
                       {% assign typeDescription = "Bachelor Project" %}
                   {% endif %}
                   {% if topic.type-mcs-bachelor-thesis == true %}
                       {% assign typeClasses = typeClasses | append: " " | append: "type-mcst" %}
                       {% assign typeDescription = "Bachelor Thesis" %}
                   {% endif %}
                   {% if topic.type-hci-master-project == true %}
                       {% assign typeClasses = typeClasses | append: " " | append: "type-hcip" %}
                       {% assign typeDescription = "Master Project" %}
                   {% endif %}
                   {% if topic.type-hci-master-thesis == true %}
                       {% assign typeClasses = typeClasses | append: " " | append: "type-hcit" %}
                       {% assign typeDescription = "Master Thesis" %}
                   {% endif %}
                   {% if topic.type-cs-bachelor-thesis == true %}
                       {% assign typeClasses = typeClasses | append: " " | append: "type-csbt" %}
                       {% assign typeDescription = "Bachelor Thesis" %}
                   {% endif %}
                   {% if topic.type-cs-master-project == true %}
                       {% assign typeClasses = typeClasses | append: " " | append: "type-csmp" %}
                       {% assign typeDescription = "Master Project" %}
                   {% endif %}
                   {% if topic.type-cs-master-thesis == true %}
                       {% assign typeClasses = typeClasses | append: " " | append: "type-csmt" %}
                       {% assign typeDescription = "Master Thesis" %}
                   {% endif %}
                   {% if topic.type-ge-bachelor-thesis == true %}
                       {% assign typeClasses = typeClasses | append: " " | append: "type-gebt" %}
                       {% assign typeDescription = "Bachelor Thesis" %}
                   {% endif %}
                   {% if topic.type-phd-project == true %}
                       {% assign typeClasses = typeClasses | append: " " | append: "type-phd" %}
                       {% assign typeDescription = "Phd Project" %}
                   {% endif %}
                   {% if topic.type-industry == true %}
                       {% assign typeClasses = typeClasses | append: " " | append: "type-ind" %}
                   {% endif %}
                   {% if topic.type-industry-coop == true %}
                       {% assign typeClasses = typeClasses | append: " " | append: "type-indcoop" %}
                   {% endif %}
                   {% assign title = topic.title %}
                   {% if topic.put-on-top-of-the-list == true %}
                       {% assign title = title | append: " &#9733;" %}
                   {% endif %}
tron's avatar
tron committed
79
                   {% if include.status%}
80
                   {% include detailed-topic class=typeClasses image=topic.image title=title teaser=topic.teaser url=topic.url assigned-to=topic.assigned-to type=typeDescription%}
tron's avatar
tron committed
81
                   {% endif %}
82
    {% endfor %}
tron's avatar
tron committed
83 84 85 86
                    {% if include.status%}
                      {% include placeholderBlocks maxItems= include.maxItems itemListLength=itemlist.size hiddenItems=hiddenItems%}
                    {% endif %}

87 88 89 90 91
</div>
<!--{% unless include.noToggle %}
<div id="react-placeholder-toggleVisibility"></div>
{% endunless %}-->
{% endif %}