aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_includes/common/navbar.html
diff options
context:
space:
mode:
Diffstat (limited to '_includes/common/navbar.html')
-rw-r--r--_includes/common/navbar.html66
1 files changed, 0 insertions, 66 deletions
diff --git a/_includes/common/navbar.html b/_includes/common/navbar.html
deleted file mode 100644
index 67db12e..0000000
--- a/_includes/common/navbar.html
+++ /dev/null
@@ -1,66 +0,0 @@
-{% unless site.settings.navbar.hide or page.navbar.hide %}
-<nav class="navbar navbar-default navbar-static-top">
- <div class="container">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- {% assign author_name = site.settings.author.name %}
- {% unless author_name %}
- {% if site.github %}
- {% assign author_name = site.github.owner_name %}
- {% endif %}
- {% endunless %}
- {% assign author_name = author_name | default: 'John Doe' %}
- <a class="navbar-brand" href="/">{{ author_name }}</a>
- </div>
- <div class="navbar-collapse collapse">
- <ul class="nav navbar-nav">
- {% assign page_list = site.pages | where_exp: "x","x.navbar.link" | sort: "navbar.priority" %}
- {% for node in page_list %}
- {% comment %}
- Whether a page should be present in the navbar is determined by
- the presense of navbar.link in the page's front matter. It can be
- true, in which case page's title is used, or it can be custom HTML.
-
- If the page is paginated, it should be marked as such by setting
- navbar.paginated to true in its front matter. That way, /pageN/
- pages, which would have the same navbar_link, wouldn't appear in
- the navbar.
- {% endcomment %}
- {% if node.navbar.paginated %}
- {% if navbar_has_paginated %}
- {% continue %}
- {% endif %}
- {% assign navbar_has_paginated = true %}
- {% endif %}
- {% assign link = node.navbar.link %}
- {% if link == true %}
- {% assign link = node.title %}
- {% endif %}
- {% capture link %}{{ link | upcase }}{% endcapture %}
- {% assign icon = node.navbar.icon %}
- {% if icon %}
- {% capture icon %}<span class="glyphicon glyphicon-{{ icon }}"></span>&nbsp;{% endcapture %}
- {% endif %}
- {% if page.url == node.url %}
- <li class="active"><a href="{{ node.url | relative_url }}" class="active">{{ icon }}{{ link }}</a></li>
- {% else %}
- <li><a href="{{ node.url | relative_url }}">{{ icon }}{{ link }}</a></li>
- {% endif %}
- {% endfor %}
-
- {% if site.github and site.settings.navbar.github != false %}
- {% assign github_link = site.settings.navbar.github.link | default: 'GitHub' %}
- {% assign github_icon = site.settings.navbar.github.icon | default: 'globe' %}
- {% capture github_icon %}<span class="glyphicon glyphicon-{{ github_icon }}"></span>&nbsp;{% endcapture %}
- <li><a href="{{ site.github.repository_url }}" target="_blank">{{ github_icon }}{{ github_link | upcase }}</a></li>
- {% endif %}
- </ul>
- </div>
- </div>
-</nav>
-{% endunless %}