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,4 +1,5 @@
</div>
</div>
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="{{ page.root }}static/script.js"></script>
<link rel="stylesheet" href="{{ page.root }}static/style.css">

View File

@ -20,6 +20,7 @@
{% assign links = site.data.links_en %}
{% endif %}
<div id="container">
<ul id="navbar">
{% for link in links %}
{% if link.hr %}
@ -33,7 +34,7 @@
{% 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>
</ul>

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()]
if context then
minetest.chat_send_player(player:get_player_name(), "Id " .. context.id .. " is now called " ..
fields.plot .. " and owned by " .. fields.owner)
minetest.chat_send_player(player:get_player_name(), "Id " ..
context.id .. " is now called " .. fields.plot ..
" and owned by " .. fields.owner)
-- Delete context if it is no longer going to be used
land_formspec_context[player:get_player_name()] = nil
@ -238,7 +239,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
return true
else
-- 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)
{% endhighlight %}

View File

@ -116,7 +116,8 @@ using the flowing liquid drawtype.
For each liquid node you should also have a flowing liquid node.
{% 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", {
drawtype = "liquid",
paramtype = "light",
@ -140,7 +141,8 @@ minetest.register_node("default:water_source", {
-- New-style water source material (mostly unused)
{
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,
}
},

View File

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