2018-01-13 05:21:18 +03:00
|
|
|
---
|
2020-08-19 01:38:19 +03:00
|
|
|
layout: base
|
2018-01-13 05:21:18 +03:00
|
|
|
---
|
2018-07-15 17:50:35 +03:00
|
|
|
|
2020-08-19 01:38:19 +03:00
|
|
|
{% assign pathsplit = page.path | split: '/' %}
|
2018-11-19 01:08:11 +03:00
|
|
|
|
2020-08-19 01:38:19 +03:00
|
|
|
{% assign language = pathsplit[0] %}
|
2018-07-15 17:50:35 +03:00
|
|
|
|
2020-08-19 01:38:19 +03:00
|
|
|
{% if language == "_it" %}
|
|
|
|
{% assign language = "it" %}
|
|
|
|
{% assign links = site.it | sort: "idx" %}
|
|
|
|
{% else %}
|
|
|
|
{% assign language = "en" %}
|
|
|
|
{% assign links = site.en | sort: "idx" %}
|
|
|
|
{% endif %}
|
2020-08-18 23:57:46 +03:00
|
|
|
|
2020-08-19 01:38:19 +03:00
|
|
|
{% assign num = 0 %}
|
2018-07-15 17:50:35 +03:00
|
|
|
|
2020-08-19 01:38:19 +03:00
|
|
|
<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>
|
2018-07-15 17:50:35 +03:00
|
|
|
|
2020-08-19 01:38:19 +03:00
|
|
|
{% assign last_section = section %}
|
|
|
|
{% assign num = num | plus:1 %}
|
|
|
|
{% endfor %}
|
2020-12-24 16:41:51 +03:00
|
|
|
<li><a href="https://github.com/rubenwardy/minetest_modding_book/archive/examples.zip" class="hr">Download Examples</a></li>
|
2020-08-19 01:38:19 +03:00
|
|
|
</nav>
|
2018-07-15 17:50:35 +03:00
|
|
|
|
2020-08-19 01:38:19 +03:00
|
|
|
<main>
|
|
|
|
<article {% if page.homepage %}class="homepage"{% endif %}>
|
|
|
|
<a href="{{ page.root }}/languages.html" class="language-switcher">
|
|
|
|
<img src="{{ page.root }}/static/languages.svg" alt="Choose a language">
|
|
|
|
<span>{{ language }}</span>
|
|
|
|
</a>
|
2018-07-15 17:50:35 +03:00
|
|
|
|
2020-08-19 01:38:19 +03:00
|
|
|
{% if page.no_header %}{% else %}<h1>{{ page.title }}</h1>{% endif %}
|
|
|
|
{{ content }}
|
|
|
|
</article>
|
2018-07-15 17:50:35 +03:00
|
|
|
|
2020-08-19 01:38:19 +03:00
|
|
|
{% 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 %}
|
2018-07-15 17:50:35 +03:00
|
|
|
|
2020-08-19 01:38:19 +03:00
|
|
|
<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>
|
2018-07-15 17:50:35 +03:00
|
|
|
|
2020-08-19 01:38:19 +03:00
|
|
|
<footer>
|
2022-06-14 02:21:06 +03:00
|
|
|
© 2014-22
|
2020-08-19 01:38:19 +03:00
|
|
|
{% if language == "en" %}
|
|
|
|
| Helpful? Consider
|
|
|
|
<a href="https://rubenwardy.com/donate/">donating</a>
|
|
|
|
to support my work.
|
|
|
|
{% endif %}
|
|
|
|
</footer>
|
|
|
|
</main>
|