Browse Source

[master] Favicon und Überschriften bearbeitet. Zudem Bild eingefügt.

master
Christian Martin 4 years ago
commit
19a74bfd1e

+ 4
- 0
app/css/mobile.css View File

@@ -0,0 +1,4 @@
h2 small {
color: rgb(228, 122, 35);
font-size: large;
}

BIN
app/einkaufswagen.jpg View File


BIN
app/img/faviconNotiz.ico View File


+ 26
- 0
app/index.html View File

@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Notizen</title>
<link rel="icon" href="img/faviconNotiz.ico">
<link rel="stylesheet" href="css/mobile.css">
</head>
<body>
<h1>Notizen</h1>
<h2>
Willkommen!
<small>Meine Notizen mobil verfügbar</small>
</h2>
<p>Einkaufsnotizen.</p>

<p>Sie können sich ruhig etwas umsehen. Im Blog dokumentiere ich meine Erfahrungen beim Programmieren. Daneben können Sie auch meine Webprojekte anschauen. Viel Spass.</p>

<img src="einkaufswagen.jpg" alt="Foto von mir">

<p>Marco :-)</p>
<script src="lib/es6-shim.min.js"></script>
<script src="lib/jquery-2.2.4.min.js"></script>
<script src="scripts/notizen.js"></script>
</body>
</html>

+ 12
- 0
app/lib/es6-shim.min.js
File diff suppressed because it is too large
View File


+ 4
- 0
app/lib/jquery-2.2.4.min.js
File diff suppressed because it is too large
View File


+ 2
- 0
app/scripts/app.js View File

@@ -0,0 +1,2 @@

alert("Hello World!");

+ 85
- 0
app/scripts/notizen.js View File

@@ -0,0 +1,85 @@
function simulation() {
var v = -1000;
var s = 50000;
var fuel = 10000;
var schub = false;
update();

function switchOn() {
update();
schub = true;
}

function switchOff() {
update();
schub = false;
}

function a() {
if (schub == false || fuel <= 0)
return -1.63;
else {
fuel = fuel - 100;
return -1.63 + 12;
}
}

function update() {
if (checkGameOver() == true) {
setStartValues();
showCurrentValues()
}
else if ((checkGameOver() == false) && (s < 0) && (v > -10)) {
setStartValues();
showCurrentValues();
}
else {
v = v + a();
s = s + v;
showCurrentValues();
}
}

function checkGameOver() {
if (s < 0)
if (v < -10) {
alert("Zerschellt. Game Over");
return true;
}
else {
return false;
}
else {
return false;
}
}

function setStartValues() {
v = -1000;
s = 50000;
fuel = 10000;
schub = false;
return;
}

function showCurrentValues() {
$("#height").html("Höhe: " + s + " m");
$("#speed").html("Geschwindigkeit: " + v + " m/s");
$("#fuel").html("Treibstoffvorrat: " + fuel + " l");
return;
}

$("body").append("<div id='height'>Höhe: </div>");
$("body").append("<div id='speed'>Geschwindigkeit: </div>");
$("body").append("<div id='fuel'>Treibstoffvorrat: </div>");

$("body").append("<button id='energy'>Triebwerk an</button>");
$("body").append("<button id='no-energy'>Triebwerk aus</button>");

$("#energy").click(switchOn);
$("#no-energy").click(switchOff);
}

$(document).ready(simulation);



Loading…
Cancel
Save