krata/_includes/sidebar.html

94 lines
3.1 KiB
HTML
Raw Normal View History

2019-09-30 14:38:41 +02:00
<!--
The Side Bar
-->
2021-07-20 19:01:09 +02:00
<div id="sidebar" class="d-flex flex-column align-items-end" lang="{{lang}}">
<div class="profile-wrapper text-center">
<div id="avatar">
<a href="{{ '/' | relative_url }}" alt="avatar" class="mx-auto">
{% if site.avatar != '' and site.avatar %}
{% capture avatar_url %}
{%- if site.avatar contains '://' -%}
{{ site.avatar }}
{%- elsif site.img_cdn != '' and site.img_cdn -%}
{{ site.avatar | prepend: site.img_cdn }}
{%- else -%}
{{ site.avatar | relative_url }}
{%- endif -%}
{% endcapture %}
<img src="{{ avatar_url }}" alt="avatar" onerror="this.style.display='none'">
{% endif %}
2019-09-30 14:38:41 +02:00
</a>
</div>
<div class="site-title mt-3">
2021-07-20 19:01:09 +02:00
<a href="{{ '/' | relative_url }}">{{ site.title }}</a>
</div>
2021-07-20 19:01:09 +02:00
<div class="site-subtitle font-italic">{{ site.tagline }}</div>
</div><!-- .profile-wrapper -->
<ul class="w-100">
2021-07-20 19:01:09 +02:00
2020-11-21 21:24:09 +01:00
<!-- home -->
<li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
<a href="{{ '/' | relative_url }}" class="nav-link">
2020-11-21 21:24:09 +01:00
<i class="fa-fw fas fa-home ml-xl-3 mr-xl-3 unloaded"></i>
<span>{{ site.data.locales[lang].tabs.home | upcase }}</span>
2020-11-21 21:24:09 +01:00
</a>
</li>
<!-- the real tabs -->
{% for tab in site.tabs %}
<li class="nav-item{% if tab.url == page.url %}{{ " active" }}{% endif %}">
<a href="{{ tab.url | relative_url }}" class="nav-link">
2020-11-21 21:24:09 +01:00
<i class="fa-fw {{ tab.icon }} ml-xl-3 mr-xl-3 unloaded"></i>
2021-07-20 19:01:09 +02:00
{% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
2021-08-03 16:55:35 +02:00
<span>{{ site.data.locales[lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
2019-09-30 14:38:41 +02:00
</a>
</li> <!-- .nav-item -->
2020-11-21 21:24:09 +01:00
{% endfor %}
2019-09-30 14:38:41 +02:00
</ul> <!-- ul.nav.flex-column -->
2021-09-21 16:37:28 +02:00
<div class="sidebar-bottom mt-auto d-flex flex-wrap justify-content-center align-items-center">
{% unless site.theme_mode %}
<a id="mode-toggle-wrapper" tabindex="0" onclick="flipMode()">
<i class="mode-toggle fas fa-adjust"></i>
</a>
{% if site.data.contact.size > 0 %}
<span class="icon-border"></span>
{% endif %}
{% endunless %}
{% for entry in site.data.contact %}
{% capture url %}
{%- if entry.type == 'github' -%}
https://github.com/{{ site.github.username }}
{%- elsif entry.type == 'twitter' -%}
https://twitter.com/{{ site.twitter.username }}
{%- elsif entry.type == 'email' -%}
{% assign email = site.social.email | split: '@' %}
javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
{%- elsif entry.type == 'rss' -%}
{{ "/feed.xml" | relative_url }}
{%- else -%}
{{ entry.url }}
{%- endif -%}
{% endcapture %}
2019-09-30 14:38:41 +02:00
{% if url %}
<a href="{{ url }}" aria-label="{{ entry.type }}"
{% unless entry.noblank %}target="_blank" rel="noopener"{% endunless %}>
<i class="{{ entry.icon }}"></i>
</a>
{% endif %}
{% endfor %}
2020-02-13 10:46:05 +01:00
</div> <!-- .sidebar-bottom -->
2020-02-13 10:46:05 +01:00
</div><!-- #sidebar -->