commit 054170cd93cb0dc10c38f888a9e03e677520b0b8 Author: camill Date: Tue Nov 25 22:19:21 2025 +0100 latest version diff --git a/feedback.html b/feedback.html new file mode 100644 index 0000000..70a5bd9 --- /dev/null +++ b/feedback.html @@ -0,0 +1,43 @@ + + + + + SpaceTaxi Quittung + + + + + +
+ Hallo was auch immerdas gibt ein großes Feuerwerk im ALl und vieles vieles mehr +
+ + + \ No newline at end of file diff --git a/planets/planet1.svg b/planets/planet1.svg new file mode 100644 index 0000000..567cfd4 --- /dev/null +++ b/planets/planet1.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/planets/planet2.svg b/planets/planet2.svg new file mode 100644 index 0000000..3d16787 --- /dev/null +++ b/planets/planet2.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/planets/planet3.svg b/planets/planet3.svg new file mode 100644 index 0000000..611c4f4 --- /dev/null +++ b/planets/planet3.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/planets/planet4.svg b/planets/planet4.svg new file mode 100644 index 0000000..2354eb7 --- /dev/null +++ b/planets/planet4.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/planets/planet5.svg b/planets/planet5.svg new file mode 100644 index 0000000..cf8de8a --- /dev/null +++ b/planets/planet5.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/spacetaxi.css b/spacetaxi.css new file mode 100644 index 0000000..90dcd3f --- /dev/null +++ b/spacetaxi.css @@ -0,0 +1,200 @@ +body, +form { + + font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; + background-color: black; + + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + color: white; + + overflow: hidden; +} + +.zelle, +.doppelzelle { + margin-top: 2vw; + border: 3px solid white; + width: 50vw; + height: 5vw; + border-radius: 15px; +} + +.doppelzelle { + border: 0; + display: flex; + justify-content: space-between; + height: 10vw; +} + +#option, +#select { + height: 10vw; + width: 20vw; + margin: 0; + display: flex; + flex-direction: column; + align-items: flex-start; +} + + + +#logo { + display: flex; + margin-left: 2vw; +} + +#login { + display: flex; + gap: 1vw; + margin-right: 2vw; + align-items: center; +} + +#account { + display: flex; + justify-content: space-between; + align-items: center; +} + + +#username, +#password { + border: 0; + border-bottom: 0.1vw solid white; + background-color: rgba(255, 255, 255, 0); + width: 6vw; +} + +input, +select, +textarea { + color: white; + height: 1vw; + ; +} + + +#unternehmen { + color: white; + text-align: center; + justify-content: center; + font-size: 2vw; +} + +#planeten { + height: 15vw; + display: flex; +} + +#planet1 { + margin-left: 3vw; + margin-right: 3vw; +} + +#planet2 { + margin-top: 6vw; + +} + +#planet3 { + margin-top: 1vw; + margin-right: 3vw; + +} + +#planet4 { + margin-top: 4vw; + +} + +#planet5 { + margin-left: 6vw; + margin-top: 2vw; + +} + +#planet1, +#planet2, +#planet3, +#planet4, +#planet5 { + cursor: grabbing; +} + +#score { + width: 41vw; +} + + +.subtitle { + align-self: center; +} + +.check, +.radio { + margin-left: 1vw; + margin-top: 0.5vw; +} + +#check-grid { + display: grid; + grid-template-columns: 1fr 1fr; + grid-template-rows: 1fr 1fr 1fr; +} + +#score { + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr; + align-items: center; + justify-content: space-evenly; + + padding-left: 2vw; +} + +.scorefield { + display: flex; + width: 8vw; + align-items: center; + gap: 1vw; +} + +#planetensum, +#dauersum, +#kostensum { + display: flex; + align-items: center; + justify-content: center; + border: 1px solid white; + height: 3vw; + width: 3vw; + box-sizing: border-box; +} + +#launch { + font-size: 3vh; + text-shadow: -1px 1px 0 #000000; + cursor: grabbing; + margin-left: 2vw; + background-color: rgb(143, 6, 6); + color: rgb(255, 255, 255); + width: 6vw; + height: 6vh; + border: 0; + border-radius: 15px; +} + +#launch:hover { + background-color: rgb(196, 50, 6); +} + +particle { + border-radius: 50%; + left: 0; + pointer-events: none; + position: fixed; + top: 0; + opacity: 0; +} diff --git a/spacetaxi.html b/spacetaxi.html new file mode 100644 index 0000000..432dada --- /dev/null +++ b/spacetaxi.html @@ -0,0 +1,260 @@ + + + + + + SpaceTaxi + + + + + +
+
+ +
+

