diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-03-07 18:02:01 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-03-07 18:02:01 +0300 |
commit | 1a69800752de85d718d6d1aec7c4b56185c3de40 (patch) | |
tree | 52f396fba0bd7811a88daf8c38a604fc876d2413 | |
parent | bump dependencies (diff) | |
download | sorting-algorithms-1a69800752de85d718d6d1aec7c4b56185c3de40.tar.gz sorting-algorithms-1a69800752de85d718d6d1aec7c4b56185c3de40.zip |
_includes: merge links.html to navbar.html
Diffstat (limited to '')
-rw-r--r-- | _includes/links.html | 11 | ||||
-rw-r--r-- | _includes/navbar.html | 12 | ||||
-rw-r--r-- | index.html | 3 | ||||
-rw-r--r-- | plots.html | 3 |
4 files changed, 13 insertions, 16 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..d763c3e 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.groups 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> @@ -1,7 +1,8 @@ --- title: Main page layout: main -group: "navigation" +groups: + - navbar navbar_link: <span class="glyphicon glyphicon-home"></span> Main page --- {% if site.posts.size == 0 %} @@ -1,7 +1,8 @@ --- title: Plots layout: plots -group: "navigation" +groups: + - navbar navbar_link: <span class="glyphicon glyphicon-th-large"></span> Plots --- <h1>Plots</h1> |