From 02cda4eb0e4848df7070b1694e2f9caf97ea1491 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Wed, 31 Dec 2014 16:43:27 +0000 Subject: [PATCH] Highlight links when on page --- _data/links.yml | 34 ++++++++++++++++++++++++++++++++++ _includes/header.html | 23 ++++++++++++----------- index.md | 2 +- lua_api.html | 2 +- static/style.css | 32 +++++++++++++++----------------- 5 files changed, 63 insertions(+), 30 deletions(-) create mode 100644 _data/links.yml diff --git a/_data/links.yml b/_data/links.yml new file mode 100644 index 0000000..9f48f04 --- /dev/null +++ b/_data/links.yml @@ -0,0 +1,34 @@ +- title: Introduction + link: index.html + +- title: Folder Structure + num: 1 + link: chapters/folders.html + +- title: Nodes, Items and Crafting + num: 2 + link: chapters/nodes_items_crafting.html + +- title: Node Drawtypes + num: 3 + link: chapters/node_drawtypes.html + +- title: Lua Scripts + num: 4 + link: chapters/lua.html + +- title: Active Block Modifiers + num: 5 + link: chapters/abms.html + +- title: Formspecs + num: 6 + link: chapters/formspecs.html + +- hr: true + +- title: Index + link: book_index.html + +- title: Lua Modding API Reference + link: lua_api.html diff --git a/_includes/header.html b/_includes/header.html index 51d5e5b..92818db 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,23 +1,24 @@ - {% if page.title != "Minetest Tutorials and Documentation" %}{{ page.title }} - {% endif %}Minetest Tutorials and Documentation + {% if page.title != "Introduction" %}{{ page.title }} - {% endif %}Minetest Tutorials and Documentation

{{ page.title }}

diff --git a/index.md b/index.md index 3bb01bb..252448c 100644 --- a/index.md +++ b/index.md @@ -1,5 +1,5 @@ --- -title: Minetest Tutorials and Documentation +title: Introduction permalink: index.html layout: default --- diff --git a/lua_api.html b/lua_api.html index 9a4ca5a..7b9cdb7 100644 --- a/lua_api.html +++ b/lua_api.html @@ -1,5 +1,5 @@ --- -title: Minetest Lua Modding API Reference 0.4.11 +title: Lua Modding API Reference layout: default --- diff --git a/static/style.css b/static/style.css index d61f96c..88c0b96 100644 --- a/static/style.css +++ b/static/style.css @@ -63,10 +63,17 @@ figure { padding: 0; } -#navbar li hr { - height: 1px; - background: #666; - border: none; +#navbar li a.hr { + border-top: 2px solid #666; +} + +#navbar li a.selected { + background: #363 !important; + color: white !important; +} + +#navbar li a.selected:hover { + background: #474 !important; } #navbar li a { @@ -76,6 +83,10 @@ figure { text-decoration: none; } +#navbar li:nth-child(odd) a { + background: #3c3c3c; +} + #navbar li a:hover { background: #444; } @@ -94,19 +105,6 @@ figure { margin: 0 0 5px 0; padding: 0 0 2px 0; } -#navbar li a.title { - text-align: center; - font-size: 120%; - font-weight: bold; - background: #363; - color: white; -} - -#navbar li a.section_title { - text-align: center; - font-size: 110%; - border-bottom: 1px solid #999; -} code { display: inline-block;