Skip to content

Commit f76e353

Browse files
committed
doc: Fixed some html errors, the pages now pass the W3C validation. Additionally, empty lines are now removed from html output.
1 parent f86580c commit f76e353

File tree

7 files changed

+41
-24
lines changed

7 files changed

+41
-24
lines changed

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ destination: doc
44

55
baseurl: ""
66

7+
compress_html:
8+
blanklines: true
9+
710
collections:
811
implementation:
912
output: true

doc_src/_implementation/game_design.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ <h2>Die Spielschleife</h2>
1717
<p>Damit lässt sich die Endlosschleife unseres Spiels wie folgt zusammenfassen:</p>
1818
<ul>
1919
<li>Initialisierung.</li>
20-
<li>Solange das Fenster geöffnet ist:</li>
21-
<ul>
22-
<li>Lese die Kinect-Daten ein.</li>
23-
<li>Berechne die Koordinaten des Cursors mithilfe einer Umrechnung der Handkoordinaten der Kinect in Bildschirmkoordinaten (siehe <a href="kinect.html">Kinect Schnittstelle</a>).</li>
24-
<li>Überprüfe, ob ein Klick ausgelöst wurde.</li>
25-
<li>Rufe die Update-Funktion des Hauptwidgets auf. Übergebe dabei die Koordinaten des Cursors und ob ein Klick ausgelöst wurde. (Mit diesem Aufruf wird die komplette Spiellogik aktualisiert.)</li>
26-
<li>Zeichne das Hauptwidget und somit auch alle untergeordneten Widgets.</li>
27-
</ul>
20+
<li>Solange das Fenster geöffnet ist:
21+
<ul>
22+
<li>Lese die Kinect-Daten ein.</li>
23+
<li>Berechne die Koordinaten des Cursors mithilfe einer Umrechnung der Handkoordinaten der Kinect in Bildschirmkoordinaten (siehe <a href="kinect.html">Kinect Schnittstelle</a>).</li>
24+
<li>Überprüfe, ob ein Klick ausgelöst wurde.</li>
25+
<li>Rufe die Update-Funktion des Hauptwidgets auf. Übergebe dabei die Koordinaten des Cursors und ob ein Klick ausgelöst wurde. (Mit diesem Aufruf wird die komplette Spiellogik aktualisiert.)</li>
26+
<li>Zeichne das Hauptwidget und somit auch alle untergeordneten Widgets.</li>
27+
</ul>
28+
</li>
2829
</ul>
2930

3031
<h2> Der Event Manager</h2>

