web/_includes/topbar.html

78 lines
2.6 KiB
HTML
Raw Normal View History

<!-- The Top Bar -->
2021-01-25 01:20:51 +03:00
<header id="topbar-wrapper" aria-label="Top Bar">
<div
id="topbar"
class="d-flex align-items-center justify-content-between px-lg-3 h-100"
>
<nav id="breadcrumb" aria-label="Breadcrumb">
{% assign paths = page.url | split: '/' %}
{% if paths.size == 0 or page.layout == 'home' %}
<!-- index page -->
<span>{{ site.data.locales[include.lang].tabs.home | capitalize }}</span>
{% else %}
{% for item in paths %}
{% if forloop.first %}
<span>
<a href="{{ '/' | relative_url }}">
{{- site.data.locales[include.lang].tabs.home | capitalize -}}
</a>
</span>
{% elsif forloop.last %}
{% if page.collection == 'tabs' %}
<span>{{ site.data.locales[include.lang].tabs[item] | default: page.title }}</span>
{% else %}
<span>{{ page.title }}</span>
{% endif %}
{% elsif page.layout == 'category' or page.layout == 'tag' %}
<span>
<a href="{{ item | append: '/' | relative_url }}">
{{- site.data.locales[include.lang].tabs[item] | default: page.title -}}
</a>
</span>
{% endif %}
{% endfor %}
{% endif %}
</nav>
<!-- endof #breadcrumb -->
2019-09-30 15:38:41 +03:00
<button type="button" id="sidebar-trigger" class="btn btn-link">
<i class="fas fa-bars fa-fw"></i>
</button>
2019-09-30 15:38:41 +03:00
<div id="topbar-title">
2020-11-21 23:24:09 +03:00
{% if page.layout == 'home' %}
{{- site.data.locales[include.lang].title | default: site.title -}}
{% elsif page.collection == 'tabs' or page.layout == 'page' %}
2021-07-20 20:01:09 +03:00
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
{{- site.data.locales[include.lang].tabs[tab_key] | default: page.title -}}
2020-11-21 23:24:09 +03:00
{% else %}
{{- site.data.locales[include.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>
<button type="button" id="search-trigger" class="btn btn-link">
<i class="fas fa-search fa-fw"></i>
</button>
<search class="align-items-center ms-3 ms-lg-0">
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[include.lang].search.hint | capitalize }}..."
>
</search>
<button type="button" class="btn btn-link text-decoration-none" id="search-cancel">
{{- site.data.locales[include.lang].search.cancel -}}
</button>
2019-09-30 15:38:41 +03:00
</div>
</header>