Add footer and improve homepage
This commit is contained in:
parent
d314a3838f
commit
70a0283b6d
@ -1,5 +1,13 @@
|
|||||||
</div>
|
</article>
|
||||||
</div>
|
<footer>
|
||||||
|
© 2014-8 |
|
||||||
|
<a href="https://creativecommons.org/licenses/by-sa/3.0/">License</a> |
|
||||||
|
Helpful? Consider
|
||||||
|
<a href="https://rubenwardy.com/donate/">donating</a>
|
||||||
|
to support my work.
|
||||||
|
</footer>
|
||||||
|
</article>
|
||||||
|
</main>
|
||||||
<link rel="stylesheet" href="{{ page.root }}static/style.css">
|
<link rel="stylesheet" href="{{ page.root }}static/style.css">
|
||||||
<script async src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
|
<script async src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
|
||||||
<script async src="{{ page.root }}static/script.js"></script>
|
<script async src="{{ page.root }}static/script.js"></script>
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>{% if page.title != "Introduction" %}{{ page.title }} - {% endif %}Minetest Modding Book</title>
|
<title>{% if page.homepage %}{% else %}{{ page.title }} - {% endif %}Minetest Modding Book</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<meta name="description" content="An easy guide to learn how to create mods for Minetest">
|
<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="keywords" content="Minetest, modding, book, tutorial, guide, easy">
|
||||||
<meta name="author" content="rubenwardy">
|
<meta name="author" content="rubenwardy">
|
||||||
<style>#navbar,#page{position:absolute;top:0}#navbar,#navbar li{margin:0;padding:0;display:block}body,html{background:#333;font-family:Arial,sans-serif}#container{width:100%;max-width:1100px;margin:auto;position:relative}#page{background:#fff;margin:0;padding:0 20px 20px;left:250px;right:0}#navbar{left:0;width:250px;list-style:none;background:#333;color:#fff}#navbar li a{display:block;padding:5px;color:#ccc;text-decoration:none;cursor:pointer}</style>
|
<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>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% assign pathsplit = page.dir | split: '/' %}
|
{% assign pathsplit = page.dir | split: '/' %}
|
||||||
@ -22,7 +22,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<ul id="navbar">
|
<nav>
|
||||||
{% for link in links %}
|
{% for link in links %}
|
||||||
{% if link.hr %}
|
{% if link.hr %}
|
||||||
{% assign hr = true %}
|
{% assign hr = true %}
|
||||||
@ -37,7 +37,8 @@
|
|||||||
|
|
||||||
<li><a href="{{ page.root }}lua_api.html" class="hr">Lua Modding API Reference</a></li>
|
<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>
|
<li><a href="https://github.com/rubenwardy/minetest_modding_book/archive/examples.zip">Download Examples</a></li>
|
||||||
</ul>
|
</nav>
|
||||||
|
|
||||||
<div id="page">
|
<main>
|
||||||
<h1>{{ page.title }}</h1>
|
<article {% if page.homepage %}class="homepage"{% endif %}>
|
||||||
|
{% if page.no_header %}{% else %}<h1>{{ page.title }}</h1>{% endif %}
|
||||||
|
9
_layouts/compress.html
Normal file
9
_layouts/compress.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# Jekyll layout that compresses HTML
|
||||||
|
# v2.0.0
|
||||||
|
# http://jch.penibelst.de/
|
||||||
|
# © 2014–2015 Anatol Broder
|
||||||
|
# MIT License
|
||||||
|
---
|
||||||
|
|
||||||
|
{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% case _pres.size %}{% when 2 %}{% capture _content %}{{ _content }}<pre{{ _pres.first }}</pre>{{ _pres.last | split: " " | join: " " }}{% endcapture %}{% when 1 %}{% capture _content %}{{ _content }}{{ _pres.last | split: " " | join: " " }}{% endcapture %}{% endcase %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% assign _comment_befores = _content | split: _comments.first %}{% for _comment_before in _comment_befores %}{% assign _comment_content = _comment_before | split: _comments.last | first %}{% if _comment_content %}{% capture _comment %}{{ _comments.first }}{{ _comment_content }}{{ _comments.last }}{% endcapture %}{% assign _content = _content | remove: _comment %}{% endif %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
|
@ -1,3 +1,6 @@
|
|||||||
|
---
|
||||||
|
layout: compress
|
||||||
|
---
|
||||||
{% include header.html %}
|
{% include header.html %}
|
||||||
{{ content }}
|
{{ content }}
|
||||||
{% include footer.html %}
|
{% include footer.html %}
|
||||||
|
@ -60,7 +60,8 @@ figure {
|
|||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 10px 0 0 0;
|
margin: 0;
|
||||||
|
padding: 10px 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
|
@ -7,7 +7,6 @@ html, body {
|
|||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#container {
|
#container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 1100px;
|
max-width: 1100px;
|
||||||
@ -15,17 +14,7 @@ html, body {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page {
|
nav {
|
||||||
background: white;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0 20px 20px 20px;
|
|
||||||
position: absolute;
|
|
||||||
left: 280px;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navbar {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 280px;
|
width: 280px;
|
||||||
@ -38,26 +27,26 @@ html, body {
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar li {
|
nav li {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar li a.hr {
|
nav li a.hr {
|
||||||
border-top: 2px solid #666;
|
border-top: 2px solid #666;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar li a.selected {
|
nav li a.selected {
|
||||||
background: #363 !important;
|
background: #363 !important;
|
||||||
color: white !important;
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar li a.selected:hover {
|
nav li a.selected:hover {
|
||||||
background: #474 !important;
|
background: #474 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar li a {
|
nav li a {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
@ -65,33 +54,82 @@ html, body {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar li:nth-child(odd) a {
|
nav li:nth-child(odd) a {
|
||||||
background: #3c3c3c;
|
background: #3c3c3c;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar li a:hover {
|
nav li a:hover {
|
||||||
background: #444;
|
background: #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute;
|
||||||
|
left: 280px;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
article {
|
||||||
|
background: white;
|
||||||
|
padding: 0 20px 20px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin: 0 0 20px 0;
|
||||||
|
padding: 1em 1.5em;
|
||||||
|
background: #444;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 0 0 10px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer a {
|
||||||
|
color: #0be;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer a:hover {
|
||||||
|
color: #0df;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header {
|
||||||
|
text-align: center;
|
||||||
|
padding: 100px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header h1 {
|
||||||
|
padding-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header span {
|
||||||
|
display: block;
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.homepage h1 {
|
||||||
|
font-size: 200%;
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (max-height: 568px) {
|
@media all and (max-height: 568px) {
|
||||||
#navbar {
|
nav {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width: 780px) {
|
@media all and (max-width: 780px) {
|
||||||
#navbar {
|
nav {
|
||||||
position: static;
|
position: static;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar li a {
|
nav li a {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page {
|
main {
|
||||||
position: static;
|
position: static;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
@ -99,11 +137,11 @@ html, body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
#navbar{
|
nav{
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page {
|
main {
|
||||||
left: 0 !important;
|
left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
55
en/index.md
55
en/index.md
@ -1,55 +1,34 @@
|
|||||||
---
|
---
|
||||||
title: Introduction
|
title: Introduction
|
||||||
layout: default
|
layout: default
|
||||||
|
homepage: true
|
||||||
|
no_header: true
|
||||||
root: ../
|
root: ../
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<div id="header">
|
||||||
|
<h1>Minetest Modding Book</h1>
|
||||||
|
|
||||||
|
<span>by <a href="https://rubenwardy.com" rel="author">rubenwardy</a></span>
|
||||||
|
<span>with editing by <a href="http://rc.minetest.tv/">Shara</a></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
Minetest uses Lua scripts to provide modding support.
|
Minetest uses Lua scripts to provide modding support.
|
||||||
This book aims to teach you how to create your own mods, starting from the basics.
|
This book aims to teach you how to create your own mods, starting from the basics.
|
||||||
|
Each chapter focuses on a particular part of the API, and will soon get you making
|
||||||
|
your own mods.
|
||||||
|
|
||||||
As well as [reading this book online](https://rubenwardy.com/minetest_modding_book),
|
As well as [reading this book online](https://rubenwardy.com/minetest_modding_book),
|
||||||
you can also [download it in PDF or HTML form](https://github.com/rubenwardy/minetest_modding_book/releases).
|
you can also [download it in PDF or HTML form](https://github.com/rubenwardy/minetest_modding_book/releases).
|
||||||
|
|
||||||
## What you will need
|
### Feedback and Contributions
|
||||||
|
|
||||||
* A Code Editor. Talked about in the [Lua Scripts](chapters/lua.html#tools) chapter.
|
Noticed a mistake, or want to give feedback? Make sure to tell me about it.
|
||||||
* A copy of Minetest in the 0.4 series. (eg: 0.4.13)
|
I'd accept contributions.
|
||||||
* Motivation to keep trying when things go wrong. You learn more when you work
|
|
||||||
something out yourself.
|
|
||||||
|
|
||||||
## So, go on then.
|
* Create a [GitHub Issue](https://github.com/rubenwardy/minetest_modding_book/issues).
|
||||||
|
|
||||||
Start [learning about how to create a mod folder](chapters/folders.html), or use the navigation bar on
|
|
||||||
the left (or on the top on mobiles) to open a chapter.
|
|
||||||
|
|
||||||
* [GitHub](https://github.com/rubenwardy/minetest_modding_book).
|
|
||||||
* [Download for offline use](https://github.com/rubenwardy/minetest_modding_book/releases).
|
|
||||||
* [Forum Topic](https://forum.minetest.net/viewtopic.php?f=14&t=10729).
|
|
||||||
|
|
||||||
## About this Book
|
|
||||||
|
|
||||||
Noticed a mistake, or want to give feedback? Tell us about it using one of these methods:
|
|
||||||
|
|
||||||
* [GitHub Issue](https://github.com/rubenwardy/minetest_modding_book/issues).
|
|
||||||
* Post in the [Forum Topic](https://forum.minetest.net/viewtopic.php?f=14&t=10729).
|
* Post in the [Forum Topic](https://forum.minetest.net/viewtopic.php?f=14&t=10729).
|
||||||
* Send me a [PM](https://forum.minetest.net/ucp.php?i=pm&mode=compose&u=2051) on the Forum.
|
* Send me a [PM](https://forum.minetest.net/ucp.php?i=pm&mode=compose&u=2051) on the forums.
|
||||||
* Submit a report below.
|
* [Read the contribution README](../README.html).
|
||||||
|
|
||||||
You can contribute to this project on [GitHub](https://github.com/rubenwardy/minetest_modding_book).\\
|
|
||||||
Read the [contribution README]({{ page.root }}README.html).
|
|
||||||
|
|
||||||
Written by rubenwardy.\\
|
|
||||||
License: [CC-BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)
|
|
||||||
|
|
||||||
<!--<form class="leave_comment" action="http://pooleapp.com/stash/74bf2dfb-4c01-423c-b48a-e002ed70bbc1/" method="post">
|
|
||||||
<input type="hidden" name="redirect_to"
|
|
||||||
value="http://rubenwardy.com/minetest_modding_book/thank_you.html" />
|
|
||||||
Nickname (optional): <input class="name" name="name" placeholder="Your Name" type="text"><br />
|
|
||||||
Contact method (email or forum name, optional): <input name="contact" type="text"><br />
|
|
||||||
Feedback:
|
|
||||||
<textarea name="comment" required="" style="display:block;min-width: 90%;min-height:100px;"></textarea>
|
|
||||||
|
|
||||||
<input value="Leave Feedback" type="submit">
|
|
||||||
</form>-->
|
|
||||||
|
Loading…
Reference in New Issue
Block a user