web/_includes/topbar.html

76 lines
2.3 KiB
HTML
Raw Normal View History

2019-09-30 15:38:41 +03:00
<!--
The Top Bar
-->
2021-01-25 01:20:51 +03:00
2020-01-03 16:22:11 +03:00
<div id="topbar-wrapper" class="row justify-content-center topbar-down">
<div id="topbar" class="col-11 d-flex h-100 align-items-center justify-content-between">
2019-09-30 15:38:41 +03:00
<span id="breadcrumb">
{% assign paths = page.url | split: '/' %}
2021-07-19 20:38:25 +03:00
{% if paths.size == 0 or page.layout == 'home' %}
<!-- index page -->
<span>{{ site.data.locales[lang].tabs.home | capitalize }}</span>
2021-07-20 20:01:09 +03:00
{% else %}
{% for item in paths %}
{% if forloop.first %}
<span>
2021-07-20 20:01:09 +03:00
<a href="{{ '/' | relative_url }}">
{{ site.data.locales[lang].tabs.home | capitalize }}
2021-07-20 20:01:09 +03:00
</a>
</span>
{% elsif forloop.last %}
2021-07-20 20:01:09 +03:00
{% if page.collection == 'tabs' %}
<span>{{ site.data.locales[lang].tabs[item] | default: page.title }}</span>
2021-07-20 20:01:09 +03:00
{% else %}
<span>{{ page.title }}</span>
{% endif %}
2021-07-20 20:01:09 +03:00
{% else %}
{% unless page.layout == 'post' %}
<span>
<a href="{{ item | relative_url }}">
{{ site.data.locales[lang].tabs[item] | default: page.title }}
2021-07-20 20:01:09 +03:00
</a>
</span>
{% endunless %}
2019-09-30 15:38:41 +03:00
{% endif %}
2019-09-30 15:38:41 +03:00
{% endfor %}
{% endif %}
2019-09-30 15:38:41 +03:00
</span><!-- endof #breadcrumb -->
<i id="sidebar-trigger" class="fas fa-bars fa-fw"></i>
<div id="topbar-title">
2020-11-21 23:24:09 +03:00
{% if page.layout == 'home' %}
{{- site.data.locales[lang].title | default: site.title -}}
2021-07-20 20:01:09 +03:00
{% elsif page.collection == 'tabs' %}
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
{{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
2020-11-21 23:24:09 +03:00
{% else %}
{{- site.data.locales[lang].layout[page.layout] | default: page.layout | capitalize -}}
2020-11-21 23:24:09 +03:00
{% endif %}
2019-09-30 15:38:41 +03:00
</div>
<i id="search-trigger" class="fas fa-search fa-fw"></i>
<span id="search-wrapper" class="align-items-center">
2019-09-30 15:38:41 +03:00
<i class="fas fa-search fa-fw"></i>
<input class="form-control" id="search-input" type="search"
aria-label="search" autocomplete="off" placeholder="{{ site.data.locales[lang].search.hint | capitalize }}...">
<i class="fa fa-times-circle fa-fw" id="search-cleaner"></i>
2019-09-30 15:38:41 +03:00
</span>
<span id="search-cancel" >{{ site.data.locales[lang].search.cancel }}</span>
2019-09-30 15:38:41 +03:00
</div>
</div>