*/
+.topnav .icon {
+ display: block;
+ font-family: 'Roboto', sans-serif;
+ font-size: 14px;
+ border-left: 1px solid lightgrey;
+}
+
+.lastBorder {
+ border-right: 1px solid lightgrey;
+}
+
+
+.topnav #hamburger-toggle {
+ display: none; /* normal net sichtbar */
+}
+
+.page {
+ width: 1170px;
+ margin: 0 auto;
+}
+@media only screen and (max-width: 1050px) {
+ .page {
+ width: 95%;
+ }
+}
+@media only screen and (max-width: 500px) {
+ .page {
+ width: 100%;
+ }
+}
+
+
+
+#section {
+ margin-top: 85px; /* wie die header hoch ist; notwendig da header position fixed hat; 75px + 10px extra */
+}
+h1 {
+ margin: 20px 0;
+ font-family: 'Roboto', sans-serif;
+ font-size: 30px;
+ font-weight: 300;
+}
+
+.text {
+ font-family: 'Roboto', sans-serif;
+ font-size: 14px;
+ line-height: 145%;
+ font-style: normal;
+
+ border: 1px solid lightgrey;
+ border-top-color: lightgreen;
+ border-radius: 3px;
+
+ column-count: 3;
+
+ padding: 10px;
+
+ box-shadow: 0 2px 3px lightgrey;
+
+ margin-bottom: 12px; /* damit control nicht so daran klebt */
+}
+
+@media only screen and (max-width: 1000px) {
+ .text {
+ column-count: 2;
+ }
+}
+
+@media only screen and (max-width: 500px) {
+ .text {
+ column-count: 1;
+ }
+}
+
+.text a {
+ color: lightgreen;
+}
+
+.text a:hover {
+ color: darkgreen;
+ text-decoration: none;
+}
+
+
+
+
+
+.table-wrapper {
+ font-family: 'Roboto', sans-serif;
+ margin-bottom: 15px;
+ vertical-align: middle;
+ width: 100%;
+ overflow-x: scroll;
+}
+
+table#t01 {
+ width: 100%;
+}
+
+table#t01 tr:nth-child(odd) {
+ background-color: lightgrey;
+}
+
+table#t01 th {
+ background-color: #fff;
+ white-space: nowrap; /* kein umbruch bei schmaler ansicht */
+}
+/* die sort up sort down icons neben den Spaltennamen */
+table#t01 th i {
+ font-size: 0.6em;
+ color: lightgreen;
+}
+
+table#t01 th, table#t01 td {
+ line-height: 1em;
+ padding: 11px 0;
+ font-size: 14px; /* same as section */
+}
+
+@media only screen and (max-width: 1200px) {
+ table#t01 th:nth-child(n+7), table#t01 td:nth-child(n+7) {
+ display: none;
+ }
+}
+@media only screen and (max-width: 900px) {
+ table#t01 th:nth-child(n+5), table#t01 td:nth-child(n+5) {
+ display: none;
+ }
+}
+@media only screen and (max-width: 600px) {
+ table#t01 th:nth-child(n+4), table#t01 td:nth-child(n+4) {
+ display: none;
+ }
+}
+
+.boxed {
+ border: 1px solid green;
+ width: 80%;
+ text-align: center;
+}
+
+th {
+ text-align: left;
+ border-bottom: 3px solid lightgrey;
+}
+
+.did {
+ border: 1px solid;
+ float: left;
+ padding: 2em;
+ min-height: 150px;
+ min-width: 250px;
+}
+
+.footer {
+ border-top: 2px solid lightgreen;
+ font-family: 'Roboto', sans-serif;
+ display: flex;
+ justify-content: space-between;
+ font-size: 12px;
+}
+.foo-left {
+ margin-top: 15px;
+ margin-bottom: 30px;
+}
+
+.foo-right {
+ margin-top: 15px;
+ margin-bottom: 30px;
+ text-align: right;
+}
+
+.option_list ul li {
+ display: inline;
+ list-style-type: none;
+}
+
+.option_list ul {
+ padding: 5px;
+}
+
+.option_list li {
+ padding: 3px;
+}
+
+/* hamburger menu stuff */
+
+@media only screen and (max-width: 950px) {
+ .topnav #hamburger-toggle {
+ display: block; /* normal net sichtbar */
+ margin-right: 20px;
+ }
+ .topnav .wambo {
+ justify-content: space-between;
+ }
+ .topnav #menu {
+ display: none;
+ background-color: #ffffff;
+ position: fixed; /* absolute geht nicht wenn das parent fixed ist ; muss auch fixed sein */
+ top: 77px;
+ right: 0;
+ left: 0;
+ }
+ .topnav a {
+ padding-top: 0;
+ height: 3em;
+ line-height: 3em;
+ }
+ .topnav #menu.active {
+ display: block;
+ }
+}
\ No newline at end of file
diff --git a/aufgabe2/css/reset.css b/aufgabe2/css/reset.css
new file mode 100644
index 0000000..d4ce537
--- /dev/null
+++ b/aufgabe2/css/reset.css
@@ -0,0 +1,139 @@
+/*
+ HTML5 Reset :: style.css
+ ----------------------------------------------------------
+ We have learned much from/been inspired by/taken code where offered from:
+
+ Eric Meyer :: http://meyerweb.com
+ HTML5 Doctor :: http://html5doctor.com
+ and the HTML5 Boilerplate :: http://html5boilerplate.com
+
+-------------------------------------------------------------------------------*/
+
+/* Let's default this puppy out
+-------------------------------------------------------------------------------*/
+
+html, body, body div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, figure, footer, header, menu, nav, section, time, mark, audio, video, details, summary {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font-weight: normal;
+ vertical-align: baseline;
+ background: transparent;
+}
+
+main, article, aside, figure, footer, header, nav, section, details, summary {display: block;}
+
+/* Handle box-sizing while better addressing child elements:
+ http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */
+html {
+ box-sizing: border-box;
+}
+
+*,
+*:before,
+*:after {
+ box-sizing: inherit;
+}
+
+/* consider resetting the default cursor: https://gist.github.com/murtaugh/5247154 */
+
+/* Responsive images and other embedded objects */
+/* if you don't have full control over `img` tags (if you have to overcome attributes), consider adding height: auto */
+img,
+object,
+embed {max-width: 100%;}
+
+/*
+ Note: keeping IMG here will cause problems if you're using foreground images as sprites.
+ In fact, it *will* cause problems with Google Maps' controls at small size.
+ If this is the case for you, try uncommenting the following:
+
+#map img {
+ max-width: none;
+}
+*/
+
+/* force a vertical scrollbar to prevent a jumpy page */
+html {overflow-y: scroll;}
+
+/* we use a lot of ULs that aren't bulleted.
+ you'll have to restore the bullets within content,
+ which is fine because they're probably customized anyway */
+ul {list-style: none;}
+
+blockquote, q {quotes: none;}
+
+blockquote:before,
+blockquote:after,
+q:before,
+q:after {content: ''; content: none;}
+
+a {margin: 0; padding: 0; font-size: 100%; vertical-align: baseline; background: transparent;}
+
+del {text-decoration: line-through;}
+
+abbr[title], dfn[title] {border-bottom: 1px dotted #000; cursor: help;}
+
+/* tables still need cellspacing="0" in the markup */
+table {border-collapse: separate; border-spacing: 0;}
+th {font-weight: bold; vertical-align: bottom;}
+td {font-weight: normal; vertical-align: top;}
+
+hr {display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0;}
+
+input, select {vertical-align: middle;}
+
+pre {
+ white-space: pre; /* CSS2 */
+ white-space: pre-wrap; /* CSS 2.1 */
+ white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
+ word-wrap: break-word; /* IE */
+}
+
+input[type="radio"] {vertical-align: text-bottom;}
+input[type="checkbox"] {vertical-align: bottom;}
+.ie7 input[type="checkbox"] {vertical-align: baseline;}
+.ie6 input {vertical-align: text-bottom;}
+
+select, input, textarea {font: 99% sans-serif;}
+
+small {font-size: 85%;}
+
+strong {font-weight: bold;}
+
+td, td img {vertical-align: top;}
+
+/* Make sure sup and sub don't mess with your line-heights http://gist.github.com/413930 */
+sub, sup {font-size: 75%; line-height: 0; position: relative;}
+sup {top: -0.5em;}
+sub {bottom: -0.25em;}
+
+/* standardize any monospaced elements */
+pre, code, kbd, samp {font-family: monospace, sans-serif;}
+
+/* hand cursor on clickable elements */
+.clickable,
+label,
+input[type=button],
+input[type=submit],
+input[type=file],
+button {cursor: pointer;}
+
+/* Webkit browsers add a 2px margin outside the chrome of form elements */
+button, input, select, textarea {margin: 0;}
+
+/* make buttons play nice in IE */
+button,
+input[type=button] {width: auto; overflow: visible;}
+
+/* scale images in IE7 more attractively */
+.ie7 img {-ms-interpolation-mode: bicubic;}
+
+/* prevent BG image flicker upon hover
+ (commented out as usage is rare, and the filter syntax messes with some pre-processors)
+.ie6 html {filter: expression(document.execCommand("BackgroundImageCache", false, true));}
+*/
+
+/* let's clear some floats */
+.clearfix:after { content: " "; display: block; clear: both; }
diff --git a/aufgabe2/index.php b/aufgabe2/index.php
new file mode 100644
index 0000000..df12e94
--- /dev/null
+++ b/aufgabe2/index.php
@@ -0,0 +1,95 @@
+
+
+
+
+
+ Page Title
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
World Data Overview ...
+
+
Li Europan lingues es membres del sam familie. Lor separat existentie es un myth. Por scientie,
+ musica, sport etc, litot Europa usa li sam vocabular. Li lingues differe solmen in li grammatica, li
+ pronunciation e li plu commun vocabules. Omnicos directe al desirabilite de un nov lingua franca: On refusa
+ continuar payar custosi traductores.
+
+ At solmen va esser necessi far uniform grammatica, pronunciation e plu sommun paroles. Ma quande lingues
+ coalesce, li grammatica del resultant lingue es plu simplic e regulari quam ti del coalescent lingues. Li
+ nov lingua franca va esser plu simplic e regulari quam li existent Europan lingues.
+
+ It va esser tam simplic quam Occidental in fact, it va esser Occidental. A un Angleso it va semblar un
+ simplificat Angles, quam un skeptic Cambridge amico dit me que Occidental es. Li Europan lingues es membres
+ del sam familie. Lor separat existentie es un myth. Por scientie, musica, sport etc, litot Europa usa li
+ sam vocabular. Li lingues differe solmen in li grammatica, li pronunciation e li plu commun vocabules.
+ Omnicos directe al desirabilite de un nov lingua franca: On refusa continuar payar custosi traductores.
+
+ At solmen va esser necessi far uniform grammatica, pronunciation e plu sommun paroles. jony_ipsum
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/aufgabe2/js/table.js b/aufgabe2/js/table.js
new file mode 100644
index 0000000..4ac659e
--- /dev/null
+++ b/aufgabe2/js/table.js
@@ -0,0 +1,285 @@
+// Source: https://blog.mounirmesselmeni.de/2012/11/20/reading-csv-file-with-javascript-and-html5-file-api/
+// Source: https://www.js-tutorials.com/javascript-tutorial/reading-csv-file-using-javascript-html5/
+// Source: https://stackoverflow.com/questions/13329853/reading-server-file-with-javascript
+// Source: https://www.w3schools.com/howto/howto_js_sort_table.asp
+// Source: https://stackoverflow.com/questions/19105009/how-to-insert-variables-in-javascript-strings
+
+window.onload = function () {
+ handleFile("resources/world_data_v1.csv");
+ registerHamburgerToggleClickListener();
+};
+
+function handleFile(path) {
+ // Check for the various File API support.
+ if (window.FileReader) {
+ // FileReader are supported.
+ var xmlhttp = new XMLHttpRequest();
+ xmlhttp.onreadystatechange = function () {
+ if (xmlhttp.status == 200 && xmlhttp.readyState == 4) {
+ processData(xmlhttp.responseText, path);
+ }
+ };
+ xmlhttp.open("GET", path, true);
+ xmlhttp.send();
+ } else {
+ alert('FileReader are not supported in this browser.');
+ }
+}
+
+function rerequestFile(path, columns) {
+ if (window.FileReader) {
+ // FileReader are supported.
+ var xmlhttp = new XMLHttpRequest();
+ xmlhttp.onreadystatechange = function () {
+ if (xmlhttp.status == 200 && xmlhttp.readyState == 4) {
+ updateTable(xmlhttp.responseText, columns);
+ }
+ };
+ xmlhttp.open("GET", path, true);
+ xmlhttp.send();
+ } else {
+ alert('FileReader are not supported in this browser.');
+ }
+}
+
+function processData(csv, path) {
+ var columnAmount = 7;
+ var table = "";
+ var checkbox = "";
+
+ // split rows
+ var allTextLines = csv.split(/\r\n|\n/);
+
+ // create table header
+ table += "
";
+ checkbox += "
";
+
+ var data = allTextLines[0].split(",");
+
+ for (var j = 0; j < columnAmount; j++) {
+ // create table column header
+ table += "
";
+ }
+
+ document.querySelector('#t01').innerHTML = table;
+}
+
+function sortTable(n) {
+ var table, rows, switching, i, x, y, shouldSwitch, dir, switchcount = 0;
+ table = document.getElementById("t01");
+ switching = true;
+
+ // Set the sorting direction to ascending:
+ dir = "asc";
+
+ /* Make a loop that will continue until
+ no switching has been done: */
+ while (switching) {
+ // Start by saying: no switching is done:
+ switching = false;
+ rows = table.rows;
+
+ /* Loop through all table rows (except the
+ first, which contains table headers): */
+ for (i = 1; i < (rows.length - 1); i++) {
+ // Start by saying there should be no switching:
+ shouldSwitch = false;
+
+ /* Get the two elements you want to compare,
+ one from current row and one from the next: */
+ x = rows[i].getElementsByTagName("td")[n];
+ y = rows[i + 1].getElementsByTagName("td")[n];
+
+ var first_element = x.innerHTML.toLowerCase();
+ var second_element = y.innerHTML.toLowerCase();
+
+ /* Check if the two rows should switch place,
+ based on the direction, asc or desc: */
+ if (dir == "asc") {
+ // check if the first element is a number, then assume the
+ // second element is also a number
+ if (isNaN(first_element)) {
+ if (first_element > second_element) {
+ // If so, mark as a switch and break the loop:
+ shouldSwitch = true;
+ break;
+ }
+ } else {
+ if (parseFloat(first_element) > parseFloat(second_element)) {
+ // If so, mark as a switch and break the loop:
+ shouldSwitch = true;
+ break;
+ }
+ }
+ } else if (dir == "desc") {
+ // check if the first element is a number, then assume the
+ // second element is also a number
+ if (isNaN(first_element)) {
+ if (first_element < second_element) {
+ // If so, mark as a switch and break the loop:
+ shouldSwitch = true;
+ break;
+ }
+ } else {
+ if (parseFloat(first_element) < parseFloat(second_element)) {
+ // If so, mark as a switch and break the loop:
+ shouldSwitch = true;
+ break;
+ }
+ }
+ }
+ }
+
+ if (shouldSwitch) {
+ /* If a switch has been marked, make the switch
+ and mark that a switch has been done: */
+ rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);
+ switching = true;
+
+ // Each time a switch is done, increase this count by 1:
+ switchcount++;
+ } else {
+ /* If no switching has been done AND the direction is "asc",
+ set the direction to "desc" and run the while loop again. */
+ if (switchcount == 0 && dir == "asc") {
+ dir = "desc";
+ switching = true;
+ }
+ }
+ }
+}
+
+function stringPerToSlash(columnname) {
+ return columnname.includes(" per ") ? columnname.replace(" per ", " / ") : columnname;
+}
+
+function registerHamburgerToggleClickListener() {
+ let menu = document.querySelector("#menu");
+ let header = document.querySelector("#header");
+ let section = document.querySelector("#section");
+ document.querySelector("#hamburger-toggle").addEventListener('click', function () {
+ if (menu.classList.contains('active')) {
+ // menu ausblenden
+ document.querySelector("#menu").classList.remove('active');
+ section.style.marginTop = 0;
+ } else {
+ // menu einblenden
+ document.querySelector("#menu").classList.add('active');
+ let height1 = header.clientHeight;
+ let height2 = menu.clientHeight;
+ section.style.marginTop = height1 + height2 + 10 + 'px'; // + 10 für zusätzlichen abstand (klebt sonst aneinander)
+ }
+
+
+ });
+}
\ No newline at end of file
diff --git a/aufgabe2/parse.php b/aufgabe2/parse.php
new file mode 100644
index 0000000..ffaf151
--- /dev/null
+++ b/aufgabe2/parse.php
@@ -0,0 +1,7 @@
+