File: sidebar.html

package info (click to toggle)
ruby-jekyll-polyglot 1.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,196 kB
  • sloc: xml: 1,500; ruby: 947; sh: 10; makefile: 4
file content (47 lines) | stat: -rw-r--r-- 2,345 bytes parent folder | download | duplicates (2)
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.sidebar.hello[site.active_lang] }}</p>
    </br>
      <h1>
        <a href="{{ site.baseurl }}">
          {{ site.title }}
        </a>
      </h1>
      <p class="lead">{{ site.sidebar.description[site.active_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>&copy; {{ 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>