username:

+ +

password:

+ +
+
+
+
+

Wähle dein Raumschiff aus

+ + + +
+
+

Wähle deine Ausstattung aus

+
+ + + + + + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+

Planeten

+
0
+
+
+

Dauer

+
0y +
+
+
+

Kosten

+
0M$
+
+ +
+ + + +
+ + + + + \ No newline at end of file diff --git a/spacetaxi.js b/spacetaxi.js new file mode 100644 index 0000000..51e6efc --- /dev/null +++ b/spacetaxi.js @@ -0,0 +1,115 @@ +document.addEventListener('DOMContentLoaded', init); + +list_id = [0, 0, 0, 0, 0]; + +function init() { + create_star_field(100); + document.querySelectorAll('input[name="spaceship"]').forEach(radio => { + radio.addEventListener('change', update_score); + }); + //myForm.password.addEventListener('change', check_password); + //myForm.spaceship.addEventListener('change', update_score); + document.querySelectorAll('svg').forEach(function (svg) { svg.addEventListener('click', printClicked) }); + +} + +function create_star_field(n) +{ + for (let i = 0; i < n; i++) + { + create_star(); + } +} + +function create_star() +{ + + const x = Math.floor(Math.random() * window.innerWidth); + const y = Math.floor(Math.random() * window.innerHeight); + + const star = document.createElement('particle'); + + document.body.appendChild(star); + + star.style.position = 'absolute'; + star.style.opacity = '1'; + star.style.zIndex = '-1'; + + const size = Math.round(Math.random() * 5); + + star.style.height = `${size}px`; + star.style.width = `${size}px`; + + star.style.background = '#ffffff'; + + star.style.left = `${x}px`; + star.style.top = `${y}px`; +} + +function check_password(e) { + return +} + +function check_username(e) { + return +} + +function printClicked(e) { + const planet_id = e.currentTarget.id; + const svg_element = e.currentTarget; + + planet_index = planet_id[planet_id.length - 1] - 1 + if (list_id[planet_index] == 1) { + svg_element.querySelectorAll("path")[0].setAttribute("stroke", "#ffffff"); + svg_element.querySelectorAll("path")[0].setAttribute("stroke-width", "2"); + list_id[planet_index] = 0; + + } + else { + svg_element.querySelectorAll("path")[0].setAttribute("stroke", "#ff0000f0"); + svg_element.querySelectorAll("path")[0].setAttribute("stroke-width", "0.4vw"); + list_id[planet_index] = 1; + } + + update_score() +} + +function update_score() { + planet_sum = document.getElementById("planetensum"); + dauer_sum = document.getElementById("dauersum"); + kosten_sum = document.getElementById("kostensum"); + + current_sum = 0; + id_sum = 0; + + + for (let a = 0; a < 5; a++) { + if (list_id[a] == 1) { + current_sum += 1; + id_sum += a + 1; + } + } + + + + dauer_sum.textContent = Math.round(id_sum / 2) + "y"; + //dauer_sum.textContent += "d"; + + planet_sum.textContent = current_sum; + let rocket_factor = 1.0; + let rocket_selected = document.querySelectorAll("form")[0].spaceship.value; + switch (rocket_selected) { + case "rocket1": rocket_factor = 1.5; break; + case "rocket2": rocket_factor = 0.75; break; + case "rocket3": rocket_factor = 2.5; break; + default: rocket_factor = 0; break; + } + + kosten_sum.textContent = Math.round(id_sum * rocket_factor) + "M$"; + + document.getElementById("planete").value = planet_sum.textContent; + document.getElementById("dauer").value = dauer_sum.textContent; + document.getElementById("kosten").value = kosten_sum.textContent; +} + + diff --git a/spacetaxi.php b/spacetaxi.php new file mode 100644 index 0000000..ba2e1f6 --- /dev/null +++ b/spacetaxi.php @@ -0,0 +1,5 @@ + \ No newline at end of file