krata/_includes/sidebar.html

80 lines
2.5 KiB
HTML
Raw Normal View History

2019-09-30 14:38:41 +02:00
<!--
The Side Bar
2020-01-02 14:17:49 +01:00
v2.0
https://github.com/cotes2020/jekyll-theme-chirpy
2019-09-30 14:38:41 +02:00
© 2017-2019 Cotes Chung
MIT License
-->
<div id="nav-wrapper">
<div id="profile-wrapper" class="d-flex flex-column">
<div id="avatar" class="d-flex justify-content-center">
2019-10-21 07:18:25 +02:00
<a href="{{ site.baseurl }}/" alt="avatar">
2020-01-05 21:11:30 +01:00
{% assign avatar_url = site.avatar %}
{% capture start %}{{ site.avatar | slice: 0 }}{% endcapture %}
{% if start == '/' %}
{% assign avatar_url = avatar_url | prepend: site.baseurl %}
2019-09-30 14:38:41 +02:00
{% endif %}
2020-02-13 22:37:59 +01:00
<img src="{{ avatar_url }}" alt="avatar">
2019-09-30 14:38:41 +02:00
</a>
</div>
<div class="profile-text mt-3">
<div id="site-title">
<a href="{{ site.baseurl }}/">{{- site.title -}}</a>
</div>
<div id="site-subtitle" class="font-italic">{{- site.tagline -}}</div>
</div>
2019-09-30 14:38:41 +02:00
</div>
<ul class="nav flex-column">
2019-09-30 14:38:41 +02:00
{% assign page_urls = page.url | split: "/" %}
2020-02-16 20:36:54 +01:00
{% for item in site.data.tabs %}
2019-09-30 14:38:41 +02:00
{% assign ref = site.baseurl | append: "/" %}
{% if item.path %}
{% assign ref = ref | append: item.path | append: "/" %}
{% if item.url %}
{% assign ref = ref | append: item.url | append: "/" %}
{% endif %}
{% endif %}
<li class="nav-item d-flex justify-content-center
2020-02-08 19:57:45 +01:00
{% if item.url == page_urls.last
or item.name == page.tab_active
or item.name == "Home" and page.layout == "home" %}active{% endif %}">
<a href="{{ ref }}" class="nav-link d-flex justify-content-center align-items-center w-100">
<i class="fa-fw {{ item.icon }} ml-3 mr-3 unloaded"></i>
<span>{{ item.name | upcase }}</span>
2019-09-30 14:38:41 +02:00
</a>
</li> <!-- .nav-item -->
{% endfor %}
</ul> <!-- ul.nav.flex-column -->
</div><!-- #nav-wrapper -->
2019-09-30 14:38:41 +02:00
2020-02-13 15:28:33 +01:00
<div class="sidebar-bottom d-flex justify-content-around mt-4">
2020-02-13 10:46:05 +01:00
{% if site.theme_mode == "dual" %}
2020-02-16 20:06:38 +01:00
<span id="mode-toggle-wrapper">
2020-02-14 16:36:38 +01:00
{% include mode-toggle.html %}
2020-02-13 10:46:05 +01:00
</span>
{% endif %}
2020-02-13 10:46:05 +01:00
2019-09-30 14:38:41 +02:00
<a href="https://github.com/{{ site.github.username }}" target="_blank">
<i class="fab fa-github-alt"></i>
2019-09-30 14:38:41 +02:00
</a>
<a href="https://twitter.com/{{ site.twitter.username }}" target="_blank">
<i class="fab fa-twitter"></i>
</a>
{% assign email = site.social.email | split: '@' %}
<a href="javascript:window.open('mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@'))">
<i class="fas fa-envelope"></i>
</a>
<a href="{{ site.baseurl }}/feed.xml" target="_blank">
<i class="fas fa-rss"></i>
</a>
2020-02-13 10:46:05 +01:00
2019-09-30 14:38:41 +02:00
</div>