web/_includes/sidebar.html

95 lines
3.2 KiB
HTML
Raw Normal View History

2019-09-30 15:38:41 +03:00
<!--
The Side Bar
-->
2021-07-20 20:01:09 +03: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 15:38:41 +03:00
</a>
</div>
<div class="site-title mt-3">
2021-07-20 20:01:09 +03:00
<a href="{{ '/' | relative_url }}">{{ site.title }}</a>
</div>
2021-07-20 20:01:09 +03:00
<div class="site-subtitle font-italic">{{ site.tagline }}</div>
</div><!-- .profile-wrapper -->
<ul class="w-100">
2021-07-20 20:01:09 +03:00
2020-11-21 23:24:09 +03:00
<!-- home -->
<li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
<a href="{{ '/' | relative_url }}" class="nav-link">
2020-11-21 23:24:09 +03: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 23:24:09 +03: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 23:24:09 +03:00
<i class="fa-fw {{ tab.icon }} ml-xl-3 mr-xl-3 unloaded"></i>
2021-07-20 20:01:09 +03:00
{% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
2021-08-03 17:55:35 +03:00
<span>{{ site.data.locales[lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
2019-09-30 15:38:41 +03:00
</a>
</li> <!-- .nav-item -->
2020-11-21 23:24:09 +03:00
{% endfor %}
2019-09-30 15:38:41 +03:00
</ul> <!-- ul.nav.flex-column -->
2021-09-21 17:37:28 +03:00
<div class="sidebar-bottom mt-auto d-flex flex-wrap justify-content-center align-items-center">
{% 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 15:38:41 +03:00
{% if url %}
<a href="{{ url }}" aria-label="{{ entry.type }}"
{% unless site.theme_mode %}class="order-{{ forloop.index | plus: 2 }}"{% endunless %}
{% unless entry.noblank %}target="_blank" rel="noopener"{% endunless %}>
<i class="{{ entry.icon }}"></i>
</a>
{% endif %}
{% endfor %}
2020-02-13 12:46:05 +03:00
{% unless site.theme_mode %}
{% if site.data.contact.size > 0 %}
<span class="icon-border order-2"></span>
{% endif %}
2020-02-13 12:46:05 +03:00
<span id="mode-toggle-wrapper" class="order-1" tabindex="0">
{% include mode-toggle.html %}
</span>
{% endunless %}
</div> <!-- .sidebar-bottom -->
2020-02-13 12:46:05 +03:00
</div><!-- #sidebar -->