Optimized the TOC and translated some paragraphs

This commit is contained in:
Ruben Müller 2013-08-08 23:13:40 +02:00 committed by Aaron Mueller
parent 3f6b9573c9
commit de9da70e01
3 changed files with 76 additions and 26 deletions

View file

@ -1,4 +1,4 @@
# The Young Person's Guide to Programming in Minecraft # Modding für Minecraft der einfache Einstieg
## Einführung ## Einführung
@ -253,20 +253,21 @@ lang sein.
![3D Shapes][img_3d_shapes] ![3D Shapes][img_3d_shapes]
You can create a Cube or a Cuboid in ScriptCraft using the `box()` Einen Würfel oder Quader kannst du in ScriptCraft mithilfe der Funktion `box()`
function. You must tell the function what material you want the shape to erstellen. Der Befehl benötigt nur die Angabe des Materials, das auf das Objekt
be made of. For example, in the game, point the cross hairs at the angewendet werden soll. Probier es einfach mal aus, zeige im Spiel mit dem
ground, then type the following and hit enter... Fadenkreuz auf den Boden, gebe den folgenden Befehl ein und drücke die Enter-
Taste...
/js box("5") /js box("5")
... This will change the targeted block to wood. What's happened here is ... das wird den angepeilten Block zu einem Holz-Block umwandeln, denn die
the `box()` function has created a single new wooden block. The text Funktion `box()` hat anstelle des vorherigen Blocks einen neuen Block aus Holz
`"5"` is taken by Minecraft to mean Wood. You can see many more erstellt. Der Text `"5"` wird von Minecraft als "Holz" verstanden. Eine
materials and the number Minecraft uses for them by visiting the Übersicht zu den möglichen Materialien und ihren zugehörigen Nummern findest
[Minecraft Data Values][mcdv] site. du auf [dieser][mcdv] (englisch) Seite.
### Common Block Materials ### Typische Block Materialien
In Minecraft Programming, Materials aren't known by their name, In Minecraft Programming, Materials aren't known by their name,
instead numbers (sometimes 2 numbers) are used to indicate which instead numbers (sometimes 2 numbers) are used to indicate which

70
docs/vendor/toc.css vendored
View file

@ -4,13 +4,16 @@
height: 100%; height: 100%;
position: fixed; position: fixed;
background: #000; background: #000;
width: 250px; width: 275px;
padding-top: 20px;
color: #fff; color: #fff;
font-family: Arial; font-family: Arial;
overflow: scroll; overflow: scroll;
} }
#toc .inner {
padding: 15px 15px 50px 15px;
}
#toc ul { #toc ul {
margin: 0; margin: 0;
padding: 0; padding: 0;
@ -18,35 +21,80 @@
} }
#toc li { #toc li {
padding: 5px 10px; padding: 0 0 1px 0;
} }
#toc a { #toc a {
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;
display: block; display: block;
border-radius: 5px;
}
#toc .toc-h1 {
font-size: 16px;
line-height: 25px;
font-weight: bold;
margin: 0 0 15px 0;
}
#toc .toc-h1 a {
text-align: center;
padding: 5px 5px;
}
#toc .toc-h1 a:hover,
#toc .toc-h1 a:active
{
color: #eee;
} }
#toc .toc-h2 { #toc .toc-h2 {
padding-left: 10px; font-size: 13px;
font-weight: bold;
} }
#toc .toc-h2 { #toc .toc-h2 a {
font-size: 15px; padding: 0 5px;
}
#toc .toc-h2 a:hover,
#toc .toc-h2 a:active
{
background-color: #666;
} }
#toc .toc-h3 { #toc .toc-h3 {
padding-left: 30px; margin-left: 10px;
font-size: 14px; font-size: 11px;
} }
#toc .toc-h3 a { #toc .toc-h3 a {
color: gray; padding: 0 5px;
color: #aaa;
}
#toc .toc-h3 a:hover,
#toc .toc-h3 a:active
{
color: white;
} }
#toc .toc-active { #toc .toc-h4 {
margin-left: 30px;
font-size: 11px;
line-height: 20px;
}
#toc .toc-h4 a {
padding: 0 5px;
color: #888;
}
#toc .toc-h4 a:hover,
#toc .toc-h4 a:active
{
color: white;
}
#toc .toc-active a {
background: #336699; background: #336699;
color: white;
} }
#content { #content {
position: relative; position: relative;
left: 265px; left: 325px;
} }

View file

@ -12,8 +12,9 @@
$(document).ready(function() { $(document).ready(function() {
$.get("YoungPersonsGuideToProgrammingMinecraft-de.md", function(content) { $.get("YoungPersonsGuideToProgrammingMinecraft-de.md", function(content) {
$('#content').html(new Showdown.converter().makeHtml(content)); $('#content').html(new Showdown.converter().makeHtml(content));
$('#toc').toc({
'selectors': 'h2,h3,h4', $('#toc .inner').toc({
'selectors': 'h1,h2,h3,h4',
'container': '#content' 'container': '#content'
}); });
}); });
@ -21,7 +22,7 @@
</script> </script>
</head> </head>
<body> <body>
<div id="toc"></div> <div id="toc"><div class="inner"></div></div>
<div id="content"> <div id="content">
</div> </div>
</body> </body>