1+ <!-- The Side Bar -->
2+
3+ < aside aria-label ="Sidebar " id ="sidebar " class ="d-flex flex-column align-items-end ">
4+ < header class ="profile-wrapper ">
5+ < a href ="{{ '/' | relative_url }} " id ="avatar " class ="rounded-circle ">
6+ {%- if site.avatar != empty and site.avatar -%}
7+ {%- capture avatar_url -%}
8+ {% include media-url.html src=site.avatar %}
9+ {%- endcapture -%}
10+ < img src ="{{- avatar_url -}} " width ="112 " height ="112 " alt ="avatar " onerror ="this.style.display='none' ">
11+ {%- endif -%}
12+ </ a >
13+
14+ < a class ="site-title d-block " href ="{{ '/' | relative_url }} "> {{ site.title }}</ a >
15+ < p class ="site-subtitle fst-italic mb-0 "> {{ site.tagline }}</ p >
16+ </ header >
17+ <!-- .profile-wrapper -->
18+
19+ < nav class ="flex-column flex-grow-1 w-100 ps-0 ">
20+ < ul class ="nav ">
21+ <!-- home -->
22+ < li class ="nav-item{% if page.layout == 'home' %}{{ " active " }}{% endif %}">
23+ < a href ="{{ '/' | relative_url }} " class ="nav-link ">
24+ < i class ="fa-fw fas fa-home "> </ i >
25+ < span > {{ site.data.locales[include.lang].tabs.home | upcase }}</ span >
26+ </ a >
27+ </ li >
28+ <!-- the real tabs -->
29+ {% for tab in site.tabs %}
30+ < li class ="nav-item{% if tab.url == page.url %}{{ " active " }}{% endif %}">
31+ < a href ="{{ tab.url | relative_url }} " class ="nav-link ">
32+ < i class ="fa-fw {{ tab.icon }} "> </ i >
33+ {% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
34+
35+ < span > {{ site.data.locales[include.lang].tabs.[tab_name] | default: tab.title | upcase }}</ span >
36+ </ a >
37+ </ li >
38+ <!-- .nav-item -->
39+ {% endfor %}
40+ </ ul >
41+ </ nav >
42+
43+ < div class ="sidebar-bottom d-flex flex-wrap align-items-center w-100 ">
44+ <!-- Light and dark mode button -->
45+ {% unless site.theme_mode %}
46+ < button type ="button " class ="btn btn-link nav-link " aria-label ="Switch Mode " id ="mode-toggle ">
47+ < i class ="fas fa-adjust "> </ i >
48+ </ button >
49+
50+ <!-- small dot separating dark mode and socials -->
51+ {% if site.data.contact.size > 0 %}
52+ < span class ="icon-border "> </ span >
53+ {% endif %}
54+ {% endunless %}
55+
56+ <!-- the Socials + Email + RSS buttons -->
57+ {% for entry in site.data.contact %}
58+ {%- assign url = null -%}
59+
60+ {% case entry.type %}
61+ {% when 'github', 'twitter' %}
62+ {%- unless site[entry.type].username -%}
63+ {%- continue -%}
64+ {%- endunless -%}
65+ {%- capture url -%}
66+ https://{{ entry.type }}.com/{{ site[entry.type].username }}
67+ {%- endcapture -%}
68+ {% when 'email' %}
69+ {%- unless site.social.email -%}
70+ {%- continue -%}
71+ {%- endunless -%}
72+ {%- assign email = site.social.email | split: '@' -%}
73+ {%- capture url -%}
74+ javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
75+ {%- endcapture -%}
76+ {% when 'rss' %}
77+ {% assign url = '/feed.xml' | relative_url %}
78+ {% else %}
79+ {% assign url = entry.url %}
80+ {% endcase %}
81+
82+ {% if url %}
83+ < a
84+ href ="{{ url }} "
85+ aria-label ="{{ entry.type }} "
86+ {% assign link_types = '' %}
87+
88+ {% unless entry.noblank %}
89+ target ="_blank "
90+ {% assign link_types = 'noopener noreferrer ' %}
91+ {% endunless %}
92+
93+ {% if entry.type == 'mastodon ' %}
94+ {% assign link_types = link_types | append: ' me' | strip %}
95+ {% endif %}
96+
97+ {% unless link_types == empty %}
98+ rel ="{{ link_types }} "
99+ {% endunless %}
100+ >
101+ < i class ="{{ entry.icon }} "> </ i >
102+ </ a >
103+ {% endif %}
104+ {% endfor %}
105+ </ div >
106+ <!-- .sidebar-bottom -->
107+ </ aside >
108+ <!-- #sidebar -->
0 commit comments