mirror of
https://github.com/TeamNewPipe/website
synced 2025-10-06 00:22:38 +02:00
81 lines
3.1 KiB
HTML
81 lines
3.1 KiB
HTML
{% comment %}DEFAULT VALUES WHEN NO CATEGORY WAS PASSED{% endcomment %}
|
|
{%- if include.categories -%}
|
|
{%- assign categories = include.categories -%}
|
|
{%- else -%}
|
|
{%- assign categories = "download, player, bugs, install" | split: ", " -%}
|
|
{%- 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">
|
|
{%- for item in faqs -%}
|
|
{%- assign printed = "false" -%}
|
|
{%- for category in item.categories %}
|
|
{%- for c in categories %}
|
|
{%- if category == c and printed == "false" %}
|
|
{%- assign printed = "true" -%}
|
|
{%- if item.type == "tutorial" %}
|
|
<a href="{{ item.url }}">
|
|
{%- endif %}
|
|
<article class="col-md-8 col-md-offset-2 tile" id="{{ item.relative_path | split: "/" | last | replace: ".html", "" }}">
|
|
<header class="tile-head">
|
|
<span class="tile-type {{ item.type }}">
|
|
<i class="fa fa-
|
|
{%- if item.type == "info" -%}info-circle{%- else if item.type == "tutorial" -%}graduation-cap{%- endif -%}"></i>
|
|
</span>
|
|
<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>
|
|
</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>
|