Highlight links when on page
This commit is contained in:
parent
7d2308af5c
commit
02cda4eb0e
34
_data/links.yml
Normal file
34
_data/links.yml
Normal file
@ -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
|
@ -1,23 +1,24 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>{% if page.title != "Minetest Tutorials and Documentation" %}{{ page.title }} - {% endif %}Minetest Tutorials and Documentation</title>
|
<title>{% if page.title != "Introduction" %}{{ page.title }} - {% endif %}Minetest Tutorials and Documentation</title>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
<link rel="stylesheet" href="{{ page.root }}static/style.css">
|
<link rel="stylesheet" href="{{ page.root }}static/style.css">
|
||||||
<link rel="stylesheet" href="{{ page.root }}static/syntax.css">
|
<link rel="stylesheet" href="{{ page.root }}static/syntax.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<ul id="navbar">
|
<ul id="navbar">
|
||||||
<li><a href="{{ page.root }}index.html" class="title">Minetest Tutorials</a></li>
|
{% for link in site.data.links %}
|
||||||
<li><a href="{{ page.root }}chapters/folders.html">1 - Folder Structure</a></li>
|
{% if link.hr %}
|
||||||
<li><a href="{{ page.root }}chapters/nodes_items_crafting.html">2 - Nodes, Items and Crafting</a></li>
|
{% assign hr = true %}
|
||||||
<li><a href="{{ page.root }}chapters/node_drawtypes.html">3 - Node Drawtypes</a></li>
|
{% else %}
|
||||||
<li><a href="{{ page.root }}chapters/lua.html">4 - Lua Scripts</a></li>
|
<li><a href="{{ page.root }}{{ link.link }}"
|
||||||
<li><a href="{{ page.root }}chapters/abms.html">5 - Active Block Modifiers</a></li>
|
class="{% if page.title == link.title %}selected{% endif %}{% if hr %} hr {% endif %}">
|
||||||
<li><a href="{{ page.root }}chapters/formspecs.html">6 - Formspecs</a></li>
|
{% if link.num %} {{ link.num }} - {% endif %}
|
||||||
<li><hr></li>
|
{{ link.title }}</a></li>
|
||||||
<li><a href="{{ page.root }}book_index.html">Index</a></li>
|
{% assign hr = false %}
|
||||||
<li><a href="{{ page.root }}lua_api.html">Webpage version of lua_api.txt</a></li>
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
<div id="page">
|
<div id="page">
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
|
2
index.md
2
index.md
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Minetest Tutorials and Documentation
|
title: Introduction
|
||||||
permalink: index.html
|
permalink: index.html
|
||||||
layout: default
|
layout: default
|
||||||
---
|
---
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Minetest Lua Modding API Reference 0.4.11
|
title: Lua Modding API Reference
|
||||||
layout: default
|
layout: default
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -63,10 +63,17 @@ figure {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar li hr {
|
#navbar li a.hr {
|
||||||
height: 1px;
|
border-top: 2px solid #666;
|
||||||
background: #666;
|
}
|
||||||
border: none;
|
|
||||||
|
#navbar li a.selected {
|
||||||
|
background: #363 !important;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#navbar li a.selected:hover {
|
||||||
|
background: #474 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar li a {
|
#navbar li a {
|
||||||
@ -76,6 +83,10 @@ figure {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#navbar li:nth-child(odd) a {
|
||||||
|
background: #3c3c3c;
|
||||||
|
}
|
||||||
|
|
||||||
#navbar li a:hover {
|
#navbar li a:hover {
|
||||||
background: #444;
|
background: #444;
|
||||||
}
|
}
|
||||||
@ -94,19 +105,6 @@ figure {
|
|||||||
margin: 0 0 5px 0;
|
margin: 0 0 5px 0;
|
||||||
padding: 0 0 2px 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 {
|
code {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
Loading…
Reference in New Issue
Block a user