Add first glimpse of year selector, remove sample pie chart.

This commit is contained in:
Jan Philipp Timme 2017-12-08 13:50:41 +01:00
parent 08f830d60a
commit f5c743f149
2 changed files with 25 additions and 17 deletions

View File

@ -22,18 +22,12 @@
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(aktuelle Seite)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Irgendetwas anderes</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">TODO ...</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Hier ...</a>
<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Coding-Guidlines!</a>
<div class="dropdown-menu" aria-labelledby="dropdown01">
<a class="dropdown-item" href="#">... gibt es ...</a>
<a class="dropdown-item" href="#">... auch so tolle ...</a>
<a class="dropdown-item" href="#">... Menüpunkte!</a>
<a class="dropdown-item" href="#">Einrückungen mit zwei Leerzeichen</a>
<a class="dropdown-item" href="#">Charset ist UTF-8</a>
<a class="dropdown-item" href="#">Keine Panik!</a>
</div>
</li>
</ul>
@ -43,13 +37,22 @@
<main role="main" class="container">
<div class="container">
<form>
<div class="form-group">
<label for="seasonByYearSelector">Wähle ein Jahr aus!</label>
<select class="form-control" id="seasonByYearSelector">
<!-- This is filled using JS. -->
</select>
</div>
</form>
</div>
<div class="content-box">
<h1>Hallo!</h1>
<h1>Hallo F1-Fan!</h1>
<p class="lead">
Mit Bootstrap sieht alles per Default ein wenig hübscher aus.<br>
Eingerückt wird mit 2 Leerzeichen pro Einrückungsebene.<br>
Charset ist UTF-8.<br>
TODO
Hier ist noch viel zutun ...
</p>
</div>

View File

@ -5,7 +5,12 @@
*/
preprocessor.load(function(data) {
// Some sample code for a year selector - TODO: Improve a lot and move somewhere else
var yearSelector = $("#seasonByYearSelector");
var seasons = preprocessor.getResults().seasons;
for(var year in seasons) yearSelector.append("<option>" + year + "</option>");
createTestPieChart("#testchartbox", queries.getDriversByNationality());
// No more test chart
//createTestPieChart("#testchartbox", queries.getDriversByNationality());
});