89 lines
3.1 KiB
HTML
89 lines
3.1 KiB
HTML
---
|
|
layout: compress
|
|
---
|
|
|
|
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<title>{% if page.homepage %}{% else %}{{ page.title }} - {% endif %}Minetest Modding Book</title>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width">
|
|
<meta name="description" content="An easy guide to learn how to create mods for Minetest">
|
|
<meta name="keywords" content="Minetest, modding, book, tutorial, guide, easy">
|
|
<meta name="author" content="rubenwardy">
|
|
<meta name="flattr:id" content="gl763e">
|
|
|
|
<style>body,html,nav{background:#333}nav,nav li,nav li a{display:block}body,html,main,nav li{margin:0;padding:0}main,nav{position:absolute;top:0}body,html{font-size:17px;color:#000}#container{width:100%;max-width:1100px;margin:auto;position:relative}nav{left:0;width:280px;list-style:none;color:#fff}nav li a{padding:5px;color:#ccc;text-decoration:none}main{left:280px;right:0}article{background:#fff;padding:0 20px 20px}</style>
|
|
<link rel="stylesheet" href="{{ page.root }}/static/style.css">
|
|
</head>
|
|
<body>
|
|
{% assign pathsplit = page.dir | split: '/' %}
|
|
{% assign language = pathsplit[1] %}
|
|
|
|
{% if language == "en" %}
|
|
{% assign links = site.en | sort: "idx" %}
|
|
{% else %}
|
|
{% assign language = "en" %}
|
|
{% assign links = site.en | sort: "idx" %}
|
|
{% endif %}
|
|
|
|
{% assign num = 0 %}
|
|
|
|
<div id="container">
|
|
<nav>
|
|
{% for link in links %}
|
|
{% assign idsplit = link.id | split: '/' %}
|
|
{% assign section = idsplit[2] %}
|
|
<li>
|
|
<a href="{{ page.root }}{{ link.url }}"
|
|
class="{% if page.title == link.title %}selected{% endif %}{% if section != last_section and section != 'index' %} hr {% endif %}">
|
|
{% if section != "index" %}{{ num }} - {% endif %}
|
|
{{ link.title }}
|
|
</a>
|
|
</li>
|
|
|
|
{% assign last_section = section %}
|
|
{% assign num = num | plus:1 %}
|
|
{% endfor %}
|
|
|
|
<li><a href="{{ page.root }}/lua_api.html" class="hr">Lua Modding API Reference</a></li>
|
|
<li><a href="https://github.com/rubenwardy/minetest_modding_book/archive/examples.zip">Download Examples</a></li>
|
|
</nav>
|
|
|
|
<main>
|
|
<article {% if page.homepage %}class="homepage"{% endif %}>
|
|
{% if page.no_header %}{% else %}<h1>{{ page.title }}</h1>{% endif %}
|
|
{{ content }}
|
|
</article>
|
|
|
|
|
|
{% for link in links %}
|
|
{% if link.title == page.title %}
|
|
{% unless forloop.first %}
|
|
{% assign prev = tmpprev %}
|
|
{% endunless %}
|
|
{% unless forloop.last %}
|
|
{% assign next = links[forloop.index] %}
|
|
{% endunless %}
|
|
{% endif %}
|
|
{% assign tmpprev = link %}
|
|
{% endfor %}
|
|
|
|
<ul class="prevnext">
|
|
<li>{% if prev %}<a href="{{ page.root }}{{ prev.url}}">< {{ prev.title }}</a>{% endif %}</li>
|
|
<li>{% if next %}<a href="{{ page.root }}{{ next.url}}">{{ next.title }} ></a>{% endif %}</li>
|
|
</ul>
|
|
|
|
<footer>
|
|
© 2014-20 |
|
|
Helpful? Consider
|
|
<a href="https://rubenwardy.com/donate/">donating</a>
|
|
to support my work.
|
|
</footer>
|
|
</article>
|
|
</main>
|
|
<script async src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
|
|
<script async src="{{ page.root }}/static/script.js"></script>
|
|
</body>
|
|
</html>
|