aboutsummaryrefslogtreecommitdiff
path: root/_includes/navbar.html
blob: 2ac1006e47852cd82d49c43f7398e1b397d62b82 (plain) (blame)
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
{% assign pages = site.pages | where: "show", true %}

<nav class="navbar navbar-default navbar-static-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button class="collapsed navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>

      <!-- Name of the site -->
      <a class="navbar-brand" href="/">
        {{ site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | truncate: 64 | xml_escape }}
      </a>
    </div>

    <!-- List of pages -->
    <div class="collapse navbar-collapse" id="navbar">
      <!-- Left side -->
      <ul class="nav navbar-nav">
        {% for link in site.data.local_links %}
          <li>
            <a href="{{ link.path | strip_newlines | strip_html | strip | normalize_whitespace | uri_escape }}">
              {{ link.name | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}
            </a>
          </li>
        {% endfor %}
      </ul>

      <!-- Right side -->
      <ul class="nav navbar-nav navbar-right">
        {% for page in pages %}
          <li>
            <a href="{{ page.url | strip_newlines | strip_html | strip | normalize_whitespace | relative_url | uri_escape }}">
              {{ page.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}
            </a>
          </li>
        {% endfor %}
      </ul>
    </div>
  </div>
</nav>