doc_src/_implementation/gui.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h3>Motivation</h3>
2222
<div class="row" style="margin-bottom:16px;">
2323
<div class="col-sm-6" style="margin-bottom:16px;">
2424
<a href="{{base}}/img/menu1.png" class="lightbox-link" data-lightbox="menu1">
25-
<img class="img-responsive img-thumbnail" width="800" height="628" src="{{base}}/img/menu1.png" />
25+
<img class="img-responsive img-thumbnail" width="800" height="628" src="{{base}}/img/menu1.png" alt="menu1.png" />
2626
</a>
2727
</div>
2828
<div class="col-sm-6">
@@ -118,7 +118,7 @@ <h3>GridWidget</h3>
118118
<div class="clearfix" style="margin-bottom:16px;">
119119
<div class="lfloat-sm-6">
120120
<a href="{{base}}/img/screenshot_3.jpg" class="lightbox-link" data-lightbox="screenshot_3">
121-
<img class="img-responsive img-thumbnail" width="1366" height="768" src="{{base}}/img/screenshot_3.jpg" />
121+
<img class="img-responsive img-thumbnail" width="1366" height="768" src="{{base}}/img/screenshot_3.jpg" alt="screenshot_3.jpg" />
122122
</a>
123123
</div>
124124
<p>Bei dem Hau den Maulwurf Spiel gibt es einige grafische Elemente, die wie in einer Tabelle oder in einem Gitter angeordnet sind. So befinden sich zum Beispiel die Maulwurfshügel in einem Gitter der Größe 3x3. Um eine leichte Positionierung solch angeordneter Elemente zu vereinfachen, haben wir die GridWidget Klasse erstellt.</p>
@@ -139,7 +139,7 @@ <h3>GridWidget</h3>
139139
};
140140
auto grid_ptr = make_shared&lt;GridWidget&gt;(3, 3);
141141
auto & grid = *grid_ptr; // easy access to operator()
142-
for (int i = 0; i < 9; ++i)
142+
for (int i = 0; i &lt; 9; ++i)
143143
{
144144
auto im = make_shared&lt;ImageWidget&gt;(filenames[i]);
145145
grid(i%3, i/3) = im;
@@ -148,9 +148,9 @@ <h3>GridWidget</h3>
148148

149149
<br />
150150

151-
<h3>AnimatedWidget</h2>
151+
<h3>AnimatedWidget</h3>
152152
<div class="clearfix">
153-
<a href="{{base}}/img/gmole_spritesheet.png" class="lightbox-link" alt="golden_mole_spritesheet.png" data-lightbox="gmole_spritesheet">
153+
<a href="{{base}}/img/gmole_spritesheet.png" class="lightbox-link" data-lightbox="gmole_spritesheet">
154154
<img class="img-responsive img-thumbnail lfloat-sm-6" width="1001" height="751" src="{{base}}/img/gmole_spritesheet.png" alt="golden_mole_spritesheet"/></a>
155155

156156
<p>In dem Hau den Maulwurf Spiel werden viele Animationen verwendet.
@@ -187,7 +187,7 @@ <h3>Motivation</h3>
187187

188188
<div class="col-md-8 col-md-offset-2" style="margin-top:16px;margin-bottom:16px;">
189189
<a href="{{base}}/img/class_diagram_action.png" class="lightbox-link" data-lightbox="class_diagram_action">
190-
<img class="img-responsive img-thumbnail" width="924" height="353" src="{{base}}/img/class_diagram_action.png" />
190+
<img class="img-responsive img-thumbnail" width="924" height="353" src="{{base}}/img/class_diagram_action.png" alt="class_diagram_action.png" />
191191
</a>
192192
</div>
193193

doc_src/_implementation/kinect.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h1>Kinect</h1>
1414

1515
<h2>Umwandlung der Hand-Koordinaten</h2>
1616
<div class="clearfix">
17-
<a href="{{base}}/img/ebene_skeleton.png" class="lightbox-link" alt="ebene_skeleton.png" data-lightbox="ebene_skeleton">
17+
<a href="{{base}}/img/ebene_skeleton.png" class="lightbox-link" data-lightbox="ebene_skeleton">
1818
<img class="img-responsive img-thumbnail lfloat-sm-6" width="898" height="674" src="{{base}}/img/ebene_skeleton.png" alt="ebene_skeleton.png"/>
1919
</a>
2020
<p>
@@ -37,9 +37,9 @@ <h2>Umwandlung der Hand-Koordinaten</h2>
3737
Daraus ergibt sich die folgende Basiswechselmatrix:
3838
$$
3939
M_{B \rightarrow E} = \left( \begin{array}{ccc}
40-
S_{20} - S_{10}&0&S_{22}-S_{12} \\
41-
0&X&0 \\
42-
S_{22} - S_{12}&0&S_{10}-S_{20} \\
40+
S_{20} - S_{10} & 0 & S_{22}-S_{12} \\
41+
0 & X & 0 \\
42+
S_{22} - S_{12} & 0 & S_{10}-S_{20} \\
4343
\end{array}
4444
\right)
4545
$$
@@ -60,33 +60,33 @@ <h2>Zittern des Cursors verhindern</h2>
6060
<h2>Klick-Geste</h2>
6161
<p>Um einen Maulwurf in dem Hau den Maulwurf Spiel zu treffen, muss der Benutzer eine Klick Bewegung ausführen. Eine solche Klick-Geste wird bereits von OpenNi zur Verfügung gestellt, jedoch reagiert diese erst, wenn man den Arm fast ganz ausstreckt.<br/>
6262
Dies ist äußerst ungeeignet für das Hau den Maulwurf Spiel, da hier sehr oft und schnell geklickt werden muss. Daher haben wir eine eigene Klick-Geste entwickelt, welche früher reagiert und nur eine kleine Bewegung benötigt um einen Klick auszulösen.</p>
63-
<h3> Die Klick-Geste Implementierung</h2>
63+
<h3> Die Klick-Geste Implementierung</h3>
6464
<pre class="line-numbers">
6565
<code class="language-cpp">
6666
// Add the new point and its timestamp to the queue.
6767
positions_.emplace_back(elapsed_time_, point.Y);
6868

6969
// Remove all points that are too old.
70-
while (!positions_.empty() && positions_.front().first+max_delay_ < elapsed_time_)
70+
while (!positions_.empty() && positions_.front().first+max_delay_ &lt; elapsed_time_)
7171
positions_.pop_front();
7272

7373
// Check if enough movement happened.
7474
float sum = 0.0;
7575
float prev = positions_.front().second;
7676
for (auto const & p : positions_) {
77-
if (p.second > prev) {
77+
if (p.second &gt; prev) {
7878
sum += abs(p.second - prev);
7979
prev = p.second;
8080
}
8181
}
8282

8383
// To prevent rapid clicking, only fire handle_click_() if no click happened just before.
8484
if (clicked_) {
85-
if (sum < threshold_) {
85+
if (sum &lt; threshold_) {
8686
clicked_ = false;
8787
}
8888
} else {
89-
if (sum >= threshold_) {
89+
if (sum &gt;= threshold_) {
9090
clicked_ = true;
9191
handle_click_();
9292
}

doc_src/_layouts/compress.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# Jekyll layout that compresses HTML
3+
# v3.0.2
4+
# http://jch.penibelst.de/
5+
# © 2014–2015 Anatol Broder
6+
# MIT License
7+
---
8+
9+
{% capture _LINE_FEED %}
10+
{% endcapture %}{% 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 %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _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 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% 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_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}

doc_src/_layouts/default.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
layout: compress
3+
---
14
<!DOCTYPE html>
25
<html lang="en">
36
{% include head.html %}

doc_src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h1>Ziele</h1>
1010
<p>In dem Fortgeschrittenenpraktikum befassen wir uns mit der Programmierung für die <a href="https://de.wikipedia.org/wiki/Kinect" target="_blank">Kinect</a>. Dabei werden zwei Programme entworfen, ein interaktives Menü und ein Hau den Maulwurf Spiel.</p>
1111
</div>
1212
<h2>Das Kinect Menü</h2>
13-
<p>Ziel unseres Projektes ist der Entwurf eines interaktiven Menüs, mit welchem sich Kinect Programme starten und wechseln lassen, ohne die Tastatur zu benutzen.<br/ >
13+
<p>Ziel unseres Projektes ist der Entwurf eines interaktiven Menüs, mit welchem sich Kinect Programme starten und wechseln lassen, ohne die Tastatur zu benutzen.<br />
1414
Die einzelnen Menüpunkte werden aus einer XML-Datei eingelesen.</p>
1515
<p> Weiter Informationen unter:
1616
<a href="{{base}}/menu.html">Kinect Menü</a>

0 commit comments

Comments
 (0)