aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_includes
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-03-07 17:40:47 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-03-07 17:40:47 +0300
commit0eb900e38b57e42bff091cd6adb3e147a5c1b547 (patch)
treee07e5e0f69cbcecd8c1efb2a426e9450198d037f /_includes
parentdump dependencies (diff)
downloadblog-0eb900e38b57e42bff091cd6adb3e147a5c1b547.tar.gz
blog-0eb900e38b57e42bff091cd6adb3e147a5c1b547.zip
_includes: merge links.html to navbar.html
Diffstat (limited to '')
-rw-r--r--_includes/links.html11
-rw-r--r--_includes/navbar.html12
2 files changed, 9 insertions, 14 deletions
diff --git a/_includes/links.html b/_includes/links.html
deleted file mode 100644
index ddab348..0000000
--- a/_includes/links.html
+++ /dev/null
@@ -1,11 +0,0 @@
-{% for node in page_list %}
- {% if group == null or group == node.group %}
- {% if page.url == node.url %}
- <li class="active"><a href="{{ site.baseurl }}{{ node.url }}" class="active">{{ node.navbar_link }}</a></li>
- {% else %}
- <li><a href="{{ site.baseurl }}{{ node.url }}">{{ node.navbar_link }}</a></li>
- {% endif %}
- {% endif %}
-{% endfor %}
-{% assign page_list = nil %}
-{% assign group = nil %}
diff --git a/_includes/navbar.html b/_includes/navbar.html
index f052baa..517c9a6 100644
--- a/_includes/navbar.html
+++ b/_includes/navbar.html
@@ -11,9 +11,15 @@
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
- {% assign page_list = site.pages %}
- {% assign group = 'navigation' %}
- {% include links.html %}
+ {% for node in site.pages %}
+ {% if node.group contains 'navbar' %}
+ {% if page.url == node.url %}
+ <li class="active"><a href="{{ site.baseurl }}{{ node.url }}" class="active">{{ node.navbar_link }}</a></li>
+ {% else %}
+ <li><a href="{{ site.baseurl }}{{ node.url }}">{{ node.navbar_link }}</a></li>
+ {% endif %}
+ {% endif %}
+ {% endfor %}
</ul>
</div>
</div>