Implement a dynamic navigation

This commit is contained in:
Daniel Rudolf 2015-10-05 19:40:02 +02:00
parent a689fbff5d
commit 71dabd22eb
5 changed files with 12 additions and 5 deletions

View file

@ -4,11 +4,14 @@
<nav id="menu" class="menu">
<ul id="tiny">
<li class="active"><a href="index.html">Home</a></li>
<li><a href="docs.html">Docs</a></li>
<li><a href="plugins.html">Plugins</a></li>
<li><a href="download.html">Download</a></li>
<li><a href="hosting.html">Hosting</a></li>
{% assign pages = site.pages|sort:"nav" %}
{% for nav in pages %}
{% if nav.nav > 0 %}
<li {% if nav.url == page.url %}class="active"{% endif %}>
<a href="{{ nav.url }}">{{ nav.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</nav>
<div class="clear"></div>

View file

@ -1,6 +1,7 @@
---
layout: default
title: Docs
nav: 2
---
<div class="light-wrapper">

View file

@ -1,6 +1,7 @@
---
layout: default
title: Download
nav: 4
---
<div class="light-wrapper">

View file

@ -1,6 +1,7 @@
---
layout: cover
title: Home
nav: 1
---
<div class="dark-wrapper">

View file

@ -1,6 +1,7 @@
---
layout: default
title: Plugins
nav: 3
---
<div class="light-wrapper">