Limit width of page to aid readability

This commit is contained in:
rubenwardy 2017-08-27 19:13:56 +01:00
parent 5d64318342
commit f495f678e5
5 changed files with 36 additions and 23 deletions

View File

@ -1,3 +1,4 @@
</div>
</div> </div>
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script> <script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="{{ page.root }}static/script.js"></script> <script src="{{ page.root }}static/script.js"></script>

View File

@ -20,22 +20,23 @@
{% assign links = site.data.links_en %} {% assign links = site.data.links_en %}
{% endif %} {% endif %}
<ul id="navbar"> <div id="container">
{% for link in links %} <ul id="navbar">
{% if link.hr %} {% for link in links %}
{% assign hr = true %} {% if link.hr %}
{% else %} {% assign hr = true %}
<li><a href="{{ page.root }}{{ language }}/{{ link.link }}" {% else %}
class="{% if page.title == link.title %}selected{% endif %}{% if hr %} hr {% endif %}"> <li><a href="{{ page.root }}{{ language }}/{{ link.link }}"
{% if link.num %} {{ link.num }} - {% endif %} class="{% if page.title == link.title %}selected{% endif %}{% if hr %} hr {% endif %}">
{{ link.title }}</a></li> {% if link.num %} {{ link.num }} - {% endif %}
{% assign hr = false %} {{ link.title }}</a></li>
{% endif %} {% assign hr = false %}
{% endfor %} {% endif %}
{% endfor %}
<li><a href="{{ page.root }}lua_api.html">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> </ul>
<div id="page"> <div id="page">
<h1>{{ page.title }}</h1> <h1>{{ page.title }}</h1>

View File

@ -229,8 +229,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local context = land_formspec_context[player:get_player_name()] local context = land_formspec_context[player:get_player_name()]
if context then if context then
minetest.chat_send_player(player:get_player_name(), "Id " .. context.id .. " is now called " .. minetest.chat_send_player(player:get_player_name(), "Id " ..
fields.plot .. " and owned by " .. fields.owner) context.id .. " is now called " .. fields.plot ..
" and owned by " .. fields.owner)
-- Delete context if it is no longer going to be used -- Delete context if it is no longer going to be used
land_formspec_context[player:get_player_name()] = nil land_formspec_context[player:get_player_name()] = nil
@ -238,7 +239,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
return true return true
else else
-- Fail gracefully if the context does not exist. -- Fail gracefully if the context does not exist.
minetest.chat_send_player(player:get_player_name(), "Something went wrong, try again.") minetest.chat_send_player(player:get_player_name(),
"Something went wrong, try again.")
end end
end) end)
{% endhighlight %} {% endhighlight %}

View File

@ -116,7 +116,8 @@ using the flowing liquid drawtype.
For each liquid node you should also have a flowing liquid node. For each liquid node you should also have a flowing liquid node.
{% highlight lua %} {% highlight lua %}
-- Some properties have been removed as they are beyond the scope of this chapter. -- Some properties have been removed as they are beyond
-- the scope of this chapter.
minetest.register_node("default:water_source", { minetest.register_node("default:water_source", {
drawtype = "liquid", drawtype = "liquid",
paramtype = "light", paramtype = "light",
@ -140,7 +141,8 @@ minetest.register_node("default:water_source", {
-- New-style water source material (mostly unused) -- New-style water source material (mostly unused)
{ {
name = "default_water_source_animated.png", name = "default_water_source_animated.png",
animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 2.0}, animation = {type = "vertical_frames", aspect_w = 16,
aspect_h = 16, length = 2.0},
backface_culling = false, backface_culling = false,
} }
}, },

View File

@ -39,6 +39,13 @@ figure {
padding: 0 0 0 6px; padding: 0 0 0 6px;
} }
#container {
width: 100%;
max-width: 1100px;
margin: auto;
position: relative;
}
#page { #page {
background: white; background: white;
margin: 0; margin: 0;
@ -50,7 +57,7 @@ figure {
} }
#navbar { #navbar {
position: fixed; position: absolute;
left: 0; left: 0;
width: 250px; width: 250px;
top: 0; top: 0;