|
6 | 6 | MIT License |
7 | 7 | --> |
8 | 8 |
|
9 | | -<div id="nav-wrapper"> |
| 9 | +<div id="sidebar" class="d-flex flex-column align-items-end"> |
10 | 10 |
|
11 | | - <div id="profile-wrapper" class="d-flex flex-column"> |
12 | | - <div id="avatar" class="d-flex justify-content-center"> |
13 | | - <a href="{{ site.baseurl }}/" alt="avatar"> |
| 11 | + <div class="profile-wrapper text-center"> |
| 12 | + <div id="avatar"> |
| 13 | + <a href="{{ site.baseurl }}/" alt="avatar" class="mx-auto"> |
14 | 14 | {% assign avatar_url = site.avatar %} |
15 | 15 | {% capture start %}{{ site.avatar | slice: 0 }}{% endcapture %} |
16 | 16 | {% if start == '/' %} |
|
20 | 20 | </a> |
21 | 21 | </div> |
22 | 22 |
|
23 | | - <div class="profile-text mt-3"> |
24 | | - <div class="site-title"> |
25 | | - <a href="{{ '/' | relative_url }}">{{- site.title -}}</a> |
26 | | - </div> |
27 | | - <div class="site-subtitle font-italic">{{- site.tagline -}}</div> |
| 23 | + <div class="site-title mt-3"> |
| 24 | + <a href="{{ '/' | relative_url }}">{{- site.title -}}</a> |
28 | 25 | </div> |
29 | | - </div><!-- #profile-wrapper --> |
30 | 26 |
|
31 | | - <ul class="nav flex-column"> |
| 27 | + <div class="site-subtitle font-italic">{{- site.tagline -}}</div> |
| 28 | + |
| 29 | + </div><!-- .profile-wrapper --> |
| 30 | + |
| 31 | + <ul class="w-100"> |
32 | 32 | <!-- home --> |
33 | | - <li class="nav-item d-flex justify-content-center {% if page.layout == 'home' %}active{% endif %}"> |
34 | | - <a href="{{ '/' | relative_url }}" class="nav-link d-flex justify-content-center align-items-center w-100"> |
| 33 | + <li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}"> |
| 34 | + <a href="{{ '/' | relative_url }}" class="nav-link"> |
35 | 35 | <i class="fa-fw fas fa-home ml-xl-3 mr-xl-3 unloaded"></i> |
36 | 36 | <span>{{ "HOME" }}</span> |
37 | 37 | </a> |
38 | 38 | </li> |
39 | 39 | <!-- the real tabs --> |
40 | 40 | {% for tab in site.tabs %} |
41 | | - <li class="nav-item d-flex justify-content-center {% if tab.url == page.url %}active{% endif %}"> |
42 | | - <a href="{{ tab.url | relative_url }}" class="nav-link d-flex justify-content-center align-items-center w-100"> |
| 41 | + <li class="nav-item{% if tab.url == page.url %}{{ " active" }}{% endif %}"> |
| 42 | + <a href="{{ tab.url | relative_url }}" class="nav-link"> |
43 | 43 | <i class="fa-fw {{ tab.icon }} ml-xl-3 mr-xl-3 unloaded"></i> |
44 | 44 | <span>{{ tab.title | upcase }}</span> |
45 | 45 | </a> |
|
48 | 48 |
|
49 | 49 | </ul> <!-- ul.nav.flex-column --> |
50 | 50 |
|
51 | | -</div><!-- #nav-wrapper --> |
| 51 | + <div class="sidebar-bottom mt-auto d-flex flex-wrap justify-content-center"> |
| 52 | + |
| 53 | + {% for entry in site.data.contact %} |
| 54 | + {% capture url %} |
| 55 | + {%- if entry.type == 'github' -%} |
| 56 | + https://github.com/{{ site.github.username }} |
| 57 | + {%- elsif entry.type == 'twitter' -%} |
| 58 | + https://twitter.com/{{ site.twitter.username }} |
| 59 | + {%- elsif entry.type == 'email' -%} |
| 60 | + {% assign email = site.social.email | split: '@' %} |
| 61 | + javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@') |
| 62 | + {%- elsif entry.type == 'rss' -%} |
| 63 | + {{ "/feed.xml" | relative_url }} |
| 64 | + {%- else -%} |
| 65 | + {{ entry.url }} |
| 66 | + {%- endif -%} |
| 67 | + {% endcapture %} |
52 | 68 |
|
53 | | -<div class="sidebar-bottom d-flex flex-wrap justify-content-around mt-4"> |
| 69 | + {% if url %} |
| 70 | + <a href="{{ url }}" aria-label="{{ entry.type }}" |
| 71 | + {% unless site.theme_mode %}class="order-{{ forloop.index | plus: 2 }}"{% endunless %} |
| 72 | + {% unless entry.noblank %}target="_blank" rel="noopener"{% endunless %}> |
| 73 | + <i class="{{ entry.icon }}"></i> |
| 74 | + </a> |
| 75 | + {% endif %} |
| 76 | + |
| 77 | + {% endfor %} |
54 | 78 |
|
55 | | - {% unless site.theme_mode %} |
56 | | - <span id="mode-toggle-wrapper"> |
57 | | - {% include mode-toggle.html %} |
58 | | - </span> |
59 | | - <span class="icon-border"></span> |
60 | | - {% endunless %} |
| 79 | + {% unless site.theme_mode %} |
| 80 | + {% if site.data.contact.size > 0 %} |
| 81 | + <span class="icon-border order-2"></span> |
| 82 | + {% endif %} |
61 | 83 |
|
62 | | - {% for entry in site.data.contact %} |
63 | | - {% capture url %} |
64 | | - {%- if entry.type == 'github' -%} |
65 | | - https://github.com/{{ site.github.username }} |
66 | | - {%- elsif entry.type == 'twitter' -%} |
67 | | - https://twitter.com/{{ site.twitter.username }} |
68 | | - {%- elsif entry.type == 'email' -%} |
69 | | - {% assign email = site.social.email | split: '@' %} |
70 | | - javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@') |
71 | | - {%- elsif entry.type == 'rss' -%} |
72 | | - {{ "/feed.xml" | relative_url }} |
73 | | - {%- else -%} |
74 | | - {{ entry.url }} |
75 | | - {%- endif -%} |
76 | | - {% endcapture %} |
| 84 | + <span id="mode-toggle-wrapper" class="order-1"> |
| 85 | + {% include mode-toggle.html %} |
| 86 | + </span> |
| 87 | + {% endunless %} |
77 | 88 |
|
78 | | - {% if url %} |
79 | | - <a href="{{ url }}" aria-label="{{ entry.type }}" {% unless entry.noblank %}target="_blank" rel="noopener"{% endunless %}> |
80 | | - <i class="{{ entry.icon }}"></i> |
81 | | - </a> |
82 | | - {% endif %} |
83 | | - {% endfor %} |
| 89 | + </div> <!-- .sidebar-bottom --> |
84 | 90 |
|
85 | | -</div> |
| 91 | +</div><!-- #sidebar --> |
0 commit comments