minetest_modding_book/_layouts/default.html

110 lines
3.5 KiB
HTML
Raw Normal View History

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
---
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] %}
2020-08-19 01:38:19 +03:00
{% if language == "_it" %}
{% assign language = "it" %}
2022-07-31 22:33:16 +03:00
{% assign links = site.it %}
2020-08-19 01:38:19 +03:00
{% else %}
{% assign language = "en" %}
2022-07-31 22:33:16 +03:00
{% assign links = site.en %}
2020-08-19 01:38:19 +03:00
{% endif %}
2022-07-31 22:33:16 +03:00
{% assign links = links | where_exp: "item", "item.sitemap != false" | sort: "idx" %}
2020-08-19 01:38:19 +03:00
{% assign num = 0 %}
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>
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>
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>
2020-08-19 01:38:19 +03:00
{% if page.no_header %}{% else %}<h1>{{ page.title }}</h1>{% endif %}
{{ content }}
</article>
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 %}
2020-08-19 01:38:19 +03:00
<ul class="prevnext">
<li>{% if prev %}<a href="{{ page.root }}{{ prev.url}}">&lt; {{ prev.title }}</a>{% endif %}</li>
<li>{% if next %}<a href="{{ page.root }}{{ next.url}}">{{ next.title }} &gt;</a>{% endif %}</li>
</ul>
2023-05-14 16:08:56 +03:00
{% if language == "en" %}
<aside class="feedback">
<h2>
{% unless page.homepage %}Confused?{% endunless %}
Have an idea to make the book better?
</h2>
<p>
Please let me know using the form below.
</p>
<form method="POST" action="https://api.rubenwardy.com/comment/">
<input type="hidden" name="url" value="{{ page.url | absolute_url }}">
2023-05-14 16:19:38 +03:00
<input type="hidden" name="redirect_to" value="https://rubenwardy.com/minetest_modding_book/comment_received.html">
2023-05-14 16:08:56 +03:00
<input type="hidden" name="name" value="Anonymous">
<label for="username" class="form-label">Username</label>
<input type="text" id="username" name="username">
<div class="form-group">
2023-05-30 11:56:49 +03:00
<label for="message" class="form-label">Message</label>
2023-05-14 16:08:56 +03:00
<textarea class="form-control" id="message" name="message" rows="3" required="" minlength="5" maxlength="1800"></textarea>
<small id="messageHelp" class="form-text text-muted">
Max 1800 characters. What is missing? What confused you?
What did you find unclear? What other feedback do you have?
</small>
</div>
<div class="form-group">
<label for="email" class="form-label">Email address (optional)</label>
<input type="email" class="form-control" id="email" name="email" aria-describedby="emailHelp" maxlength="320">
<small id="emailHelp" class="form-text text-muted">
Optional, if you'd like to receive a response.
</small>
</div>
2023-05-14 16:22:31 +03:00
<button type="submit" class="btn btn-primary">Send Feedback</button>
2023-05-14 16:08:56 +03:00
</form>
</aside>
{% endif %}
2020-08-19 01:38:19 +03:00
<footer>
2023-04-27 00:15:28 +03:00
&copy; 2014-{{ site.time | date: '%Y' }}
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>