-
Notifications
You must be signed in to change notification settings - Fork 59
/
sidebar.html
47 lines (43 loc) · 2.26 KB
/
sidebar.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{% assign lang = site.active_lang %}
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<p class="speech">{{ site.hello[site.active_lang]}}</p>
</br>
<h1>
<a href="{{ site.baseurl }}">
{{ site.title }}
</a>
</h1>
<p class="lead">{{ site.description[lang] }}</p>
</div>
<nav class="sidebar-nav">
<a class="sidebar-nav-item{% if page.url == site.baseurl %} active{% endif %}" href="{{ site.baseurl }}/">Home</a>
{% assign pages_list = site.pages %}
{% assign written = "" | split: '' %}
{% for node in pages_list %}
{% if written contains node.title %}
{% continue %}
{% endif %}
{% if node.title != null %}
{% if node.layout == "page" %}
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{site.baseurl}}{{ node.url }}">{{ node.title }}</a>
{% endif %}
{% assign written = written | push: node.title %}
{% endif %}
{% endfor %}
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{ node.url }}">{{ node.title }}</a>
<a class="sidebar-nav-item" href="https://rubygems.org/gems/jekyll-polyglot">Ruby Gem</a>
<a class="sidebar-nav-item" href="{{ site.github.repo }}">GitHub project</a>
<a class="sidebar-nav-item" href="{{ site.github.repo }}/tree/master/site/{{ page.path }}"><small>view this page source on github</small></a>
<small class="sidebar-nav-item">Currently v{{ site.version }}</small>
</nav>
<p><small>© {{ site.time | date: '%Y' }} Samuel Volin</small><br/><small>MIT Licensed</small></p>
<p>
<!-- jekyll-polyglot will process ferh= into href= through the static_href liquid block tag without relativizing the url; useful for making language navigation switchers -->
{% for tongue in site.languages %}
<a {% if tongue == site.active_lang %}style="font-weight: bold;"{% endif %} {% static_href %}href="{% if tongue == site.default_lang %}{{site.baseurl}}{{page.url}}{% else %}{{site.baseurl}}/{{ tongue }}{{page.url}}{% endif %}"{% endstatic_href %} >{{ tongue }}</a>{%- if forloop.last == false -%}{{" "}}{{ site.langsep }}{%- endif -%}
{% endfor %}
</p>
</div>
</div>