From 4f7ddd71c515bcf2522929fbda22ec4e4f04ad0f Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Thu, 15 Sep 2011 13:20:18 +0200 Subject: [PATCH] initial framework for subpage navigation --- _config.yml | 9 +++++++++ _includes/nav.html | 18 ++++++++++++++++++ _layouts/base.html | 2 ++ index.html | 15 --------------- 4 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 _includes/nav.html diff --git a/_config.yml b/_config.yml index dfe6f0cb..c906404d 100644 --- a/_config.yml +++ b/_config.yml @@ -39,6 +39,15 @@ kramdown: coderay_bold_every: 10 coderay_css: style +navigation: +- text: News + url: /news.html + layout: post +- text: About + url: /about.html +- text: Features + url: /features.html + aliases: s_nakamoto: Satoshi Nakamoto --author=Satoshi Nakamoto: Satoshi Nakamoto diff --git a/_includes/nav.html b/_includes/nav.html new file mode 100644 index 00000000..226ee295 --- /dev/null +++ b/_includes/nav.html @@ -0,0 +1,18 @@ +
+
+
+

Bitcoin

+
    + {% for link in site.navigation %} + {% assign active = nil %} + {% if page.url == link.url or page.layout == link.layout %} + {% assign active = 'active' %} + {% endif %} + + {{ link.text }} + + {% endfor %} +
+
+
+
diff --git a/_layouts/base.html b/_layouts/base.html index fbfd689b..d4dd26d1 100644 --- a/_layouts/base.html +++ b/_layouts/base.html @@ -29,6 +29,8 @@ + {% include nav.html %} + {{ content }}
diff --git a/index.html b/index.html index 6a13a508..d45decc6 100644 --- a/index.html +++ b/index.html @@ -5,21 +5,6 @@ DOWNLOAD_VERSION: 0.3.24 ALERT_CLASS: ALERT: --- -
-
- -
-
-