2018-05-08 09:58:21 +02:00
{% comment %}DEFAULT VALUES WHEN NO CATEGORY WAS PASSED{% endcomment %}
{%- if include.categories -%}
{%- assign categories = include.categories -%}
{%- else -%}
2020-07-02 19:22:15 +02:00
{%- assign categories = "download, player, bugs, install" | split: ", " -%}
2018-05-08 09:58:21 +02:00
{%- endif -%}
{% comment %}DEFAULT VALUES WHEN NO TYPE/COLLECTION WAS PASSED{% endcomment %}
{%- if include.type -%}
{%- assign faqs = [] -%}
{%- for collection in site.collections -%}
{%- for lab in include.type -%}
{%- if lab == collection.label -%}
{%- assign faqs = faqs | concat: site[lab] -%}
{%- endif -%}
{%- endfor -%}
{%- endfor -%}
{%- else -%}
{%- assign faqs = site.faq | concat: site.tutorials -%}
{%- endif -%}
{% comment %}DEFAULT AND CUSTOM VALUES FOR BACKLINK AND BACKTITLE{% endcomment %}
{% if include.type == "tutorial" %}
{% assign backTitle="Tutorials" %}
{% assign backLink="/" %}
{% else %}
{% assign backTitle="FAQ" %}
{% assign backLink="../" %}
{% endif %}
{% if include.backLink %}
{% assign backLink = include.backLink %}
{% endif %}
{% if include.backTitle %}
{% assign backTitle = include.backTitle %}
{% endif %}
< div class = "row" >
< div class = "col-xs-12 col-md-10 col-md-offset-1" >
< a href = "{{ backLink }}" class = "faq-back-link" data-toggle = "tooltip" data-placement = "bottom" title = 'GO back to FAQ & Tutorials' >
< i class = "fa fa-chevron-left" > < / i >
{{ backTitle }}
< / a >
< h3 > {{ include.name }}< / h3 >
< / div >
< / div >
< div class = "tiles-container tiles faq-tiles" >
< div class = "row" >
2018-10-12 09:21:52 +02:00
{%- for item in faqs -%}
{%- assign printed = "false" -%}
2018-05-08 09:58:21 +02:00
{%- for category in item.categories %}
{%- for c in categories %}
2018-08-26 21:42:24 +02:00
{%- if category == c and printed == "false" %}
2018-10-12 09:21:52 +02:00
{%- assign printed = "true" -%}
2018-05-08 09:58:21 +02:00
{%- if item.type == "tutorial" %}
< a href = "{{ item.url }}" >
{%- endif %}
2020-07-02 19:22:15 +02:00
< article class = "col-md-8 col-md-offset-2 tile" id = "{{ item.relative_path | split: " / " | last | replace: " . html " , " " } } " >
2018-05-08 09:58:21 +02:00
< header class = "tile-head" >
2020-07-02 19:22:15 +02:00
< span class = "tile-type {{ item.type }}" >
2018-05-08 09:58:21 +02:00
< i class = "fa fa-
{%- if item.type == "info" -%}info-circle{%- else if item.type == "tutorial" -%}graduation-cap{%- endif -%}">< / i >
< / span >
2020-07-02 19:22:15 +02:00
< div class = "tile-title" > {{ item.title }}< / div >
< span class = "tile-anchor" title = "Copy link to this {% if item.type == " info " % } FAQ entry { % else % } tutorial { % endif % } " > < i class = "fa fa-link fa-flip-horizontal" > < / i > < / span >
2018-05-08 09:58:21 +02:00
< / header >
{%- if item.type != "tutorial" -%}
< div class = "tile-body" >
{{ item.content }}
< / div >
{%- endif %}
< / article >
{%- if item.type == "tutorial" %}
< / a >
{%- endif %}
{%- endif %}
{%- endfor -%}
{%- endfor %}
{%- endfor %}
< / div >
< / div >