aboutsummaryrefslogtreecommitdiff
path: root/_includes/navbar.html
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2018-05-15 00:28:56 +0300
committerValentin Popov <info@valentineus.link>2018-05-15 00:33:02 +0300
commit6a3f7cddf254c1f8c5feaf68fb46e95d0980be9d (patch)
tree7460a42b094d9ad388c532cb994e91d68a217abc /_includes/navbar.html
parentc6174916f505d373684c8a90dfd3cf6a9e910768 (diff)
downloadpopov.link-6a3f7cddf254c1f8c5feaf68fb46e95d0980be9d.tar.xz
popov.link-6a3f7cddf254c1f8c5feaf68fb46e95d0980be9d.zip
Navbar from Bootstrap v3
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to '_includes/navbar.html')
-rw-r--r--_includes/navbar.html38
1 files changed, 27 insertions, 11 deletions
diff --git a/_includes/navbar.html b/_includes/navbar.html
index 1c48ac8..5722345 100644
--- a/_includes/navbar.html
+++ b/_includes/navbar.html
@@ -1,16 +1,32 @@
{% assign pages = site.pages | where: "show", true %}
-<nav class="bg-light navbar navbar-expand navbar-light sticky-top" role="navigation">
+<nav class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
- <a class="mr-auto navbar-brand" href="#">{{ site.title }}</a>
- <ul class="navbar-nav">
- {% for page in pages %}
- <li class="nav-item">
- <a class="nav-link" href="{{ page.url | strip_newlines | strip_html | strip | normalize_whitespace | relative_url | uri_escape }}">
- {{ page.title | default: "Page" | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}
- </a>
- </li>
- {% endfor %}
- </ul>
+ <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">
+ <ul class="nav navbar-nav">
+ {% 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>