Moved Repository
This commit is contained in:
parent
ccd5991c58
commit
eb336f6bd7
|
|
@ -1,8 +1,8 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
mongodb/
|
mongodb/
|
||||||
data/
|
data/
|
||||||
|
|
||||||
Aufgaben/Aufgabe_10_2020-07-01
|
Aufgaben/Aufgabe_10_2020-07-01
|
||||||
|
|
||||||
Endabgabe/#archiv
|
Endabgabe/#archiv
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
{
|
{
|
||||||
// Use IntelliSense to learn about possible attributes.
|
// Use IntelliSense to learn about possible attributes.
|
||||||
// Hover to view descriptions of existing attributes.
|
// Hover to view descriptions of existing attributes.
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"type": "chrome",
|
"type": "chrome",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "Launch Chrome against localhost",
|
"name": "Launch Chrome against localhost",
|
||||||
"url": "http://localhost:8080",
|
"url": "http://localhost:8080",
|
||||||
"webRoot": "${workspaceFolder}"
|
"webRoot": "${workspaceFolder}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"liveServer.settings.port": 5502
|
"liveServer.settings.port": 5502
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title> Aufgabe 0 </title>
|
<title> Aufgabe 0 </title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1 style="text-align:center"> Wer das liest, ist ein toller Mensch ♥ </h1>
|
<h1 style="text-align:center"> Wer das liest, ist ein toller Mensch ♥ </h1>
|
||||||
<image src="picture.jpg" alt="Schade, ich konnte dein Bild nicht finden :c" style="width:100%;height:auto;"/>
|
<image src="picture.jpg" alt="Schade, ich konnte dein Bild nicht finden :c" style="width:100%;height:auto;"/>
|
||||||
</body>
|
</body>
|
||||||
|
|
@ -1,30 +1,30 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title> Aufgabe 01 </title>
|
<title> Aufgabe 01 </title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<a href="#Anker-Tag"> Hier ist der Anker zu deinem Glück! <br> </a>
|
<a href="#Anker-Tag"> Hier ist der Anker zu deinem Glück! <br> </a>
|
||||||
<image src="portrait_zuschnitt.png" alt="This is supposed to be a picture of me!"/>
|
<image src="portrait_zuschnitt.png" alt="This is supposed to be a picture of me!"/>
|
||||||
<h1> THIS IS ME </h1>
|
<h1> THIS IS ME </h1>
|
||||||
<p> Ich bin Justin. Ich mag Kekse. Ich studiere Medieninformatik im zweiten Semester. Du möchtest mehr über mich wissen? Dann frag mich doch. :3 <br> </p>
|
<p> Ich bin Justin. Ich mag Kekse. Ich studiere Medieninformatik im zweiten Semester. Du möchtest mehr über mich wissen? Dann frag mich doch. :3 <br> </p>
|
||||||
<h1> THIS IS MY FUTURE </h1>
|
<h1> THIS IS MY FUTURE </h1>
|
||||||
<p> Ich mag Informatik aber auch Medien. Also studiere ich Medieninformatik! <br> </p>
|
<p> Ich mag Informatik aber auch Medien. Also studiere ich Medieninformatik! <br> </p>
|
||||||
|
|
||||||
<p> Hier ist ein Link für: <a href="https://www.youtube.com/" target:"_blank">Youtube</a></p>
|
<p> Hier ist ein Link für: <a href="https://www.youtube.com/" target:"_blank">Youtube</a></p>
|
||||||
|
|
||||||
<p> Homepage von Janina: <a href="https://janinacpb.github.io/GIS-SoSe-2020/Aufgabe01/aufgabe1.html" target:"_blank">Press me!</a></p>
|
<p> Homepage von Janina: <a href="https://janinacpb.github.io/GIS-SoSe-2020/Aufgabe01/aufgabe1.html" target:"_blank">Press me!</a></p>
|
||||||
<p> Homepage von Linda: <a href="https://linlin94.github.io/GiS_SoSe2020/Abgaben/Aufgabe_01" target:"_blank">Press me!</a></p>
|
<p> Homepage von Linda: <a href="https://linlin94.github.io/GiS_SoSe2020/Abgaben/Aufgabe_01" target:"_blank">Press me!</a></p>
|
||||||
<p> Homepage von Jacqueline: <a href="https://jk-jacki.github.io/GIS_SoSe2020/Aufgabe01/" target:"_blank">Press me!</a></p>
|
<p> Homepage von Jacqueline: <a href="https://jk-jacki.github.io/GIS_SoSe2020/Aufgabe01/" target:"_blank">Press me!</a></p>
|
||||||
|
|
||||||
<p id="Anker-Tag">
|
<p id="Anker-Tag">
|
||||||
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
|
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
|
||||||
You've found me ó_ò <br>
|
You've found me ó_ò <br>
|
||||||
Here, have a cookie (UwU)~🍪
|
Here, have a cookie (UwU)~🍪
|
||||||
</p>
|
</p>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,78 +1,78 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title> About Me </title>
|
<title> About Me </title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<p> Here you get ( o-o)~[ 20€ ] </p>
|
<p> Here you get ( o-o)~[ 20€ ] </p>
|
||||||
<p> Now you have to get me an A++ (ò-ó) </p>
|
<p> Now you have to get me an A++ (ò-ó) </p>
|
||||||
|
|
||||||
<p> <b>Hier</b> kommt ihr zu den anderen Seiten </p>
|
<p> <b>Hier</b> kommt ihr zu den anderen Seiten </p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="about_me.html"> About mew! </a>
|
<a href="about_me.html"> About mew! </a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="contact.html"> Kontaktiere mich doch :3 </a>
|
<a href="contact.html"> Kontaktiere mich doch :3 </a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="portfolio.html"> Portfolio </a>
|
<a href="portfolio.html"> Portfolio </a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h1> This is real, this is me</h1>
|
<h1> This is real, this is me</h1>
|
||||||
<h2> This is exactly, where I'm supposed to be ♫ </h2>
|
<h2> This is exactly, where I'm supposed to be ♫ </h2>
|
||||||
|
|
||||||
<h4> Damit das "about mew!" mal gerechtfertigt ist:</h4>
|
<h4> Damit das "about mew!" mal gerechtfertigt ist:</h4>
|
||||||
<p> Mew is also a Pokémon! </p>
|
<p> Mew is also a Pokémon! </p>
|
||||||
<embed src="files/pokeball.png" width="200" height="240" />
|
<embed src="files/pokeball.png" width="200" height="240" />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label>Süß, oder?</label>
|
<label>Süß, oder?</label>
|
||||||
<input type="checkbox">
|
<input type="checkbox">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th> Hello </th>
|
<th> Hello </th>
|
||||||
<th> I'm </th>
|
<th> I'm </th>
|
||||||
<th> a </th>
|
<th> a </th>
|
||||||
<th> table </th>
|
<th> table </th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> a table </td>
|
<td> a table </td>
|
||||||
<td> without css </td>
|
<td> without css </td>
|
||||||
<td> is </td>
|
<td> is </td>
|
||||||
<td> ugly </td>
|
<td> ugly </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> a table </td>
|
<td> a table </td>
|
||||||
<td> without css </td>
|
<td> without css </td>
|
||||||
<td> is </td>
|
<td> is </td>
|
||||||
<td> ugly </td>
|
<td> ugly </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table> <br>
|
</table> <br>
|
||||||
|
|
||||||
<img src="files/robin-redbreast-in-tree-5038867_640.jpg" alt="Cheep Cheep, I'm a Sheep" width="200" height="200" /> <br><br>
|
<img src="files/robin-redbreast-in-tree-5038867_640.jpg" alt="Cheep Cheep, I'm a Sheep" width="200" height="200" /> <br><br>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
Quick Mafs! <br>
|
Quick Mafs! <br>
|
||||||
<code>
|
<code>
|
||||||
x = 5; <br>
|
x = 5; <br>
|
||||||
y = 3; <br>
|
y = 3; <br>
|
||||||
x + y = 8;
|
x + y = 8;
|
||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li> Ich kann schon </li>
|
<li> Ich kann schon </li>
|
||||||
<li> den Zahlenbereich </li>
|
<li> den Zahlenbereich </li>
|
||||||
<li> von 1 bis 20 </li>
|
<li> von 1 bis 20 </li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,58 +1,58 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title> Contact </title>
|
<title> Contact </title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<p> Look for stuff py pressing <kbd>Ctrl + F</kbd> </p>
|
<p> Look for stuff py pressing <kbd>Ctrl + F</kbd> </p>
|
||||||
|
|
||||||
<p> <b>Hier</b> kommt ihr zu den anderen Seiten </p>
|
<p> <b>Hier</b> kommt ihr zu den anderen Seiten </p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="about_me.html"> About mew! </a>
|
<a href="about_me.html"> About mew! </a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="contact.html"> Kontaktiere mich doch :3 </a>
|
<a href="contact.html"> Kontaktiere mich doch :3 </a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="portfolio.html"> Portfolio </a>
|
<a href="portfolio.html"> Portfolio </a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label>What are you looking for? </label>
|
<label>What are you looking for? </label>
|
||||||
<input type="text">
|
<input type="text">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p> Hier ist eine <a href="files/leertext.pdf">PDF</a> mit Leertext verlinkt! </p>
|
<p> Hier ist eine <a href="files/leertext.pdf">PDF</a> mit Leertext verlinkt! </p>
|
||||||
<p> Diese dient dazu, genug Datentypen für die Aufgabe zu verwenden. </p>
|
<p> Diese dient dazu, genug Datentypen für die Aufgabe zu verwenden. </p>
|
||||||
|
|
||||||
<h2> Mail </h2>
|
<h2> Mail </h2>
|
||||||
<p> Justin.Dretvic@hs-furtwangen.de </p>
|
<p> Justin.Dretvic@hs-furtwangen.de </p>
|
||||||
|
|
||||||
<h2> Facebook </h2>
|
<h2> Facebook </h2>
|
||||||
<img src="files/f_logo_RGB-Blue_58.png" alt="Facebook Logo" />
|
<img src="files/f_logo_RGB-Blue_58.png" alt="Facebook Logo" />
|
||||||
<p> Here is a related quote:</p>
|
<p> Here is a related quote:</p>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>We're running the company to serve more people.</p>
|
<p>We're running the company to serve more people.</p>
|
||||||
<p>Said by: Mark Zuckerberg</p>
|
<p>Said by: Mark Zuckerberg</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
|
|
||||||
<h2> Instagram </h2>
|
<h2> Instagram </h2>
|
||||||
<img src="files/glyph-logo_May2016.png" width="130" heigth="130" alt="Instagram Logo" />
|
<img src="files/glyph-logo_May2016.png" width="130" heigth="130" alt="Instagram Logo" />
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<div>
|
<div>
|
||||||
<p> Dieser Inhalt steht in einem footer! </p>
|
<p> Dieser Inhalt steht in einem footer! </p>
|
||||||
<p> Jegliche Inhalte werden nicht monetär verwendet! </p>
|
<p> Jegliche Inhalte werden nicht monetär verwendet! </p>
|
||||||
<p> Alle Bilder, die keine Logos sind, wurden von <a href="https://pixabay.com/de/">https://pixabay.com/de/</a> bezogen </p>
|
<p> Alle Bilder, die keine Logos sind, wurden von <a href="https://pixabay.com/de/">https://pixabay.com/de/</a> bezogen </p>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,51 +1,51 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title> Portfolio </title>
|
<title> Portfolio </title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<h1> Willkommen auf meiner Website</h1>
|
<h1> Willkommen auf meiner Website</h1>
|
||||||
|
|
||||||
<h3> Ich bin ein Fan davon, Anforderungen zu abusen </h3>
|
<h3> Ich bin ein Fan davon, Anforderungen zu abusen </h3>
|
||||||
|
|
||||||
<h5> <del> Ich hab jetzt schon 3 HTML-Elemente </del> </h5>
|
<h5> <del> Ich hab jetzt schon 3 HTML-Elemente </del> </h5>
|
||||||
|
|
||||||
<p> <b>Hier</b> kommt ihr zu den anderen Seiten </p>
|
<p> <b>Hier</b> kommt ihr zu den anderen Seiten </p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="about_me.html"> About mew! </a>
|
<a href="about_me.html"> About mew! </a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="contact.html"> Kontaktiere mich doch :3 </a>
|
<a href="contact.html"> Kontaktiere mich doch :3 </a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="portfolio.html"> Portfolio </a>
|
<a href="portfolio.html"> Portfolio </a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a href="#anchor"> Don't click on me </a> <br><br>
|
<a href="#anchor"> Don't click on me </a> <br><br>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label>Klick mal drauf, das könnte irgendwann hilfreich werden: </label>
|
<label>Klick mal drauf, das könnte irgendwann hilfreich werden: </label>
|
||||||
<input type="color">
|
<input type="color">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button> Sinnloser Button. ACHTUNG! SINNLOS!!! </button> <br><br>
|
<button> Sinnloser Button. ACHTUNG! SINNLOS!!! </button> <br><br>
|
||||||
|
|
||||||
<iframe width="1280" height="720" src="https://www.youtube.com/embed/-8SY-1f6xn0"
|
<iframe width="1280" height="720" src="https://www.youtube.com/embed/-8SY-1f6xn0"
|
||||||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
|
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
|
||||||
</iframe> <br><br>
|
</iframe> <br><br>
|
||||||
|
|
||||||
<p> Don't you dare pressing on the play-button! I warned you! </p>
|
<p> Don't you dare pressing on the play-button! I warned you! </p>
|
||||||
<audio controls id="anchor">
|
<audio controls id="anchor">
|
||||||
<source src="files/Battle_Cry_High_Pitch.mp3" type="audio/ogg">
|
<source src="files/Battle_Cry_High_Pitch.mp3" type="audio/ogg">
|
||||||
Your browser does not support the audio element.
|
Your browser does not support the audio element.
|
||||||
</audio> <br>
|
</audio> <br>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,161 +1,161 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title> used tags </title>
|
<title> used tags </title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th> tag </th>
|
<th> tag </th>
|
||||||
<th> Nutzen</th>
|
<th> Nutzen</th>
|
||||||
<th> portfolio </th>
|
<th> portfolio </th>
|
||||||
<th> About_me </th>
|
<th> About_me </th>
|
||||||
<th> contact </th>
|
<th> contact </th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <h1–6> </td>
|
<td> <h1–6> </td>
|
||||||
<td> header </td>
|
<td> header </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <p> </td>
|
<td> <p> </td>
|
||||||
<td> paragraph</td>
|
<td> paragraph</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <del> </td>
|
<td> <del> </td>
|
||||||
<td> deleted </td>
|
<td> deleted </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <a> </td>
|
<td> <a> </td>
|
||||||
<td> anchor </td>
|
<td> anchor </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <ul> </td>
|
<td> <ul> </td>
|
||||||
<td> unordered list </td>
|
<td> unordered list </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <ol> </td>
|
<td> <ol> </td>
|
||||||
<td> ordered list </td>
|
<td> ordered list </td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <div> </td>
|
<td> <div> </td>
|
||||||
<td> Container </td>
|
<td> Container </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <table> </td>
|
<td> <table> </td>
|
||||||
<td> Tabelle </td>
|
<td> Tabelle </td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <code> </td>
|
<td> <code> </td>
|
||||||
<td> code-block</td>
|
<td> code-block</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <img> </td>
|
<td> <img> </td>
|
||||||
<td> image </td>
|
<td> image </td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <button> </td>
|
<td> <button> </td>
|
||||||
<td> button </td>
|
<td> button </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <iframe> </td>
|
<td> <iframe> </td>
|
||||||
<td> iframe </td>
|
<td> iframe </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <audio> </td>
|
<td> <audio> </td>
|
||||||
<td> audio control </td>
|
<td> audio control </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <br> </td>
|
<td> <br> </td>
|
||||||
<td> break </td>
|
<td> break </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <embed> </td>
|
<td> <embed> </td>
|
||||||
<td> embed </td>
|
<td> embed </td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <label> </td>
|
<td> <label> </td>
|
||||||
<td> label </td>
|
<td> label </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <input> </td>
|
<td> <input> </td>
|
||||||
<td> input </td>
|
<td> input </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <footer> </td>
|
<td> <footer> </td>
|
||||||
<td> footer </td>
|
<td> footer </td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <blockquote> </td>
|
<td> <blockquote> </td>
|
||||||
<td> blockquote </td>
|
<td> blockquote </td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <b> </td>
|
<td> <b> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,127 +1,127 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="basic.css">
|
<link rel="stylesheet" href="basic.css">
|
||||||
<link rel="stylesheet" href="about_me.css">
|
<link rel="stylesheet" href="about_me.css">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
<title> About Me </title>
|
<title> About Me </title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<svg width="650" height="160">
|
<svg width="650" height="160">
|
||||||
<ellipse cx="325" cy="0" rx="300" ry="150" stroke="#011f4b" stroke-width="5" fill="#005b96" />
|
<ellipse cx="325" cy="0" rx="300" ry="150" stroke="#011f4b" stroke-width="5" fill="#005b96" />
|
||||||
<text fill="#ffffff" font-size="50" x="200" y="60"> A B O U T </text>
|
<text fill="#ffffff" font-size="50" x="200" y="60"> A B O U T </text>
|
||||||
<text fill="#ffffff" font-size="50" x="260" y="110"> M E </text>
|
<text fill="#ffffff" font-size="50" x="260" y="110"> M E </text>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="navigation">
|
<div class="navigation">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="about_me.html" class="active"> About Me! </a>
|
<a href="about_me.html" class="active"> About Me! </a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="contact.html"> Contact </a>
|
<a href="contact.html"> Contact </a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="portfolio.html"> Portfolio </a>
|
<a href="portfolio.html"> Portfolio </a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="achthundert">
|
<div class="achthundert">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p id="dollar"> Here you get ( o-o)~[ 20€ ] </p>
|
<p id="dollar"> Here you get ( o-o)~[ 20€ ] </p>
|
||||||
<p id="aplus"> Now you HAVE TO get me an A++ (ò-ó) </p>
|
<p id="aplus"> Now you HAVE TO get me an A++ (ò-ó) </p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="heading">
|
<div id="heading">
|
||||||
<h1> This is real, this is me</h1>
|
<h1> This is real, this is me</h1>
|
||||||
<h2> This is exactly, where I'm supposed to be ♫ </h2>
|
<h2> This is exactly, where I'm supposed to be ♫ </h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="pokemon">
|
<div id="pokemon">
|
||||||
<h4> I'm a D I G I M O N </h4>
|
<h4> I'm a D I G I M O N </h4>
|
||||||
<a href="https://wallpaperaccess.com/full/31008.jpg">
|
<a href="https://wallpaperaccess.com/full/31008.jpg">
|
||||||
<img src="files/pokeball.png" alt="pokeball" width="200" height="240" />
|
<img src="files/pokeball.png" alt="pokeball" width="200" height="240" />
|
||||||
</a>
|
</a>
|
||||||
<div>
|
<div>
|
||||||
<label>Süß, oder?</label>
|
<label>Süß, oder?</label>
|
||||||
<input type="checkbox">
|
<input type="checkbox">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th> WHICH </th>
|
<th> WHICH </th>
|
||||||
<th> ONE </th>
|
<th> ONE </th>
|
||||||
<th> AM </th>
|
<th> AM </th>
|
||||||
<th> I? </th>
|
<th> I? </th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="eagle"> <embed class="eagle" src="files/eagle.jpg" type="image/jpeg" width="100" height="100"> </td>
|
<td class="eagle"> <embed class="eagle" src="files/eagle.jpg" type="image/jpeg" width="100" height="100"> </td>
|
||||||
<td class="eagle"> <embed src="files/eagle.jpg" type="image/jpeg" width="100" height="100"> </td>
|
<td class="eagle"> <embed src="files/eagle.jpg" type="image/jpeg" width="100" height="100"> </td>
|
||||||
<td class="eagle"> <embed src="files/eagle.jpg" type="image/jpeg" width="100" height="100"> </td>
|
<td class="eagle"> <embed src="files/eagle.jpg" type="image/jpeg" width="100" height="100"> </td>
|
||||||
<td class="eagle"> <embed src="files/eagle.jpg" type="image/jpeg" width="100" height="100"> </td>
|
<td class="eagle"> <embed src="files/eagle.jpg" type="image/jpeg" width="100" height="100"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="eagle"> <embed src="files/eagle.jpg" type="image/jpeg" width="100" height="100"> </td>
|
<td class="eagle"> <embed src="files/eagle.jpg" type="image/jpeg" width="100" height="100"> </td>
|
||||||
<td class="eagle"> <embed src="files/eagle.jpg" type="image/jpeg" width="100" height="100"> </td>
|
<td class="eagle"> <embed src="files/eagle.jpg" type="image/jpeg" width="100" height="100"> </td>
|
||||||
<td id="peep"> <embed src="files/robin-redbreast-in-tree-5038867_640.jpg" type="image/jpeg" width="100"
|
<td id="peep"> <embed src="files/robin-redbreast-in-tree-5038867_640.jpg" type="image/jpeg" width="100"
|
||||||
height="100"> </td>
|
height="100"> </td>
|
||||||
<td class="eagle"> <embed src="files/eagle.jpg" type="image/jpeg" width="100" height="100"> </td>
|
<td class="eagle"> <embed src="files/eagle.jpg" type="image/jpeg" width="100" height="100"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table> <br>
|
</table> <br>
|
||||||
|
|
||||||
<div id="kasten_außen">
|
<div id="kasten_außen">
|
||||||
<div class="kasten">
|
<div class="kasten">
|
||||||
Quick Mafs! <br>
|
Quick Mafs! <br>
|
||||||
<code>
|
<code>
|
||||||
x = 5; <br>
|
x = 5; <br>
|
||||||
y = 3; <br>
|
y = 3; <br>
|
||||||
x + y = 8;
|
x + y = 8;
|
||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="kasten">
|
<div class="kasten">
|
||||||
<ol>
|
<ol>
|
||||||
<li> Ich kann schon </li>
|
<li> Ich kann schon </li>
|
||||||
<li> den Zahlenbereich </li>
|
<li> den Zahlenbereich </li>
|
||||||
<li> von 1 bis 20 </li>
|
<li> von 1 bis 20 </li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="dozent">
|
<div id="dozent">
|
||||||
<p> Ich saß zu viele Stunden an der Aufgabe, irgendwann hab ich das Design nur noch sehr einfach gehalten.
|
<p> Ich saß zu viele Stunden an der Aufgabe, irgendwann hab ich das Design nur noch sehr einfach gehalten.
|
||||||
Bitte
|
Bitte
|
||||||
vergebt mir, Eure Dozentheit! :c</p>
|
vergebt mir, Eure Dozentheit! :c</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<div>
|
<div>
|
||||||
<p> Dieser Inhalt steht in einem footer! </p>
|
<p> Dieser Inhalt steht in einem footer! </p>
|
||||||
<p> Jegliche Inhalte werden nicht monetär verwendet! </p>
|
<p> Jegliche Inhalte werden nicht monetär verwendet! </p>
|
||||||
<p> Alle Bilder, die keine Logos sind, wurden von
|
<p> Alle Bilder, die keine Logos sind, wurden von
|
||||||
<a href="https://pixabay.com/de/"> Pixabay</a> bezogen </p>
|
<a href="https://pixabay.com/de/"> Pixabay</a> bezogen </p>
|
||||||
<div class="second_nav">
|
<div class="second_nav">
|
||||||
<a href=""> <i class="fa fa-facebook-square"></i> </a>
|
<a href=""> <i class="fa fa-facebook-square"></i> </a>
|
||||||
<a href=""> <i class="fa fa-instagram"></i> </a>
|
<a href=""> <i class="fa fa-instagram"></i> </a>
|
||||||
<a href=""> <i class="fa fa-envelope"></i> </a>
|
<a href=""> <i class="fa fa-envelope"></i> </a>
|
||||||
<a href=""> <i class="fa fa-xing"></i> </a>
|
<a href=""> <i class="fa fa-xing"></i> </a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,89 +1,89 @@
|
||||||
p,a,h1,h2,h3,h4,h5,h6{
|
p,a,h1,h2,h3,h4,h5,h6{
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-image: url(bg.png);
|
background-image: url(bg.png);
|
||||||
background-color: #03396c;
|
background-color: #03396c;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100% ;
|
width: 100% ;
|
||||||
background-color: #005b96;
|
background-color: #005b96;
|
||||||
padding: 30px 20px;
|
padding: 30px 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-top: solid #011f4b;
|
border-top: solid #011f4b;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer a {
|
footer a {
|
||||||
text-decoration: none ;
|
text-decoration: none ;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
margin: 0px 30px 10px;
|
margin: 0px 30px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
svg text {
|
svg text {
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navigation ul {
|
.navigation ul {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 240px;
|
width: 240px;
|
||||||
background-color: #005b96;
|
background-color: #005b96;
|
||||||
margin: 0px 0px 0px 80%;
|
margin: 0px 0px 0px 80%;
|
||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #011f4b;
|
border: solid #011f4b;
|
||||||
border-radius: 0px 0px 15px 15px;
|
border-radius: 0px 0px 15px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navigation li {
|
.navigation li {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navigation a.active {
|
.navigation a.active {
|
||||||
color: #011f4b;
|
color: #011f4b;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navigation a {
|
.navigation a {
|
||||||
display: block;
|
display: block;
|
||||||
color: white;
|
color: white;
|
||||||
padding: 4px 6px;
|
padding: 4px 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navigation a:hover {
|
.navigation a:hover {
|
||||||
color: #00cc00;
|
color: #00cc00;
|
||||||
}
|
}
|
||||||
|
|
||||||
.achthundert {
|
.achthundert {
|
||||||
width: 800px ;
|
width: 800px ;
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
padding: 0px auto;
|
padding: 0px auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.second_nav a {
|
.second_nav a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.second_nav a :hover{
|
.second_nav a :hover{
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,72 +1,72 @@
|
||||||
.socialMedia {
|
.socialMedia {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 65% 30%;
|
grid-template-columns: 65% 30%;
|
||||||
column-gap: 5%;
|
column-gap: 5%;
|
||||||
margin: 20px 0px 0px 0px;
|
margin: 20px 0px 0px 0px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
background-color: #005b96;
|
background-color: #005b96;
|
||||||
border: solid #011f4b;
|
border: solid #011f4b;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contact_me {
|
.contact_me {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 20px 0px 20px 0px;
|
margin: 20px 0px 20px 0px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
background-color: #005b96;
|
background-color: #005b96;
|
||||||
border: solid #011f4b;
|
border: solid #011f4b;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contact_me form {
|
.contact_me form {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contact_me input, textarea{
|
.contact_me input, textarea{
|
||||||
margin: 2px 0px 5px;
|
margin: 2px 0px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.socialMediaText h1 {
|
.socialMediaText h1 {
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.socialMediaText p {
|
.socialMediaText p {
|
||||||
margin: 2px 0px;
|
margin: 2px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.socialMediaText{
|
.socialMediaText{
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.socialMedia i {
|
.socialMedia i {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.socialMedia a :hover{
|
.socialMedia a :hover{
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.socialMedia a {
|
.socialMedia a {
|
||||||
text-decoration: none ;
|
text-decoration: none ;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
#extra {
|
#extra {
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
color: lightgrey;
|
color: lightgrey;
|
||||||
}
|
}
|
||||||
|
|
||||||
#extra a {
|
#extra a {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: lightgrey;
|
color: lightgrey;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,116 +1,116 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="basic.css">
|
<link rel="stylesheet" href="basic.css">
|
||||||
<link rel="stylesheet" href="contact.css">
|
<link rel="stylesheet" href="contact.css">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
<title> Contact </title>
|
<title> Contact </title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<div class="navigation">
|
<div class="navigation">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="about_me.html"> About Me! </a>
|
<a href="about_me.html"> About Me! </a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="contact.html" class="active"> Contact </a>
|
<a href="contact.html" class="active"> Contact </a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="portfolio.html"> Portfolio </a>
|
<a href="portfolio.html"> Portfolio </a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<svg width="650" height="160">
|
<svg width="650" height="160">
|
||||||
<ellipse cx="325" cy="0" rx="300" ry="150" stroke="#011f4b" stroke-width="5" fill="#005b96" />
|
<ellipse cx="325" cy="0" rx="300" ry="150" stroke="#011f4b" stroke-width="5" fill="#005b96" />
|
||||||
<text fill="#ffffff" font-size="40" x="200" y="70"> C O N T A C T </text>
|
<text fill="#ffffff" font-size="40" x="200" y="70"> C O N T A C T </text>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="achthundert">
|
<div class="achthundert">
|
||||||
|
|
||||||
<div class="socialMedia">
|
<div class="socialMedia">
|
||||||
<div class="socialMediaText">
|
<div class="socialMediaText">
|
||||||
<h1> Facebook </h1>
|
<h1> Facebook </h1>
|
||||||
<h2> Justin Dretvic </h2>
|
<h2> Justin Dretvic </h2>
|
||||||
</div>
|
</div>
|
||||||
<a href="https://www.facebook.com/justin.dretvic.1">
|
<a href="https://www.facebook.com/justin.dretvic.1">
|
||||||
<i class="fa fa-facebook-square" style="font-size:150px"></i>
|
<i class="fa fa-facebook-square" style="font-size:150px"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="socialMedia">
|
<div class="socialMedia">
|
||||||
<div class="socialMediaText">
|
<div class="socialMediaText">
|
||||||
<h1> Instagram </h1>
|
<h1> Instagram </h1>
|
||||||
<h2> @justin_da_ghost </h2>
|
<h2> @justin_da_ghost </h2>
|
||||||
</div>
|
</div>
|
||||||
<a href="https://www.instagram.com/justin_da_ghost/">
|
<a href="https://www.instagram.com/justin_da_ghost/">
|
||||||
<i class="fa fa-instagram" style="font-size:150px"></i>
|
<i class="fa fa-instagram" style="font-size:150px"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="socialMedia">
|
<div class="socialMedia">
|
||||||
<div class="socialMediaText">
|
<div class="socialMediaText">
|
||||||
<h1> Xing </h1>
|
<h1> Xing </h1>
|
||||||
<h2> Justin Dretvic </h2>
|
<h2> Justin Dretvic </h2>
|
||||||
</div>
|
</div>
|
||||||
<a href="https://www.xing.com/profile/Justin_Dretvic/cv">
|
<a href="https://www.xing.com/profile/Justin_Dretvic/cv">
|
||||||
<i class="fa fa-xing" style="font-size:150px"></i>
|
<i class="fa fa-xing" style="font-size:150px"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="socialMedia">
|
<div class="socialMedia">
|
||||||
<div class="socialMediaText">
|
<div class="socialMediaText">
|
||||||
<h1> E-Mail </h1>
|
<h1> E-Mail </h1>
|
||||||
<h2> Justin.Dretvic@hs-furtwangen.de </h2>
|
<h2> Justin.Dretvic@hs-furtwangen.de </h2>
|
||||||
</div>
|
</div>
|
||||||
<a href="mailto:Justin.Dretvic@hs-furtwangen.de">
|
<a href="mailto:Justin.Dretvic@hs-furtwangen.de">
|
||||||
<i class="fa fa-envelope" style="font-size:150px"></i>
|
<i class="fa fa-envelope" style="font-size:150px"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="contact_me">
|
<div class="contact_me">
|
||||||
<h1>Kontaktiere mich doch!</h1>
|
<h1>Kontaktiere mich doch!</h1>
|
||||||
<form>
|
<form>
|
||||||
<input type="text" placeholder="Vorname">
|
<input type="text" placeholder="Vorname">
|
||||||
<input type="text" placeholder="Nachname">
|
<input type="text" placeholder="Nachname">
|
||||||
<input type="text" placeholder="E-Mail">
|
<input type="text" placeholder="E-Mail">
|
||||||
<textarea id="textInput" placeholder="Nachricht"></textarea>
|
<textarea id="textInput" placeholder="Nachricht"></textarea>
|
||||||
<p id="extra">Mit Absenden der Nachricht bestätige ich <br>den <a href="files/leertext.pdf">Datenschutz</a></p>
|
<p id="extra">Mit Absenden der Nachricht bestätige ich <br>den <a href="files/leertext.pdf">Datenschutz</a></p>
|
||||||
<input type="submit" onclick="alert('Ihre Nachricht wurde verschickt')">
|
<input type="submit" onclick="alert('Ihre Nachricht wurde verschickt')">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="quick_tip">
|
<!-- <div class="quick_tip">
|
||||||
<p> Look for stuff py pressing <kbd>Ctrl + F</kbd> </p>
|
<p> Look for stuff py pressing <kbd>Ctrl + F</kbd> </p>
|
||||||
<p> Hier ist eine <a href="files/leertext.pdf">PDF</a> mit Leertext verlinkt! </p>
|
<p> Hier ist eine <a href="files/leertext.pdf">PDF</a> mit Leertext verlinkt! </p>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<div>
|
<div>
|
||||||
<p> Dieser Inhalt steht in einem footer! </p>
|
<p> Dieser Inhalt steht in einem footer! </p>
|
||||||
<p> Jegliche Inhalte werden nicht monetär verwendet! </p>
|
<p> Jegliche Inhalte werden nicht monetär verwendet! </p>
|
||||||
<p> Alle Bilder, die keine Logos sind, wurden von
|
<p> Alle Bilder, die keine Logos sind, wurden von
|
||||||
<a href="https://pixabay.com/de/"> Pixabay</a> bezogen </p>
|
<a href="https://pixabay.com/de/"> Pixabay</a> bezogen </p>
|
||||||
<div class="second_nav">
|
<div class="second_nav">
|
||||||
<a href=""> <i class="fa fa-facebook-square"></i> </a>
|
<a href=""> <i class="fa fa-facebook-square"></i> </a>
|
||||||
<a href=""> <i class="fa fa-instagram"></i> </a>
|
<a href=""> <i class="fa fa-instagram"></i> </a>
|
||||||
<a href=""> <i class="fa fa-envelope"></i> </a>
|
<a href=""> <i class="fa fa-envelope"></i> </a>
|
||||||
<a href=""> <i class="fa fa-xing"></i> </a>
|
<a href=""> <i class="fa fa-xing"></i> </a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,68 +1,68 @@
|
||||||
.containment {
|
.containment {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-top: 56.25%;
|
padding-top: 56.25%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#youtube {
|
#youtube {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
width: 99%;
|
width: 99%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border: solid #011f4b;
|
border: solid #011f4b;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1, h3{
|
h1, h3{
|
||||||
border: solid #011f4b;
|
border: solid #011f4b;
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: #005b96;
|
background-color: #005b96;
|
||||||
color: white
|
color: white
|
||||||
}
|
}
|
||||||
|
|
||||||
#anchor_tag {
|
#anchor_tag {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: black;
|
color: black;
|
||||||
border: dotted #011f4b;
|
border: dotted #011f4b;
|
||||||
background-color: #b3cde0;
|
background-color: #b3cde0;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#button {
|
#button {
|
||||||
color: #011f4b;
|
color: #011f4b;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background-color: #b3cde0;
|
background-color: #b3cde0;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin: 25px 0px 10px;
|
margin: 25px 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#audio {
|
#audio {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center ;
|
align-items: center ;
|
||||||
background-color: #005b96;
|
background-color: #005b96;
|
||||||
border: solid #011f4b;
|
border: solid #011f4b;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
color: white;
|
color: white;
|
||||||
margin: 30px 0px 30px;
|
margin: 30px 0px 30px;
|
||||||
padding: 30px;
|
padding: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#audio audio {
|
#audio audio {
|
||||||
border: solid #03396c;
|
border: solid #03396c;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#audio p {
|
#audio p {
|
||||||
margin: 2px
|
margin: 2px
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color: red;
|
color: red;
|
||||||
font-weight: bolder;
|
font-weight: bolder;
|
||||||
}
|
}
|
||||||
|
|
@ -1,91 +1,91 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="basic.css">
|
<link rel="stylesheet" href="basic.css">
|
||||||
<link rel="stylesheet" href="portfolio.css">
|
<link rel="stylesheet" href="portfolio.css">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
<title> Portfolio </title>
|
<title> Portfolio </title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<svg width="650" height="160">
|
<svg width="650" height="160">
|
||||||
<ellipse cx="325" cy="0" rx="300" ry="150" stroke="#011f4b" stroke-width="5" fill="#005b96" />
|
<ellipse cx="325" cy="0" rx="300" ry="150" stroke="#011f4b" stroke-width="5" fill="#005b96" />
|
||||||
<text fill="#ffffff" font-size="50" x="140" y="70"> P O R T F O L I O </text>
|
<text fill="#ffffff" font-size="50" x="140" y="70"> P O R T F O L I O </text>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
<div class="navigation">
|
<div class="navigation">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="about_me.html"> About Me! </a>
|
<a href="about_me.html"> About Me! </a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="contact.html"> Contact </a>
|
<a href="contact.html"> Contact </a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="portfolio.html" class="active"> Portfolio </a>
|
<a href="portfolio.html" class="active"> Portfolio </a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="achthundert">
|
<div class="achthundert">
|
||||||
|
|
||||||
|
|
||||||
<h1> Willkommen auf meiner Website</h1>
|
<h1> Willkommen auf meiner Website</h1>
|
||||||
|
|
||||||
<h3> Die Website zeigt Ihnen ein paar HTML-Tags </h3>
|
<h3> Die Website zeigt Ihnen ein paar HTML-Tags </h3>
|
||||||
|
|
||||||
<h5> <del> Ich hab jetzt schon 3 HTML-Elemente </del> </h5>
|
<h5> <del> Ich hab jetzt schon 3 HTML-Elemente </del> </h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a id="anchor_tag" href="#anchor"> Don't click on me </a> <br><br>
|
<a id="anchor_tag" href="#anchor"> Don't click on me </a> <br><br>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label><span>So</span> wurden Farben früher in HTML verwendet: </label>
|
<label><span>So</span> wurden Farben früher in HTML verwendet: </label>
|
||||||
<input type="color">
|
<input type="color">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button id="button"> Sinnloser Button. ACHTUNG! SINNLOS!!! </button> <br><br>
|
<button id="button"> Sinnloser Button. ACHTUNG! SINNLOS!!! </button> <br><br>
|
||||||
|
|
||||||
<div class="containment">
|
<div class="containment">
|
||||||
<iframe id="youtube" src="https://www.youtube.com/embed/-8SY-1f6xn0"
|
<iframe id="youtube" src="https://www.youtube.com/embed/-8SY-1f6xn0"
|
||||||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
|
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
|
||||||
</iframe> <br><br>
|
</iframe> <br><br>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="audio">
|
<div id="audio">
|
||||||
<p> Don't you dare pressing on the play-button!</p>
|
<p> Don't you dare pressing on the play-button!</p>
|
||||||
<p> I warned you! </p>
|
<p> I warned you! </p>
|
||||||
<audio controls id="anchor">
|
<audio controls id="anchor">
|
||||||
<source src="files/Battle_Cry_High_Pitch.mp3" type="audio/ogg">
|
<source src="files/Battle_Cry_High_Pitch.mp3" type="audio/ogg">
|
||||||
Your browser does not support the audio element.
|
Your browser does not support the audio element.
|
||||||
</audio> <br>
|
</audio> <br>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<div>
|
<div>
|
||||||
<p> Dieser Inhalt steht in einem footer! </p>
|
<p> Dieser Inhalt steht in einem footer! </p>
|
||||||
<p> Jegliche Inhalte werden nicht monetär verwendet! </p>
|
<p> Jegliche Inhalte werden nicht monetär verwendet! </p>
|
||||||
<p> Alle Bilder, die keine Logos sind, wurden von
|
<p> Alle Bilder, die keine Logos sind, wurden von
|
||||||
<a href="https://pixabay.com/de/"> Pixabay</a> bezogen </p>
|
<a href="https://pixabay.com/de/"> Pixabay</a> bezogen </p>
|
||||||
<div class="second_nav">
|
<div class="second_nav">
|
||||||
<a href=""> <i class="fa fa-facebook-square"></i> </a>
|
<a href=""> <i class="fa fa-facebook-square"></i> </a>
|
||||||
<a href=""> <i class="fa fa-instagram"></i> </a>
|
<a href=""> <i class="fa fa-instagram"></i> </a>
|
||||||
<a href=""> <i class="fa fa-envelope"></i> </a>
|
<a href=""> <i class="fa fa-envelope"></i> </a>
|
||||||
<a href=""> <i class="fa fa-xing"></i> </a>
|
<a href=""> <i class="fa fa-xing"></i> </a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,161 +1,161 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title> used tags </title>
|
<title> used tags </title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th> tag </th>
|
<th> tag </th>
|
||||||
<th> Nutzen</th>
|
<th> Nutzen</th>
|
||||||
<th> portfolio </th>
|
<th> portfolio </th>
|
||||||
<th> About_me </th>
|
<th> About_me </th>
|
||||||
<th> contact </th>
|
<th> contact </th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <h1–6> </td>
|
<td> <h1–6> </td>
|
||||||
<td> header </td>
|
<td> header </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <p> </td>
|
<td> <p> </td>
|
||||||
<td> paragraph</td>
|
<td> paragraph</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <del> </td>
|
<td> <del> </td>
|
||||||
<td> deleted </td>
|
<td> deleted </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <a> </td>
|
<td> <a> </td>
|
||||||
<td> anchor </td>
|
<td> anchor </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <ul> </td>
|
<td> <ul> </td>
|
||||||
<td> unordered list </td>
|
<td> unordered list </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <ol> </td>
|
<td> <ol> </td>
|
||||||
<td> ordered list </td>
|
<td> ordered list </td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <div> </td>
|
<td> <div> </td>
|
||||||
<td> Container </td>
|
<td> Container </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <table> </td>
|
<td> <table> </td>
|
||||||
<td> Tabelle </td>
|
<td> Tabelle </td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <code> </td>
|
<td> <code> </td>
|
||||||
<td> code-block</td>
|
<td> code-block</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <img> </td>
|
<td> <img> </td>
|
||||||
<td> image </td>
|
<td> image </td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <button> </td>
|
<td> <button> </td>
|
||||||
<td> button </td>
|
<td> button </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <iframe> </td>
|
<td> <iframe> </td>
|
||||||
<td> iframe </td>
|
<td> iframe </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <audio> </td>
|
<td> <audio> </td>
|
||||||
<td> audio control </td>
|
<td> audio control </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <br> </td>
|
<td> <br> </td>
|
||||||
<td> break </td>
|
<td> break </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <embed> </td>
|
<td> <embed> </td>
|
||||||
<td> embed </td>
|
<td> embed </td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <label> </td>
|
<td> <label> </td>
|
||||||
<td> label </td>
|
<td> label </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <input> </td>
|
<td> <input> </td>
|
||||||
<td> input </td>
|
<td> input </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <footer> </td>
|
<td> <footer> </td>
|
||||||
<td> footer </td>
|
<td> footer </td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <blockquote> </td>
|
<td> <blockquote> </td>
|
||||||
<td> blockquote </td>
|
<td> blockquote </td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [ ]</td>
|
<td> [ ]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <b> </td>
|
<td> <b> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
<td> [X]</td>
|
<td> [X]</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,89 +1,89 @@
|
||||||
#übersicht {
|
#übersicht {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: fill;
|
object-fit: fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
@ -1,94 +1,94 @@
|
||||||
#übersicht {
|
#übersicht {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 20px;
|
margin: 10px 20px;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: width;
|
height: width;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: fill;
|
object-fit: fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#bunt,#grün,#special {
|
#bunt,#grün,#special {
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
color: #006a4e;
|
color: #006a4e;
|
||||||
}
|
}
|
||||||
|
|
@ -1,87 +1,87 @@
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: fill;
|
object-fit: fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#bunt,#grün,#special {
|
#bunt,#grün,#special {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
color: #006a4e;
|
color: #006a4e;
|
||||||
}
|
}
|
||||||
|
|
@ -1,76 +1,76 @@
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: none;
|
object-fit: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
}
|
}
|
||||||
|
|
@ -1,124 +1,124 @@
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: Chelsea Market;
|
font-family: Chelsea Market;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #006a4e;
|
background-color: #006a4e;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
}
|
}
|
||||||
|
|
||||||
header ul {
|
header ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header li {
|
header li {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 10px auto 0px;
|
margin: 10px auto 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header li a {
|
header li a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .dropdown {
|
header .dropdown {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 5px 0px 5px;
|
margin: 10px 5px 0px 5px;
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .dropdown-content {
|
header .dropdown-content {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .dropdown:hover .dropdown-content {
|
header .dropdown:hover .dropdown-content {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart {
|
header #shopping_cart {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 5px 0px 5px;
|
margin: 10px 5px 0px 5px;
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart a {
|
header #shopping_cart a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size:24px
|
font-size:24px
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart a:hover {
|
header #shopping_cart a:hover {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .title_bar img {
|
header .title_bar img {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin: 5px 15px;
|
margin: 5px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .title_bar span {
|
header .title_bar span {
|
||||||
font-size: 27px;
|
font-size: 27px;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
margin: auto 0px;
|
margin: auto 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .title_bar {
|
header .title_bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin: 5px
|
margin: 5px
|
||||||
}
|
}
|
||||||
|
|
||||||
header #bottom {
|
header #bottom {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart {
|
header #shopping_cart {
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
display: block;
|
display: block;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 5px 0px 5px;
|
margin: 10px 5px 0px 5px;
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 10px 5px;
|
padding: 10px 5px;
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: calc(100%-10px);
|
width: calc(100%-10px);
|
||||||
background-color: #272727;
|
background-color: #272727;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer p {
|
footer p {
|
||||||
margin: 0px 0px 10px;
|
margin: 0px 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
@ -1,302 +1,302 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Chelsea+Market&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Chelsea+Market&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" media="screen and (max-width: 600px)" href="product-small.css">
|
<link rel="stylesheet" media="screen and (max-width: 600px)" href="product-small.css">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 601px)" href="product-medium.css">
|
<link rel="stylesheet" media="screen and (min-width: 601px)" href="product-medium.css">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="product-big.css">
|
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="product-big.css">
|
||||||
<link rel="stylesheet" href="shop.css">
|
<link rel="stylesheet" href="shop.css">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>green grass</title>
|
<title>green grass</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<div class="title_bar">
|
<div class="title_bar">
|
||||||
<img src="files/grass_icon_left.png" alt="grass" />
|
<img src="files/grass_icon_left.png" alt="grass" />
|
||||||
<span>GREEEN GRASS</span>
|
<span>GREEEN GRASS</span>
|
||||||
<img src="files/grass_icon_right.png" alt="grass" />
|
<img src="files/grass_icon_right.png" alt="grass" />
|
||||||
</div>
|
</div>
|
||||||
<div id="bottom">
|
<div id="bottom">
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<span>Categories</span>
|
<span>Categories</span>
|
||||||
<ul class="dropdown-content">
|
<ul class="dropdown-content">
|
||||||
<li><a href="#special">~ Special Offers ~</a></li>
|
<li><a href="#special">~ Special Offers ~</a></li>
|
||||||
<li><a href="#bunt">~ Colored Grass ~</a></li>
|
<li><a href="#bunt">~ Colored Grass ~</a></li>
|
||||||
<li><a href="#grün">~ Green-Tones ~</a></li>
|
<li><a href="#grün">~ Green-Tones ~</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="shopping_cart">
|
<div id="shopping_cart">
|
||||||
<a href=""><i class="fas fa-shopping-cart" style='font-size:24px'></i></a>
|
<a href=""><i class="fas fa-shopping-cart" style='font-size:24px'></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div id="übersicht">
|
<div id="übersicht">
|
||||||
<h1 id="special">Special Offers!</h1>
|
<h1 id="special">Special Offers!</h1>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Color: Rainbow </h3>
|
<h3 class="title"> Color: Rainbow </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 3279,99 ¥ </span>
|
<span class="price"> 3279,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-rainbow-square.png" alt="Product" />
|
<img src="files/grass-rainbow-square.png" alt="Product" />
|
||||||
<p class="size"> Size: 4m²</p>
|
<p class="size"> Size: 4m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> If you can't choose one color, go and catch them all!</p>
|
<p> If you can't choose one color, go and catch them all!</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Color: White </h3>
|
<h3 class="title"> Color: White </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 3279,99 ¥ </span>
|
<span class="price"> 3279,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-white.png" alt="Product" />
|
<img src="files/grass-white.png" alt="Product" />
|
||||||
<p class="size"> Size: 4m²</p>
|
<p class="size"> Size: 4m²</p>
|
||||||
<p class="description"> The appearance of many sparkling stars on your garden floor.</p>
|
<p class="description"> The appearance of many sparkling stars on your garden floor.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Color: Black </h3>
|
<h3 class="title"> Color: Black </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 3279,99 ¥ </span>
|
<span class="price"> 3279,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-black.png" alt="Product" />
|
<img src="files/grass-black.png" alt="Product" />
|
||||||
<p class="size"> Size: 4m²</p>
|
<p class="size"> Size: 4m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> Dark as the night. Be careful not to form a black hole!</p>
|
<p> Dark as the night. Be careful not to form a black hole!</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Pattern: Murica </h3>
|
<h3 class="title"> Pattern: Murica </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 3279,99 ¥ </span>
|
<span class="price"> 3279,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-green-murica.png" alt="Product" />
|
<img src="files/grass-green-murica.png" alt="Product" />
|
||||||
<p class="size"> Size: 4m²</p>
|
<p class="size"> Size: 4m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> Texas, Trump, Guns & Hamburgers</p>
|
<p> Texas, Trump, Guns & Hamburgers</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Pattern: Schachbrett </h3>
|
<h3 class="title"> Pattern: Schachbrett </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 3279,99 ¥ </span>
|
<span class="price"> 3279,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-green-chess-square.png" alt="Product" />
|
<img src="files/grass-green-chess-square.png" alt="Product" />
|
||||||
<p class="size"> Size: 4m²</p>
|
<p class="size"> Size: 4m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> Show your intellect on your own lawn and embarrass your opponents!</p>
|
<p> Show your intellect on your own lawn and embarrass your opponents!</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h1 id="bunt">Bunte Gräser!</h1>
|
<h1 id="bunt">Bunte Gräser!</h1>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Color: Green </h3>
|
<h3 class="title"> Color: Green </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 2339,99 ¥ </span>
|
<span class="price"> 2339,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-green.png" alt="Product" />
|
<img src="files/grass-green.png" alt="Product" />
|
||||||
<p class="size"> Size: 4m²</p>
|
<p class="size"> Size: 4m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> The standard model in our range. Ensures a natural look and pleasant freshness in your living room!</p>
|
<p> The standard model in our range. Ensures a natural look and pleasant freshness in your living room!</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Color: Desert </h3>
|
<h3 class="title"> Color: Desert </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 2339,99 ¥ </span>
|
<span class="price"> 2339,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-yellow.png" alt="Product" />
|
<img src="files/grass-yellow.png" alt="Product" />
|
||||||
<p class="size"> Size: 4m²</p>
|
<p class="size"> Size: 4m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> Summer, sun and oh my god, I'm hot! Are they pyramids in my garden ?!</p>
|
<p> Summer, sun and oh my god, I'm hot! Are they pyramids in my garden ?!</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Color: Beach </h3>
|
<h3 class="title"> Color: Beach </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 2339,99 ¥ </span>
|
<span class="price"> 2339,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-orange.png" alt="Product" />
|
<img src="files/grass-orange.png" alt="Product" />
|
||||||
<p class="size"> Size: 4m²</p>
|
<p class="size"> Size: 4m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> Summer, sun and hot feelings!</p>
|
<p> Summer, sun and hot feelings!</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Color: Hell </h3>
|
<h3 class="title"> Color: Hell </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 2339,99 ¥ </span>
|
<span class="price"> 2339,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-red.png" alt="Product" />
|
<img src="files/grass-red.png" alt="Product" />
|
||||||
<p class="size"> Size: 4m²</p>
|
<p class="size"> Size: 4m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> Look into the abyss that could await you after your death and invite guests to it!</p>
|
<p> Look into the abyss that could await you after your death and invite guests to it!</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Color: Unicorn </h3>
|
<h3 class="title"> Color: Unicorn </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 2339,99 ¥ </span>
|
<span class="price"> 2339,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-pink.png" alt="Product" />
|
<img src="files/grass-pink.png" alt="Product" />
|
||||||
<p class="size"> Size: 4m²</p>
|
<p class="size"> Size: 4m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> PINK FLUFFY UNICORN, DANCING ON RAINBOWS (which you can also buy in here) !!!</p>
|
<p> PINK FLUFFY UNICORN, DANCING ON RAINBOWS (which you can also buy in here) !!!</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Color: Grape </h3>
|
<h3 class="title"> Color: Grape </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 2339,99 ¥ </span>
|
<span class="price"> 2339,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-purple.png" alt="Product" />
|
<img src="files/grass-purple.png" alt="Product" />
|
||||||
<p class="size"> Size: 4m²</p>
|
<p class="size"> Size: 4m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> It looks purple. Do you have to say more?</p>
|
<p> It looks purple. Do you have to say more?</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Color: Atlantic </h3>
|
<h3 class="title"> Color: Atlantic </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 2339,99 ¥ </span>
|
<span class="price"> 2339,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-blue.png" alt="Product" />
|
<img src="files/grass-blue.png" alt="Product" />
|
||||||
<p class="size"> Size: 4m²</p>
|
<p class="size"> Size: 4m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p>Blue like the ocean. A deep look and mysterious nature.</p>
|
<p>Blue like the ocean. A deep look and mysterious nature.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h1 id="grün">Green-Tones!</h1>
|
<h1 id="grün">Green-Tones!</h1>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Green: 3B </h3>
|
<h3 class="title"> Green: 3B </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 3499,99 ¥ </span>
|
<span class="price"> 3499,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-green-dark-3.png" alt="Product" />
|
<img src="files/grass-green-dark-3.png" alt="Product" />
|
||||||
<p class="size"> Size: 10m²</p>
|
<p class="size"> Size: 10m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p>Green in every way. Nothing more to know about it.</p>
|
<p>Green in every way. Nothing more to know about it.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Green: 2B </h3>
|
<h3 class="title"> Green: 2B </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 3499,99 </span>
|
<span class="price"> 3499,99 </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-green-dark-2.png" alt="Product" />
|
<img src="files/grass-green-dark-2.png" alt="Product" />
|
||||||
<p class="size"> Size: 10m²</p>
|
<p class="size"> Size: 10m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p>Green in every way. Nothing more to know about it.</p>
|
<p>Green in every way. Nothing more to know about it.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Green: B </h3>
|
<h3 class="title"> Green: B </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 3499,99 ¥ </span>
|
<span class="price"> 3499,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-green-dark-1.png" alt="Product" />
|
<img src="files/grass-green-dark-1.png" alt="Product" />
|
||||||
<p class="size"> Size: 10m²</p>
|
<p class="size"> Size: 10m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p>Green in every way. Nothing more to know about it.</p>
|
<p>Green in every way. Nothing more to know about it.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Green: HB </h3>
|
<h3 class="title"> Green: HB </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 2339,99 ¥ </span>
|
<span class="price"> 2339,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-green.png" alt="Product" />
|
<img src="files/grass-green.png" alt="Product" />
|
||||||
<p class="size"> Size: 10m²</p>
|
<p class="size"> Size: 10m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p>The standard model in our range. Ensures a natural look and pleasant freshness in your living room!</p>
|
<p>The standard model in our range. Ensures a natural look and pleasant freshness in your living room!</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Size: H </h3>
|
<h3 class="title"> Size: H </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 3499,99 ¥ </span>
|
<span class="price"> 3499,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-green-light-1.png" alt="Product" />
|
<img src="files/grass-green-light-1.png" alt="Product" />
|
||||||
<p class="size"> Size: 10m²</p>
|
<p class="size"> Size: 10m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p>Green in every way. Nothing more to know about it.</p>
|
<p>Green in every way. Nothing more to know about it.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Size: 2H </h3>
|
<h3 class="title"> Size: 2H </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 3499,99 ¥ </span>
|
<span class="price"> 3499,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-green-light-2.png" alt="Product" />
|
<img src="files/grass-green-light-2.png" alt="Product" />
|
||||||
<p class="size"> Size: 10m²</p>
|
<p class="size"> Size: 10m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p>Green in every way. Nothing more to know about it.</p>
|
<p>Green in every way. Nothing more to know about it.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h3 class="title"> Green: 3H </h3>
|
<h3 class="title"> Green: 3H </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> 3499,99 ¥ </span>
|
<span class="price"> 3499,99 ¥ </span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-green-light-3.png" alt="Product" />
|
<img src="files/grass-green-light-3.png" alt="Product" />
|
||||||
<p class="size"> Size: 10m²</p>
|
<p class="size"> Size: 10m²</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p>Green in every way. Nothing more to know about it.</p>
|
<p>Green in every way. Nothing more to know about it.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<h1>Disclaimer</h1>
|
<h1>Disclaimer</h1>
|
||||||
<p>This website is not used monetarily </p>
|
<p>This website is not used monetarily </p>
|
||||||
<p>Not even if things seem to be sold here!</p>
|
<p>Not even if things seem to be sold here!</p>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
|
|
@ -1,89 +1,89 @@
|
||||||
#übersicht {
|
#übersicht {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: fill;
|
object-fit: fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
@ -1,94 +1,94 @@
|
||||||
#übersicht {
|
#übersicht {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 20px;
|
margin: 10px 20px;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: width;
|
height: width;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: fill;
|
object-fit: fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#bunt,#grün,#special {
|
#bunt,#grün,#special {
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
color: #006a4e;
|
color: #006a4e;
|
||||||
}
|
}
|
||||||
|
|
@ -1,87 +1,87 @@
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: fill;
|
object-fit: fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#bunt,#grün,#special {
|
#bunt,#grün,#special {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
color: #006a4e;
|
color: #006a4e;
|
||||||
}
|
}
|
||||||
|
|
@ -1,76 +1,76 @@
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: none;
|
object-fit: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
}
|
}
|
||||||
|
|
@ -149,18 +149,18 @@ function printProducts() {
|
||||||
for (let index = 0; index < categories[nummer].products.length; index++) {
|
for (let index = 0; index < categories[nummer].products.length; index++) {
|
||||||
let product = document.createElement("div");
|
let product = document.createElement("div");
|
||||||
product.classList.add("product");
|
product.classList.add("product");
|
||||||
product.innerHTML = `
|
product.innerHTML = `
|
||||||
<h3 class="title"> ${categories[nummer].products[index].title} </h3>
|
<h3 class="title"> ${categories[nummer].products[index].title} </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> ${categories[nummer].products[index].price} ¥</span>
|
<span class="price"> ${categories[nummer].products[index].price} ¥</span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/${categories[nummer].products[index].imgName}" alt="Product" />
|
<img src="files/${categories[nummer].products[index].imgName}" alt="Product" />
|
||||||
<p class="size"> Size: ${categories[nummer].products[index].size}</p>
|
<p class="size"> Size: ${categories[nummer].products[index].size}</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> ${categories[nummer].products[index].description}</p>
|
<p> ${categories[nummer].products[index].description}</p>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
container.appendChild(product);
|
container.appendChild(product);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,232 +1,232 @@
|
||||||
// Datensammlung für Produkte
|
// Datensammlung für Produkte
|
||||||
|
|
||||||
interface Product {
|
interface Product {
|
||||||
title: string;
|
title: string;
|
||||||
price: number;
|
price: number;
|
||||||
size: string;
|
size: string;
|
||||||
imgName: string;
|
imgName: string;
|
||||||
description: string;
|
description: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Category {
|
interface Category {
|
||||||
title: string;
|
title: string;
|
||||||
id: string;
|
id: string;
|
||||||
products: Product[];
|
products: Product[];
|
||||||
}
|
}
|
||||||
|
|
||||||
let categories: Category[] = [
|
let categories: Category[] = [
|
||||||
{
|
{
|
||||||
title: "Special Offers!",
|
title: "Special Offers!",
|
||||||
id: "special",
|
id: "special",
|
||||||
products: [
|
products: [
|
||||||
{
|
{
|
||||||
title: "Color: Rainbow",
|
title: "Color: Rainbow",
|
||||||
price: 3279.99,
|
price: 3279.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-rainbow-square.png",
|
imgName: "grass-rainbow-square.png",
|
||||||
description: "If you can't choose one color, go and catch them all!"
|
description: "If you can't choose one color, go and catch them all!"
|
||||||
}, {
|
}, {
|
||||||
title: "Color: White",
|
title: "Color: White",
|
||||||
price: 3279.99,
|
price: 3279.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-white.png",
|
imgName: "grass-white.png",
|
||||||
description: "The appearance of many sparkling stars on your garden floor."
|
description: "The appearance of many sparkling stars on your garden floor."
|
||||||
}, {
|
}, {
|
||||||
title: "Color: Black",
|
title: "Color: Black",
|
||||||
price: 3279.99,
|
price: 3279.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-black.png",
|
imgName: "grass-black.png",
|
||||||
description: "Dark as the night. Be careful not to form a black hole!"
|
description: "Dark as the night. Be careful not to form a black hole!"
|
||||||
}, {
|
}, {
|
||||||
title: "Pattern: Murica",
|
title: "Pattern: Murica",
|
||||||
price: 3279.99,
|
price: 3279.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-green-murica.png",
|
imgName: "grass-green-murica.png",
|
||||||
description: "Texas, Trump, Guns & Hamburgers"
|
description: "Texas, Trump, Guns & Hamburgers"
|
||||||
}, {
|
}, {
|
||||||
title: "Pattern: Schachbrett",
|
title: "Pattern: Schachbrett",
|
||||||
price: 3279.99,
|
price: 3279.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-green-chess-square.png",
|
imgName: "grass-green-chess-square.png",
|
||||||
description: "Show your intellect on your own lawn and embarrass your opponents!"
|
description: "Show your intellect on your own lawn and embarrass your opponents!"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
title: "Bunte Gräser",
|
title: "Bunte Gräser",
|
||||||
id: "bunt",
|
id: "bunt",
|
||||||
products: [
|
products: [
|
||||||
{
|
{
|
||||||
title: "Color: Green",
|
title: "Color: Green",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-green.png",
|
imgName: "grass-green.png",
|
||||||
description: "The standard model in our range. Ensures a natural look and pleasant freshness in your living room!"
|
description: "The standard model in our range. Ensures a natural look and pleasant freshness in your living room!"
|
||||||
}, {
|
}, {
|
||||||
title: "Color: Desert",
|
title: "Color: Desert",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-yellow.png",
|
imgName: "grass-yellow.png",
|
||||||
description: "Summer, sun and oh my god, I'm hot! Are they pyramids in my garden ?!"
|
description: "Summer, sun and oh my god, I'm hot! Are they pyramids in my garden ?!"
|
||||||
}, {
|
}, {
|
||||||
title: "Color: Beach",
|
title: "Color: Beach",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-orange.png",
|
imgName: "grass-orange.png",
|
||||||
description: "Summer, sun and hot feelings!"
|
description: "Summer, sun and hot feelings!"
|
||||||
}, {
|
}, {
|
||||||
title: "Pattern: Hell",
|
title: "Pattern: Hell",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-red.png",
|
imgName: "grass-red.png",
|
||||||
description: "Look into the abyss that could await you after your death and invite guests to it!"
|
description: "Look into the abyss that could await you after your death and invite guests to it!"
|
||||||
}, {
|
}, {
|
||||||
title: "Pattern: Unicorn",
|
title: "Pattern: Unicorn",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-pink.png",
|
imgName: "grass-pink.png",
|
||||||
description: "PINK FLUFFY UNICORN, DANCING ON RAINBOWS (which you can also buy in here) !!!"
|
description: "PINK FLUFFY UNICORN, DANCING ON RAINBOWS (which you can also buy in here) !!!"
|
||||||
}, {
|
}, {
|
||||||
title: "Pattern: Grape",
|
title: "Pattern: Grape",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-purple.png",
|
imgName: "grass-purple.png",
|
||||||
description: "It looks purple. Do you have to say more?"
|
description: "It looks purple. Do you have to say more?"
|
||||||
}, {
|
}, {
|
||||||
title: "Pattern: Atlantic",
|
title: "Pattern: Atlantic",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-blue.png",
|
imgName: "grass-blue.png",
|
||||||
description: "Blue like the ocean. A deep look and mysterious nature."
|
description: "Blue like the ocean. A deep look and mysterious nature."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
title: "Green-Tones",
|
title: "Green-Tones",
|
||||||
id: "grün",
|
id: "grün",
|
||||||
products: [
|
products: [
|
||||||
{
|
{
|
||||||
title: "Green: 3B",
|
title: "Green: 3B",
|
||||||
price: 3499.99,
|
price: 3499.99,
|
||||||
size: "10m²",
|
size: "10m²",
|
||||||
imgName: "grass-green-dark-3.png",
|
imgName: "grass-green-dark-3.png",
|
||||||
description: "Green in every way. Nothing more to know about it."
|
description: "Green in every way. Nothing more to know about it."
|
||||||
}, {
|
}, {
|
||||||
title: "Green: 2B",
|
title: "Green: 2B",
|
||||||
price: 3499.99,
|
price: 3499.99,
|
||||||
size: "10m²",
|
size: "10m²",
|
||||||
imgName: "grass-green-dark-2.png",
|
imgName: "grass-green-dark-2.png",
|
||||||
description: "Green in every way. Nothing more to know about it."
|
description: "Green in every way. Nothing more to know about it."
|
||||||
}, {
|
}, {
|
||||||
title: "Green: B",
|
title: "Green: B",
|
||||||
price: 3499.99,
|
price: 3499.99,
|
||||||
size: "10m²",
|
size: "10m²",
|
||||||
imgName: "grass-green-dark-1.png",
|
imgName: "grass-green-dark-1.png",
|
||||||
description: "Green in every way. Nothing more to know about it."
|
description: "Green in every way. Nothing more to know about it."
|
||||||
}, {
|
}, {
|
||||||
title: "Green: HB",
|
title: "Green: HB",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "10m²",
|
size: "10m²",
|
||||||
imgName: "grass-green.png",
|
imgName: "grass-green.png",
|
||||||
description: "The standard model in our range. Ensures a natural look and pleasant freshness in your living room!"
|
description: "The standard model in our range. Ensures a natural look and pleasant freshness in your living room!"
|
||||||
}, {
|
}, {
|
||||||
title: "Green: H",
|
title: "Green: H",
|
||||||
price: 3499.99,
|
price: 3499.99,
|
||||||
size: "10m²",
|
size: "10m²",
|
||||||
imgName: "grass-green-light-1.png",
|
imgName: "grass-green-light-1.png",
|
||||||
description: "Green in every way. Nothing more to know about it."
|
description: "Green in every way. Nothing more to know about it."
|
||||||
}, {
|
}, {
|
||||||
title: "Green: 2H",
|
title: "Green: 2H",
|
||||||
price: 3499.99,
|
price: 3499.99,
|
||||||
size: "10m²",
|
size: "10m²",
|
||||||
imgName: "grass-green-light-2.png",
|
imgName: "grass-green-light-2.png",
|
||||||
description: "Green in every way. Nothing more to know about it."
|
description: "Green in every way. Nothing more to know about it."
|
||||||
}, {
|
}, {
|
||||||
title: "Green: 3H",
|
title: "Green: 3H",
|
||||||
price: 3499.99,
|
price: 3499.99,
|
||||||
size: "10m²",
|
size: "10m²",
|
||||||
imgName: "grass-green-light-3.png",
|
imgName: "grass-green-light-3.png",
|
||||||
description: "Green in every way. Nothing more to know about it."
|
description: "Green in every way. Nothing more to know about it."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
printProducts();
|
printProducts();
|
||||||
|
|
||||||
//create Structure;
|
//create Structure;
|
||||||
|
|
||||||
function printProducts(): void {
|
function printProducts(): void {
|
||||||
for (let nummer: number = 0; nummer < categories.length; nummer++) {
|
for (let nummer: number = 0; nummer < categories.length; nummer++) {
|
||||||
|
|
||||||
let heading: HTMLHeadingElement = document.createElement("h1");
|
let heading: HTMLHeadingElement = document.createElement("h1");
|
||||||
heading.setAttribute("id", categories[nummer].id);
|
heading.setAttribute("id", categories[nummer].id);
|
||||||
heading.innerHTML = `${categories[nummer].title}`;
|
heading.innerHTML = `${categories[nummer].title}`;
|
||||||
(<HTMLDivElement>document.querySelector("#übersicht")).appendChild(heading);
|
(<HTMLDivElement>document.querySelector("#übersicht")).appendChild(heading);
|
||||||
|
|
||||||
let container: HTMLDivElement = document.createElement("div");
|
let container: HTMLDivElement = document.createElement("div");
|
||||||
container.classList.add("container");
|
container.classList.add("container");
|
||||||
(<HTMLDivElement>document.querySelector("#übersicht")).appendChild(container);
|
(<HTMLDivElement>document.querySelector("#übersicht")).appendChild(container);
|
||||||
|
|
||||||
for (let index: number = 0; index < categories[nummer].products.length; index++) {
|
for (let index: number = 0; index < categories[nummer].products.length; index++) {
|
||||||
let product: HTMLDivElement = document.createElement("div");
|
let product: HTMLDivElement = document.createElement("div");
|
||||||
product.classList.add("product");
|
product.classList.add("product");
|
||||||
product.innerHTML = `
|
product.innerHTML = `
|
||||||
<h3 class="title"> ${categories[nummer].products[index].title} </h3>
|
<h3 class="title"> ${categories[nummer].products[index].title} </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> ${categories[nummer].products[index].price} ¥</span>
|
<span class="price"> ${categories[nummer].products[index].price} ¥</span>
|
||||||
<button>+</button>
|
<button>+</button>
|
||||||
<button>-</button>
|
<button>-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/${categories[nummer].products[index].imgName}" alt="Product" />
|
<img src="files/${categories[nummer].products[index].imgName}" alt="Product" />
|
||||||
<p class="size"> Size: ${categories[nummer].products[index].size}</p>
|
<p class="size"> Size: ${categories[nummer].products[index].size}</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> ${categories[nummer].products[index].description}</p>
|
<p> ${categories[nummer].products[index].description}</p>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
container.appendChild(product);
|
container.appendChild(product);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Folgender auskommentierter Code dient mir als Archiv für Gedankenansätze oder Verläufe.
|
// Folgender auskommentierter Code dient mir als Archiv für Gedankenansätze oder Verläufe.
|
||||||
// Wenn dies nicht gerne gesehen ist, gebt mir kurz Bescheid und ich werde es entfernen
|
// Wenn dies nicht gerne gesehen ist, gebt mir kurz Bescheid und ich werde es entfernen
|
||||||
|
|
||||||
/*
|
/*
|
||||||
function zeichnen(tagArray: Tag[]): void {
|
function zeichnen(tagArray: Tag[]): void {
|
||||||
for (let i: number = 0; i < tagArray.length ; i++){
|
for (let i: number = 0; i < tagArray.length ; i++){
|
||||||
let title: HTMLElement = document.createElement(tagArray[i].tag);
|
let title: HTMLElement = document.createElement(tagArray[i].tag);
|
||||||
title.innerHTML = "I bims title";
|
title.innerHTML = "I bims title";
|
||||||
title.classList.add("title");
|
title.classList.add("title");
|
||||||
if (tagArray[i].image) {
|
if (tagArray[i].image) {
|
||||||
title.setAttribute("src", "value");
|
title.setAttribute("src", "value");
|
||||||
title.setAttribute("alt", "value");
|
title.setAttribute("alt", "value");
|
||||||
}
|
}
|
||||||
document.body.appendChild(title);
|
document.body.appendChild(title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
console.log("Hello Console");
|
console.log("Hello Console");
|
||||||
let theName: String = "Justin" + "Dretvic" + 20;
|
let theName: String = "Justin" + "Dretvic" + 20;
|
||||||
console.log(theName);
|
console.log(theName);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
# Template für ein Produkt in HTML
|
# Template für ein Produkt in HTML
|
||||||
<div class="product"> tag class
|
<div class="product"> tag class
|
||||||
<h3 class="title"> Color: Rainbow </h3> tag class content
|
<h3 class="title"> Color: Rainbow </h3> tag class content
|
||||||
<div class=shopIn> tag class
|
<div class=shopIn> tag class
|
||||||
<span class="price"> 3279,99 ¥ </span> tag class content
|
<span class="price"> 3279,99 ¥ </span> tag class content
|
||||||
<button>+</button> tag content
|
<button>+</button> tag content
|
||||||
<button>-</button> tag content
|
<button>-</button> tag content
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-rainbow-square.png" alt="Product" /> tag attribute1 attribute2
|
<img src="files/grass-rainbow-square.png" alt="Product" /> tag attribute1 attribute2
|
||||||
<p class="size"> Size: 4m²</p> tag class content
|
<p class="size"> Size: 4m²</p> tag class content
|
||||||
<div class="description"> tag class
|
<div class="description"> tag class
|
||||||
<p> If you can't choose one color, go and catch them all!</p> tag content
|
<p> If you can't choose one color, go and catch them all!</p> tag content
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
*/
|
*/
|
||||||
|
|
@ -1,124 +1,124 @@
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: Chelsea Market;
|
font-family: Chelsea Market;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #006a4e;
|
background-color: #006a4e;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
}
|
}
|
||||||
|
|
||||||
header ul {
|
header ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header li {
|
header li {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 10px auto 0px;
|
margin: 10px auto 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header li a {
|
header li a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .dropdown {
|
header .dropdown {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 5px 0px 5px;
|
margin: 10px 5px 0px 5px;
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .dropdown-content {
|
header .dropdown-content {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .dropdown:hover .dropdown-content {
|
header .dropdown:hover .dropdown-content {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart {
|
header #shopping_cart {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 5px 0px 5px;
|
margin: 10px 5px 0px 5px;
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart a {
|
header #shopping_cart a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size:24px
|
font-size:24px
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart a:hover {
|
header #shopping_cart a:hover {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .title_bar img {
|
header .title_bar img {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin: 5px 15px;
|
margin: 5px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .title_bar span {
|
header .title_bar span {
|
||||||
font-size: 27px;
|
font-size: 27px;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
margin: auto 0px;
|
margin: auto 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .title_bar {
|
header .title_bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin: 5px
|
margin: 5px
|
||||||
}
|
}
|
||||||
|
|
||||||
header #bottom {
|
header #bottom {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart {
|
header #shopping_cart {
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
display: block;
|
display: block;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 5px 0px 5px;
|
margin: 10px 5px 0px 5px;
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 10px 5px;
|
padding: 10px 5px;
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: calc(100%-10px);
|
width: calc(100%-10px);
|
||||||
background-color: #272727;
|
background-color: #272727;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer p {
|
footer p {
|
||||||
margin: 0px 0px 10px;
|
margin: 0px 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Chelsea+Market&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Chelsea+Market&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" media="screen and (max-width: 600px)" href="product-small.css">
|
<link rel="stylesheet" media="screen and (max-width: 600px)" href="product-small.css">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 601px)" href="product-medium.css">
|
<link rel="stylesheet" media="screen and (min-width: 601px)" href="product-medium.css">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="product-big.css">
|
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="product-big.css">
|
||||||
<link rel="stylesheet" href="shop.css">
|
<link rel="stylesheet" href="shop.css">
|
||||||
<script src="script.js" defer></script>
|
<script src="script.js" defer></script>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>green grass</title>
|
<title>green grass</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<div class="title_bar">
|
<div class="title_bar">
|
||||||
<img src="files/grass_icon_left.png" alt="grass" />
|
<img src="files/grass_icon_left.png" alt="grass" />
|
||||||
<span>GREEEN GRASS</span>
|
<span>GREEEN GRASS</span>
|
||||||
<img src="files/grass_icon_right.png" alt="grass" />
|
<img src="files/grass_icon_right.png" alt="grass" />
|
||||||
</div>
|
</div>
|
||||||
<div id="bottom">
|
<div id="bottom">
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<span>Categories</span>
|
<span>Categories</span>
|
||||||
<ul class="dropdown-content">
|
<ul class="dropdown-content">
|
||||||
<li><a href="#special">~ Special Offers ~</a></li>
|
<li><a href="#special">~ Special Offers ~</a></li>
|
||||||
<li><a href="#bunt">~ Colored Grass ~</a></li>
|
<li><a href="#bunt">~ Colored Grass ~</a></li>
|
||||||
<li><a href="#grün">~ Green-Tones ~</a></li>
|
<li><a href="#grün">~ Green-Tones ~</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="shopping_cart">
|
<div id="shopping_cart">
|
||||||
<a href=""><i class="fas fa-shopping-cart" style='font-size:24px'></i></a>
|
<a href=""><i class="fas fa-shopping-cart" style='font-size:24px'></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div id="übersicht">
|
<div id="übersicht">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<h1>Disclaimer</h1>
|
<h1>Disclaimer</h1>
|
||||||
<p>This website is not used monetarily </p>
|
<p>This website is not used monetarily </p>
|
||||||
<p>Not even if things seem to be sold here!</p>
|
<p>Not even if things seem to be sold here!</p>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,89 +1,89 @@
|
||||||
#übersicht {
|
#übersicht {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: fill;
|
object-fit: fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
@ -1,94 +1,94 @@
|
||||||
#übersicht {
|
#übersicht {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 20px;
|
margin: 10px 20px;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: width;
|
height: width;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: fill;
|
object-fit: fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#bunt,#grün,#special {
|
#bunt,#grün,#special {
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
color: #006a4e;
|
color: #006a4e;
|
||||||
}
|
}
|
||||||
|
|
@ -1,87 +1,87 @@
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: fill;
|
object-fit: fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#bunt,#grün,#special {
|
#bunt,#grün,#special {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
color: #006a4e;
|
color: #006a4e;
|
||||||
}
|
}
|
||||||
|
|
@ -1,76 +1,76 @@
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: none;
|
object-fit: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
}
|
}
|
||||||
|
|
@ -159,18 +159,18 @@ var Aufgabe06;
|
||||||
for (let index = 0; index < categories[nummer].products.length; index++) {
|
for (let index = 0; index < categories[nummer].products.length; index++) {
|
||||||
let product = document.createElement("div");
|
let product = document.createElement("div");
|
||||||
product.classList.add("product");
|
product.classList.add("product");
|
||||||
product.innerHTML = `
|
product.innerHTML = `
|
||||||
<h3 class="title"> ${categories[nummer].products[index].title} </h3>
|
<h3 class="title"> ${categories[nummer].products[index].title} </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> ${categories[nummer].products[index].price.toFixed(2).toLocaleString()} ¥</span>
|
<span class="price"> ${categories[nummer].products[index].price.toFixed(2).toLocaleString()} ¥</span>
|
||||||
<button class="addProduct" productPrice="${categories[nummer].products[index].price}">+</button>
|
<button class="addProduct" productPrice="${categories[nummer].products[index].price}">+</button>
|
||||||
<button class="removeProduct">-</button>
|
<button class="removeProduct">-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/${categories[nummer].products[index].imgName}" alt="Product" />
|
<img src="files/${categories[nummer].products[index].imgName}" alt="Product" />
|
||||||
<p class="size"> Size: ${categories[nummer].products[index].size}</p>
|
<p class="size"> Size: ${categories[nummer].products[index].size}</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> ${categories[nummer].products[index].description}</p>
|
<p> ${categories[nummer].products[index].description}</p>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
container.appendChild(product);
|
container.appendChild(product);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,289 +1,289 @@
|
||||||
// Datensammlung für Produkte
|
// Datensammlung für Produkte
|
||||||
|
|
||||||
namespace Aufgabe06 {
|
namespace Aufgabe06 {
|
||||||
|
|
||||||
let shoppingPrice: number = 0;
|
let shoppingPrice: number = 0;
|
||||||
let shoppingCount: number = 0;
|
let shoppingCount: number = 0;
|
||||||
|
|
||||||
interface Product {
|
interface Product {
|
||||||
title: string;
|
title: string;
|
||||||
price: number;
|
price: number;
|
||||||
size: string;
|
size: string;
|
||||||
imgName: string;
|
imgName: string;
|
||||||
description: string;
|
description: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Category {
|
interface Category {
|
||||||
title: string;
|
title: string;
|
||||||
id: string;
|
id: string;
|
||||||
products: Product[];
|
products: Product[];
|
||||||
}
|
}
|
||||||
|
|
||||||
let categories: Category[] = [
|
let categories: Category[] = [
|
||||||
{
|
{
|
||||||
title: "Special Offers!",
|
title: "Special Offers!",
|
||||||
id: "special",
|
id: "special",
|
||||||
products: [
|
products: [
|
||||||
{
|
{
|
||||||
title: "Color: Rainbow",
|
title: "Color: Rainbow",
|
||||||
price: 3279.99,
|
price: 3279.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-rainbow-square.png",
|
imgName: "grass-rainbow-square.png",
|
||||||
description: "If you can't choose one color, go and catch them all!"
|
description: "If you can't choose one color, go and catch them all!"
|
||||||
}, {
|
}, {
|
||||||
title: "Color: White",
|
title: "Color: White",
|
||||||
price: 3279.99,
|
price: 3279.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-white.png",
|
imgName: "grass-white.png",
|
||||||
description: "The appearance of many sparkling stars on your garden floor."
|
description: "The appearance of many sparkling stars on your garden floor."
|
||||||
}, {
|
}, {
|
||||||
title: "Color: Black",
|
title: "Color: Black",
|
||||||
price: 3279.99,
|
price: 3279.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-black.png",
|
imgName: "grass-black.png",
|
||||||
description: "Dark as the night. Be careful not to form a black hole!"
|
description: "Dark as the night. Be careful not to form a black hole!"
|
||||||
}, {
|
}, {
|
||||||
title: "Pattern: Murica",
|
title: "Pattern: Murica",
|
||||||
price: 3279.99,
|
price: 3279.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-green-murica.png",
|
imgName: "grass-green-murica.png",
|
||||||
description: "Texas, Trump, Guns & Hamburgers"
|
description: "Texas, Trump, Guns & Hamburgers"
|
||||||
}, {
|
}, {
|
||||||
title: "Pattern: Schachbrett",
|
title: "Pattern: Schachbrett",
|
||||||
price: 3279.99,
|
price: 3279.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-green-chess-square.png",
|
imgName: "grass-green-chess-square.png",
|
||||||
description: "Show your intellect on your own lawn and embarrass your opponents!"
|
description: "Show your intellect on your own lawn and embarrass your opponents!"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
title: "Bunte Gräser",
|
title: "Bunte Gräser",
|
||||||
id: "bunt",
|
id: "bunt",
|
||||||
products: [
|
products: [
|
||||||
{
|
{
|
||||||
title: "Color: Green",
|
title: "Color: Green",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-green.png",
|
imgName: "grass-green.png",
|
||||||
description: "The standard model in our range. Ensures a natural look and pleasant freshness in your living room!"
|
description: "The standard model in our range. Ensures a natural look and pleasant freshness in your living room!"
|
||||||
}, {
|
}, {
|
||||||
title: "Color: Desert",
|
title: "Color: Desert",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-yellow.png",
|
imgName: "grass-yellow.png",
|
||||||
description: "Summer, sun and oh my god, I'm hot! Are they pyramids in my garden ?!"
|
description: "Summer, sun and oh my god, I'm hot! Are they pyramids in my garden ?!"
|
||||||
}, {
|
}, {
|
||||||
title: "Color: Beach",
|
title: "Color: Beach",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-orange.png",
|
imgName: "grass-orange.png",
|
||||||
description: "Summer, sun and hot feelings!"
|
description: "Summer, sun and hot feelings!"
|
||||||
}, {
|
}, {
|
||||||
title: "Pattern: Hell",
|
title: "Pattern: Hell",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-red.png",
|
imgName: "grass-red.png",
|
||||||
description: "Look into the abyss that could await you after your death and invite guests to it!"
|
description: "Look into the abyss that could await you after your death and invite guests to it!"
|
||||||
}, {
|
}, {
|
||||||
title: "Pattern: Unicorn",
|
title: "Pattern: Unicorn",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-pink.png",
|
imgName: "grass-pink.png",
|
||||||
description: "PINK FLUFFY UNICORN, DANCING ON RAINBOWS (which you can also buy in here) !!!"
|
description: "PINK FLUFFY UNICORN, DANCING ON RAINBOWS (which you can also buy in here) !!!"
|
||||||
}, {
|
}, {
|
||||||
title: "Pattern: Grape",
|
title: "Pattern: Grape",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-purple.png",
|
imgName: "grass-purple.png",
|
||||||
description: "It looks purple. Do you have to say more?"
|
description: "It looks purple. Do you have to say more?"
|
||||||
}, {
|
}, {
|
||||||
title: "Pattern: Atlantic",
|
title: "Pattern: Atlantic",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "4m²",
|
size: "4m²",
|
||||||
imgName: "grass-blue.png",
|
imgName: "grass-blue.png",
|
||||||
description: "Blue like the ocean. A deep look and mysterious nature."
|
description: "Blue like the ocean. A deep look and mysterious nature."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
title: "Green-Tones",
|
title: "Green-Tones",
|
||||||
id: "grün",
|
id: "grün",
|
||||||
products: [
|
products: [
|
||||||
{
|
{
|
||||||
title: "Green: 3B",
|
title: "Green: 3B",
|
||||||
price: 3499.99,
|
price: 3499.99,
|
||||||
size: "10m²",
|
size: "10m²",
|
||||||
imgName: "grass-green-dark-3.png",
|
imgName: "grass-green-dark-3.png",
|
||||||
description: "Green in every way. Nothing more to know about it."
|
description: "Green in every way. Nothing more to know about it."
|
||||||
}, {
|
}, {
|
||||||
title: "Green: 2B",
|
title: "Green: 2B",
|
||||||
price: 3499.99,
|
price: 3499.99,
|
||||||
size: "10m²",
|
size: "10m²",
|
||||||
imgName: "grass-green-dark-2.png",
|
imgName: "grass-green-dark-2.png",
|
||||||
description: "Green in every way. Nothing more to know about it."
|
description: "Green in every way. Nothing more to know about it."
|
||||||
}, {
|
}, {
|
||||||
title: "Green: B",
|
title: "Green: B",
|
||||||
price: 3499.99,
|
price: 3499.99,
|
||||||
size: "10m²",
|
size: "10m²",
|
||||||
imgName: "grass-green-dark-1.png",
|
imgName: "grass-green-dark-1.png",
|
||||||
description: "Green in every way. Nothing more to know about it."
|
description: "Green in every way. Nothing more to know about it."
|
||||||
}, {
|
}, {
|
||||||
title: "Green: HB",
|
title: "Green: HB",
|
||||||
price: 2339.99,
|
price: 2339.99,
|
||||||
size: "10m²",
|
size: "10m²",
|
||||||
imgName: "grass-green.png",
|
imgName: "grass-green.png",
|
||||||
description: "The standard model in our range. Ensures a natural look and pleasant freshness in your living room!"
|
description: "The standard model in our range. Ensures a natural look and pleasant freshness in your living room!"
|
||||||
}, {
|
}, {
|
||||||
title: "Green: H",
|
title: "Green: H",
|
||||||
price: 3499.99,
|
price: 3499.99,
|
||||||
size: "10m²",
|
size: "10m²",
|
||||||
imgName: "grass-green-light-1.png",
|
imgName: "grass-green-light-1.png",
|
||||||
description: "Green in every way. Nothing more to know about it."
|
description: "Green in every way. Nothing more to know about it."
|
||||||
}, {
|
}, {
|
||||||
title: "Green: 2H",
|
title: "Green: 2H",
|
||||||
price: 3499.99,
|
price: 3499.99,
|
||||||
size: "10m²",
|
size: "10m²",
|
||||||
imgName: "grass-green-light-2.png",
|
imgName: "grass-green-light-2.png",
|
||||||
description: "Green in every way. Nothing more to know about it."
|
description: "Green in every way. Nothing more to know about it."
|
||||||
}, {
|
}, {
|
||||||
title: "Green: 3H",
|
title: "Green: 3H",
|
||||||
price: 3499.99,
|
price: 3499.99,
|
||||||
size: "10m²",
|
size: "10m²",
|
||||||
imgName: "grass-green-light-3.png",
|
imgName: "grass-green-light-3.png",
|
||||||
description: "Green in every way. Nothing more to know about it."
|
description: "Green in every way. Nothing more to know about it."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
printProducts(100);
|
printProducts(100);
|
||||||
|
|
||||||
//create Structure;
|
//create Structure;
|
||||||
|
|
||||||
function printProducts(_catNumber: number): void {
|
function printProducts(_catNumber: number): void {
|
||||||
|
|
||||||
clearProducts();
|
clearProducts();
|
||||||
|
|
||||||
let catCheck: boolean = false;
|
let catCheck: boolean = false;
|
||||||
if (_catNumber != 100)
|
if (_catNumber != 100)
|
||||||
catCheck = true;
|
catCheck = true;
|
||||||
else
|
else
|
||||||
_catNumber = 0;
|
_catNumber = 0;
|
||||||
|
|
||||||
for (let nummer: number = _catNumber; nummer < categories.length; nummer++) {
|
for (let nummer: number = _catNumber; nummer < categories.length; nummer++) {
|
||||||
|
|
||||||
let heading: HTMLHeadingElement = document.createElement("h1");
|
let heading: HTMLHeadingElement = document.createElement("h1");
|
||||||
heading.setAttribute("id", categories[nummer].id);
|
heading.setAttribute("id", categories[nummer].id);
|
||||||
heading.innerHTML = `${categories[nummer].title}`;
|
heading.innerHTML = `${categories[nummer].title}`;
|
||||||
(<HTMLDivElement>document.querySelector("#übersicht")).appendChild(heading);
|
(<HTMLDivElement>document.querySelector("#übersicht")).appendChild(heading);
|
||||||
|
|
||||||
let container: HTMLDivElement = document.createElement("div");
|
let container: HTMLDivElement = document.createElement("div");
|
||||||
container.classList.add("container");
|
container.classList.add("container");
|
||||||
(<HTMLDivElement>document.querySelector("#übersicht")).appendChild(container);
|
(<HTMLDivElement>document.querySelector("#übersicht")).appendChild(container);
|
||||||
|
|
||||||
for (let index: number = 0; index < categories[nummer].products.length; index++) {
|
for (let index: number = 0; index < categories[nummer].products.length; index++) {
|
||||||
let product: HTMLDivElement = document.createElement("div");
|
let product: HTMLDivElement = document.createElement("div");
|
||||||
product.classList.add("product");
|
product.classList.add("product");
|
||||||
product.innerHTML = `
|
product.innerHTML = `
|
||||||
<h3 class="title"> ${categories[nummer].products[index].title} </h3>
|
<h3 class="title"> ${categories[nummer].products[index].title} </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> ${categories[nummer].products[index].price.toFixed(2).toLocaleString()} ¥</span>
|
<span class="price"> ${categories[nummer].products[index].price.toFixed(2).toLocaleString()} ¥</span>
|
||||||
<button class="addProduct" productPrice="${categories[nummer].products[index].price}">+</button>
|
<button class="addProduct" productPrice="${categories[nummer].products[index].price}">+</button>
|
||||||
<button class="removeProduct">-</button>
|
<button class="removeProduct">-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/${categories[nummer].products[index].imgName}" alt="Product" />
|
<img src="files/${categories[nummer].products[index].imgName}" alt="Product" />
|
||||||
<p class="size"> Size: ${categories[nummer].products[index].size}</p>
|
<p class="size"> Size: ${categories[nummer].products[index].size}</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> ${categories[nummer].products[index].description}</p>
|
<p> ${categories[nummer].products[index].description}</p>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
container.appendChild(product);
|
container.appendChild(product);
|
||||||
}
|
}
|
||||||
if (catCheck)
|
if (catCheck)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
addShoppingFunction();
|
addShoppingFunction();
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearProducts(): void {
|
function clearProducts(): void {
|
||||||
console.log("Ich wurde geklickt");
|
console.log("Ich wurde geklickt");
|
||||||
for (let nummer: number = 0; nummer < categories.length; nummer++) {
|
for (let nummer: number = 0; nummer < categories.length; nummer++) {
|
||||||
let alles: HTMLDivElement = (<HTMLDivElement>document.querySelector("#übersicht"));
|
let alles: HTMLDivElement = (<HTMLDivElement>document.querySelector("#übersicht"));
|
||||||
alles.innerHTML = "";
|
alles.innerHTML = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(<HTMLLIElement>document.querySelector("#special_a")).addEventListener("click", drawSpecial);
|
(<HTMLLIElement>document.querySelector("#special_a")).addEventListener("click", drawSpecial);
|
||||||
function drawSpecial(): void {
|
function drawSpecial(): void {
|
||||||
printProducts(0);
|
printProducts(0);
|
||||||
}
|
}
|
||||||
(<HTMLLIElement>document.querySelector("#bunt_a")).addEventListener("click", drawBunt);
|
(<HTMLLIElement>document.querySelector("#bunt_a")).addEventListener("click", drawBunt);
|
||||||
function drawBunt(): void {
|
function drawBunt(): void {
|
||||||
printProducts(1);
|
printProducts(1);
|
||||||
}
|
}
|
||||||
(<HTMLLIElement>document.querySelector("#grün_a")).addEventListener("click", drawGrün);
|
(<HTMLLIElement>document.querySelector("#grün_a")).addEventListener("click", drawGrün);
|
||||||
function drawGrün(): void {
|
function drawGrün(): void {
|
||||||
printProducts(2);
|
printProducts(2);
|
||||||
}
|
}
|
||||||
(<HTMLLIElement>document.querySelector("#all_a")).addEventListener("click", drawAll);
|
(<HTMLLIElement>document.querySelector("#all_a")).addEventListener("click", drawAll);
|
||||||
function drawAll(): void {
|
function drawAll(): void {
|
||||||
printProducts(100);
|
printProducts(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
function money(_event: Event): void {
|
function money(_event: Event): void {
|
||||||
let target: HTMLElement = (<HTMLElement>_event.target);
|
let target: HTMLElement = (<HTMLElement>_event.target);
|
||||||
let price: number = parseFloat(target.getAttribute("productPrice")!);
|
let price: number = parseFloat(target.getAttribute("productPrice")!);
|
||||||
console.log("Artikel-Preis: " + price + " ¥");
|
console.log("Artikel-Preis: " + price + " ¥");
|
||||||
shoppingPrice += price;
|
shoppingPrice += price;
|
||||||
console.log("Shopping-Cart-Preis: " + shoppingPrice + " ¥");
|
console.log("Shopping-Cart-Preis: " + shoppingPrice + " ¥");
|
||||||
shoppingCount++;
|
shoppingCount++;
|
||||||
(<HTMLLIElement>document.querySelector("#shoppingCartNumber")).innerHTML = shoppingCount.toLocaleString();
|
(<HTMLLIElement>document.querySelector("#shoppingCartNumber")).innerHTML = shoppingCount.toLocaleString();
|
||||||
}
|
}
|
||||||
|
|
||||||
function addShoppingFunction(): void {
|
function addShoppingFunction(): void {
|
||||||
const buttons: HTMLCollectionOf<Element> = document.getElementsByClassName("addProduct");
|
const buttons: HTMLCollectionOf<Element> = document.getElementsByClassName("addProduct");
|
||||||
for (const button of buttons) {
|
for (const button of buttons) {
|
||||||
button.addEventListener("click", money);
|
button.addEventListener("click", money);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Folgender auskommentierter Code dient mir als Archiv für Gedankenansätze oder Verläufe.
|
// Folgender auskommentierter Code dient mir als Archiv für Gedankenansätze oder Verläufe.
|
||||||
// Wenn dies nicht gerne gesehen ist, gebt mir kurz Bescheid und ich werde es entfernen
|
// Wenn dies nicht gerne gesehen ist, gebt mir kurz Bescheid und ich werde es entfernen
|
||||||
|
|
||||||
/*
|
/*
|
||||||
function zeichnen(tagArray: Tag[]): void {
|
function zeichnen(tagArray: Tag[]): void {
|
||||||
for (let i: number = 0; i < tagArray.length ; i++){
|
for (let i: number = 0; i < tagArray.length ; i++){
|
||||||
let title: HTMLElement = document.createElement(tagArray[i].tag);
|
let title: HTMLElement = document.createElement(tagArray[i].tag);
|
||||||
title.innerHTML = "I bims title";
|
title.innerHTML = "I bims title";
|
||||||
title.classList.add("title");
|
title.classList.add("title");
|
||||||
if (tagArray[i].image) {
|
if (tagArray[i].image) {
|
||||||
title.setAttribute("src", "value");
|
title.setAttribute("src", "value");
|
||||||
title.setAttribute("alt", "value");
|
title.setAttribute("alt", "value");
|
||||||
}
|
}
|
||||||
document.body.appendChild(title);
|
document.body.appendChild(title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
console.log("Hello Console");
|
console.log("Hello Console");
|
||||||
let theName: String = "Justin" + "Dretvic" + 20;
|
let theName: String = "Justin" + "Dretvic" + 20;
|
||||||
console.log(theName);
|
console.log(theName);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
# Template für ein Produkt in HTML
|
# Template für ein Produkt in HTML
|
||||||
<div class="product"> tag class
|
<div class="product"> tag class
|
||||||
<h3 class="title"> Color: Rainbow </h3> tag class content
|
<h3 class="title"> Color: Rainbow </h3> tag class content
|
||||||
<div class=shopIn> tag class
|
<div class=shopIn> tag class
|
||||||
<span class="price"> 3279,99 ¥ </span> tag class content
|
<span class="price"> 3279,99 ¥ </span> tag class content
|
||||||
<button>+</button> tag content
|
<button>+</button> tag content
|
||||||
<button>-</button> tag content
|
<button>-</button> tag content
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-rainbow-square.png" alt="Product" /> tag attribute1 attribute2
|
<img src="files/grass-rainbow-square.png" alt="Product" /> tag attribute1 attribute2
|
||||||
<p class="size"> Size: 4m²</p> tag class content
|
<p class="size"> Size: 4m²</p> tag class content
|
||||||
<div class="description"> tag class
|
<div class="description"> tag class
|
||||||
<p> If you can't choose one color, go and catch them all!</p> tag content
|
<p> If you can't choose one color, go and catch them all!</p> tag content
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
*/
|
*/
|
||||||
|
|
@ -1,124 +1,124 @@
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: Chelsea Market;
|
font-family: Chelsea Market;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #006a4e;
|
background-color: #006a4e;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
}
|
}
|
||||||
|
|
||||||
header ul {
|
header ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header li {
|
header li {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 10px auto 0px;
|
margin: 10px auto 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header li a {
|
header li a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .dropdown {
|
header .dropdown {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 5px 0px 5px;
|
margin: 10px 5px 0px 5px;
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .dropdown-content {
|
header .dropdown-content {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .dropdown:hover .dropdown-content {
|
header .dropdown:hover .dropdown-content {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart {
|
header #shopping_cart {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 5px 0px 5px;
|
margin: 10px 5px 0px 5px;
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart a {
|
header #shopping_cart a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size:24px
|
font-size:24px
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart a:hover {
|
header #shopping_cart a:hover {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .title_bar img {
|
header .title_bar img {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin: 5px 15px;
|
margin: 5px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .title_bar span {
|
header .title_bar span {
|
||||||
font-size: 27px;
|
font-size: 27px;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
margin: auto 0px;
|
margin: auto 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .title_bar {
|
header .title_bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin: 5px
|
margin: 5px
|
||||||
}
|
}
|
||||||
|
|
||||||
header #bottom {
|
header #bottom {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart {
|
header #shopping_cart {
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
display: block;
|
display: block;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 5px 0px 5px;
|
margin: 10px 5px 0px 5px;
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 10px 5px;
|
padding: 10px 5px;
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: calc(100%-10px);
|
width: calc(100%-10px);
|
||||||
background-color: #272727;
|
background-color: #272727;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer p {
|
footer p {
|
||||||
margin: 0px 0px 10px;
|
margin: 0px 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
@ -1,51 +1,51 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Chelsea+Market&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Chelsea+Market&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" media="screen and (max-width: 600px)" href="product-small.css">
|
<link rel="stylesheet" media="screen and (max-width: 600px)" href="product-small.css">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 601px)" href="product-medium.css">
|
<link rel="stylesheet" media="screen and (min-width: 601px)" href="product-medium.css">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="product-big.css">
|
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="product-big.css">
|
||||||
<link rel="stylesheet" href="shop.css">
|
<link rel="stylesheet" href="shop.css">
|
||||||
<script src="script.js" defer></script>
|
<script src="script.js" defer></script>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>green grass</title>
|
<title>green grass</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<div class="title_bar">
|
<div class="title_bar">
|
||||||
<img src="files/grass_icon_left.png" alt="grass" />
|
<img src="files/grass_icon_left.png" alt="grass" />
|
||||||
<span>GREEEN GRASS</span>
|
<span>GREEEN GRASS</span>
|
||||||
<img src="files/grass_icon_right.png" alt="grass" />
|
<img src="files/grass_icon_right.png" alt="grass" />
|
||||||
</div>
|
</div>
|
||||||
<div id="bottom">
|
<div id="bottom">
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<span>Categories</span>
|
<span>Categories</span>
|
||||||
<ul class="dropdown-content">
|
<ul class="dropdown-content">
|
||||||
<li id="special_a"><a>~ Special Offers ~</a></li>
|
<li id="special_a"><a>~ Special Offers ~</a></li>
|
||||||
<li id="bunt_a"><a>~ Colored Grass ~</a></li>
|
<li id="bunt_a"><a>~ Colored Grass ~</a></li>
|
||||||
<li id="grün_a"><a>~ Green-Tones ~</a></li>
|
<li id="grün_a"><a>~ Green-Tones ~</a></li>
|
||||||
<li id="all_a"><a>~ Show All ~</a></li>
|
<li id="all_a"><a>~ Show All ~</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="shopping_cart">
|
<div id="shopping_cart">
|
||||||
<a href=""><span id=shoppingCartNumber> </span><i class="fas fa-shopping-cart" style='font-size:24px'> </i></a>
|
<a href=""><span id=shoppingCartNumber> </span><i class="fas fa-shopping-cart" style='font-size:24px'> </i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div id="übersicht">
|
<div id="übersicht">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<h1>Disclaimer</h1>
|
<h1>Disclaimer</h1>
|
||||||
<p>This website is not used monetarily </p>
|
<p>This website is not used monetarily </p>
|
||||||
<p>Not even if things seem to be sold here!</p>
|
<p>Not even if things seem to be sold here!</p>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,153 +1,153 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"title": "Special Offers!",
|
"title": "Special Offers!",
|
||||||
"id": "special",
|
"id": "special",
|
||||||
"products": [
|
"products": [
|
||||||
{
|
{
|
||||||
"title": "Color: Rainbow",
|
"title": "Color: Rainbow",
|
||||||
"price": 3279.99,
|
"price": 3279.99,
|
||||||
"size": "4m²",
|
"size": "4m²",
|
||||||
"imgName": "grass-rainbow-square.png",
|
"imgName": "grass-rainbow-square.png",
|
||||||
"description": "If you can't choose one color, go and catch them all!"
|
"description": "If you can't choose one color, go and catch them all!"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Color: White",
|
"title": "Color: White",
|
||||||
"price": 3279.99,
|
"price": 3279.99,
|
||||||
"size": "4m²",
|
"size": "4m²",
|
||||||
"imgName": "grass-white.png",
|
"imgName": "grass-white.png",
|
||||||
"description": "The appearance of many sparkling stars on your garden floor."
|
"description": "The appearance of many sparkling stars on your garden floor."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Color: Black",
|
"title": "Color: Black",
|
||||||
"price": 3279.99,
|
"price": 3279.99,
|
||||||
"size": "4m²",
|
"size": "4m²",
|
||||||
"imgName": "grass-black.png",
|
"imgName": "grass-black.png",
|
||||||
"description": "Dark as the night. Be careful not to form a black hole!"
|
"description": "Dark as the night. Be careful not to form a black hole!"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Pattern: Murica",
|
"title": "Pattern: Murica",
|
||||||
"price": 3279.99,
|
"price": 3279.99,
|
||||||
"size": "4m²",
|
"size": "4m²",
|
||||||
"imgName": "grass-green-murica.png",
|
"imgName": "grass-green-murica.png",
|
||||||
"description": "Texas, Trump, Guns & Hamburgers"
|
"description": "Texas, Trump, Guns & Hamburgers"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Pattern: Schachbrett",
|
"title": "Pattern: Schachbrett",
|
||||||
"price": 3279.99,
|
"price": 3279.99,
|
||||||
"size": "4m²",
|
"size": "4m²",
|
||||||
"imgName": "grass-green-chess-square.png",
|
"imgName": "grass-green-chess-square.png",
|
||||||
"description": "Show your intellect on your own lawn and embarrass your opponents!"
|
"description": "Show your intellect on your own lawn and embarrass your opponents!"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Bunte Gräser",
|
"title": "Bunte Gräser",
|
||||||
"id": "bunt",
|
"id": "bunt",
|
||||||
"products": [
|
"products": [
|
||||||
{
|
{
|
||||||
"title": "Color: Green",
|
"title": "Color: Green",
|
||||||
"price": 2339.99,
|
"price": 2339.99,
|
||||||
"size": "4m²",
|
"size": "4m²",
|
||||||
"imgName": "grass-green.png",
|
"imgName": "grass-green.png",
|
||||||
"description": "The standard model in our range. Ensures a natural look and pleasant freshness in your living room!"
|
"description": "The standard model in our range. Ensures a natural look and pleasant freshness in your living room!"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Color: Desert",
|
"title": "Color: Desert",
|
||||||
"price": 2339.99,
|
"price": 2339.99,
|
||||||
"size": "4m²",
|
"size": "4m²",
|
||||||
"imgName": "grass-yellow.png",
|
"imgName": "grass-yellow.png",
|
||||||
"description": "Summer, sun and oh my god, I'm hot! Are they pyramids in my garden ?!"
|
"description": "Summer, sun and oh my god, I'm hot! Are they pyramids in my garden ?!"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Color: Beach",
|
"title": "Color: Beach",
|
||||||
"price": 2339.99,
|
"price": 2339.99,
|
||||||
"size": "4m²",
|
"size": "4m²",
|
||||||
"imgName": "grass-orange.png",
|
"imgName": "grass-orange.png",
|
||||||
"description": "Summer, sun and hot feelings!"
|
"description": "Summer, sun and hot feelings!"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Pattern: Hell",
|
"title": "Pattern: Hell",
|
||||||
"price": 2339.99,
|
"price": 2339.99,
|
||||||
"size": "4m²",
|
"size": "4m²",
|
||||||
"imgName": "grass-red.png",
|
"imgName": "grass-red.png",
|
||||||
"description": "Look into the abyss that could await you after your death and invite guests to it!"
|
"description": "Look into the abyss that could await you after your death and invite guests to it!"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Pattern: Unicorn",
|
"title": "Pattern: Unicorn",
|
||||||
"price": 2339.99,
|
"price": 2339.99,
|
||||||
"size": "4m²",
|
"size": "4m²",
|
||||||
"imgName": "grass-pink.png",
|
"imgName": "grass-pink.png",
|
||||||
"description": "PINK FLUFFY UNICORN, DANCING ON RAINBOWS (which you can also buy in here) !!!"
|
"description": "PINK FLUFFY UNICORN, DANCING ON RAINBOWS (which you can also buy in here) !!!"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Pattern: Grape",
|
"title": "Pattern: Grape",
|
||||||
"price": 2339.99,
|
"price": 2339.99,
|
||||||
"size": "4m²",
|
"size": "4m²",
|
||||||
"imgName": "grass-purple.png",
|
"imgName": "grass-purple.png",
|
||||||
"description": "It looks purple. Do you have to say more?"
|
"description": "It looks purple. Do you have to say more?"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Pattern: Atlantic",
|
"title": "Pattern: Atlantic",
|
||||||
"price": 2339.99,
|
"price": 2339.99,
|
||||||
"size": "4m²",
|
"size": "4m²",
|
||||||
"imgName": "grass-blue.png",
|
"imgName": "grass-blue.png",
|
||||||
"description": "Blue like the ocean. A deep look and mysterious nature."
|
"description": "Blue like the ocean. A deep look and mysterious nature."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Green-Tones",
|
"title": "Green-Tones",
|
||||||
"id": "grün",
|
"id": "grün",
|
||||||
"products": [
|
"products": [
|
||||||
{
|
{
|
||||||
"title": "Green: 3B",
|
"title": "Green: 3B",
|
||||||
"price": 3499.99,
|
"price": 3499.99,
|
||||||
"size": "10m²",
|
"size": "10m²",
|
||||||
"imgName": "grass-green-dark-3.png",
|
"imgName": "grass-green-dark-3.png",
|
||||||
"description": "Green in every way. Nothing more to know about it."
|
"description": "Green in every way. Nothing more to know about it."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Green: 2B",
|
"title": "Green: 2B",
|
||||||
"price": 3499.99,
|
"price": 3499.99,
|
||||||
"size": "10m²",
|
"size": "10m²",
|
||||||
"imgName": "grass-green-dark-2.png",
|
"imgName": "grass-green-dark-2.png",
|
||||||
"description": "Green in every way. Nothing more to know about it."
|
"description": "Green in every way. Nothing more to know about it."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Green: B",
|
"title": "Green: B",
|
||||||
"price": 3499.99,
|
"price": 3499.99,
|
||||||
"size": "10m²",
|
"size": "10m²",
|
||||||
"imgName": "grass-green-dark-1.png",
|
"imgName": "grass-green-dark-1.png",
|
||||||
"description": "Green in every way. Nothing more to know about it."
|
"description": "Green in every way. Nothing more to know about it."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Green: HB",
|
"title": "Green: HB",
|
||||||
"price": 2339.99,
|
"price": 2339.99,
|
||||||
"size": "10m²",
|
"size": "10m²",
|
||||||
"imgName": "grass-green.png",
|
"imgName": "grass-green.png",
|
||||||
"description": "The standard model in our range. Ensures a natural look and pleasant freshness in your living room!"
|
"description": "The standard model in our range. Ensures a natural look and pleasant freshness in your living room!"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Green: H",
|
"title": "Green: H",
|
||||||
"price": 3499.99,
|
"price": 3499.99,
|
||||||
"size": "10m²",
|
"size": "10m²",
|
||||||
"imgName": "grass-green-light-1.png",
|
"imgName": "grass-green-light-1.png",
|
||||||
"description": "Green in every way. Nothing more to know about it."
|
"description": "Green in every way. Nothing more to know about it."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Green: 2H",
|
"title": "Green: 2H",
|
||||||
"price": 3499.99,
|
"price": 3499.99,
|
||||||
"size": "10m²",
|
"size": "10m²",
|
||||||
"imgName": "grass-green-light-2.png",
|
"imgName": "grass-green-light-2.png",
|
||||||
"description": "Green in every way. Nothing more to know about it."
|
"description": "Green in every way. Nothing more to know about it."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Green: 3H",
|
"title": "Green: 3H",
|
||||||
"price": 3499.99,
|
"price": 3499.99,
|
||||||
"size": "10m²",
|
"size": "10m²",
|
||||||
"imgName": "grass-green-light-3.png",
|
"imgName": "grass-green-light-3.png",
|
||||||
"description": "Green in every way. Nothing more to know about it."
|
"description": "Green in every way. Nothing more to know about it."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -1,89 +1,89 @@
|
||||||
#übersicht {
|
#übersicht {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: fill;
|
object-fit: fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
@ -1,94 +1,94 @@
|
||||||
#übersicht {
|
#übersicht {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 20px;
|
margin: 10px 20px;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: width;
|
height: width;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: fill;
|
object-fit: fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#bunt,#grün,#special {
|
#bunt,#grün,#special {
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
color: #006a4e;
|
color: #006a4e;
|
||||||
}
|
}
|
||||||
|
|
@ -1,87 +1,87 @@
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: fill;
|
object-fit: fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#bunt,#grün,#special {
|
#bunt,#grün,#special {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
color: #006a4e;
|
color: #006a4e;
|
||||||
}
|
}
|
||||||
|
|
@ -1,76 +1,76 @@
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product {
|
.container .product {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
background-color: #b8d5cd;
|
background-color: #b8d5cd;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product img {
|
.container .product img {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
border: solid #006a4e;
|
border: solid #006a4e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: none;
|
object-fit: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product p, h3 {
|
.container .product p, h3 {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .title {
|
.container .product .title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn {
|
.container .product .shopIn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn span,button{
|
.container .product .shopIn span,button{
|
||||||
display: flex;
|
display: flex;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button>span.buttonModifier {
|
.container .product .shopIn button>span.buttonModifier {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .shopIn button{
|
.container .product .shopIn button{
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
border-color: #006a4e;
|
border-color: #006a4e;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .size {
|
.container .product .size {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .product .description{
|
.container .product .description{
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
}
|
}
|
||||||
|
|
@ -1,124 +1,124 @@
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: Chelsea Market;
|
font-family: Chelsea Market;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #006a4e;
|
background-color: #006a4e;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
}
|
}
|
||||||
|
|
||||||
header ul {
|
header ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header li {
|
header li {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 10px auto 0px;
|
margin: 10px auto 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header li a {
|
header li a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .dropdown {
|
header .dropdown {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 5px 0px 5px;
|
margin: 10px 5px 0px 5px;
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .dropdown-content {
|
header .dropdown-content {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .dropdown:hover .dropdown-content {
|
header .dropdown:hover .dropdown-content {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart {
|
header #shopping_cart {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 5px 0px 5px;
|
margin: 10px 5px 0px 5px;
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart a {
|
header #shopping_cart a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
font-size:24px
|
font-size:24px
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart a:hover {
|
header #shopping_cart a:hover {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .title_bar img {
|
header .title_bar img {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin: 5px 15px;
|
margin: 5px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .title_bar span {
|
header .title_bar span {
|
||||||
font-size: 27px;
|
font-size: 27px;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
margin: auto 0px;
|
margin: auto 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header .title_bar {
|
header .title_bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin: 5px
|
margin: 5px
|
||||||
}
|
}
|
||||||
|
|
||||||
header #bottom {
|
header #bottom {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
header #shopping_cart {
|
header #shopping_cart {
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #b8d5cd;
|
color: #b8d5cd;
|
||||||
display: block;
|
display: block;
|
||||||
background-color: #2e856e;
|
background-color: #2e856e;
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
margin: 10px 5px 0px 5px;
|
margin: 10px 5px 0px 5px;
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 10px 5px;
|
padding: 10px 5px;
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: calc(100%-10px);
|
width: calc(100%-10px);
|
||||||
background-color: #272727;
|
background-color: #272727;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer p {
|
footer p {
|
||||||
margin: 0px 0px 10px;
|
margin: 0px 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
@ -1,51 +1,51 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
||||||
<link SameSite="Secure" href="https://fonts.googleapis.com/css2?family=Chelsea+Market&display=swap" rel="stylesheet">
|
<link SameSite="Secure" href="https://fonts.googleapis.com/css2?family=Chelsea+Market&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" media="screen and (max-width: 600px)" href="product-small.css">
|
<link rel="stylesheet" media="screen and (max-width: 600px)" href="product-small.css">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 601px)" href="product-medium.css">
|
<link rel="stylesheet" media="screen and (min-width: 601px)" href="product-medium.css">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="product-big.css">
|
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="product-big.css">
|
||||||
<link rel="stylesheet" href="shop.css">
|
<link rel="stylesheet" href="shop.css">
|
||||||
<script src="shop.js" defer></script>
|
<script src="shop.js" defer></script>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>green grass</title>
|
<title>green grass</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<div class="title_bar">
|
<div class="title_bar">
|
||||||
<img src="files/grass_icon_left.png" alt="grass" />
|
<img src="files/grass_icon_left.png" alt="grass" />
|
||||||
<span>GREEEN GRASS</span>
|
<span>GREEEN GRASS</span>
|
||||||
<img src="files/grass_icon_right.png" alt="grass" />
|
<img src="files/grass_icon_right.png" alt="grass" />
|
||||||
</div>
|
</div>
|
||||||
<div id="bottom">
|
<div id="bottom">
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<span>Categories</span>
|
<span>Categories</span>
|
||||||
<ul class="dropdown-content">
|
<ul class="dropdown-content">
|
||||||
<li id="special_a"><a>~ Special Offers ~</a></li>
|
<li id="special_a"><a>~ Special Offers ~</a></li>
|
||||||
<li id="bunt_a"><a>~ Colored Grass ~</a></li>
|
<li id="bunt_a"><a>~ Colored Grass ~</a></li>
|
||||||
<li id="grün_a"><a>~ Green-Tones ~</a></li>
|
<li id="grün_a"><a>~ Green-Tones ~</a></li>
|
||||||
<li id="all_a"><a>~ Show All ~</a></li>
|
<li id="all_a"><a>~ Show All ~</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="shopping_cart">
|
<div id="shopping_cart">
|
||||||
<a href="shoppingCart.html"><span id=shoppingCartNumber> </span><i class="fas fa-shopping-cart" style='font-size:24px'> </i></a>
|
<a href="shoppingCart.html"><span id=shoppingCartNumber> </span><i class="fas fa-shopping-cart" style='font-size:24px'> </i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div id="übersicht">
|
<div id="übersicht">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<h1>Disclaimer</h1>
|
<h1>Disclaimer</h1>
|
||||||
<p>This website is not used monetarily </p>
|
<p>This website is not used monetarily </p>
|
||||||
<p>Not even if things seem to be sold here!</p>
|
<p>Not even if things seem to be sold here!</p>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -60,18 +60,18 @@ var Aufgabe07;
|
||||||
for (let index = 0; index < jsonObj[nummer].products.length; index++) {
|
for (let index = 0; index < jsonObj[nummer].products.length; index++) {
|
||||||
let product = document.createElement("div");
|
let product = document.createElement("div");
|
||||||
product.classList.add("product");
|
product.classList.add("product");
|
||||||
product.innerHTML = `
|
product.innerHTML = `
|
||||||
<h3 class="title"> ${jsonObj[nummer].products[index].title} </h3>
|
<h3 class="title"> ${jsonObj[nummer].products[index].title} </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> ${jsonObj[nummer].products[index].price.toFixed(2).toLocaleString()} ¥</span>
|
<span class="price"> ${jsonObj[nummer].products[index].price.toFixed(2).toLocaleString()} ¥</span>
|
||||||
<button class="addProduct" CategoryNumber="${nummer}" productIndex="${index}">+</button>
|
<button class="addProduct" CategoryNumber="${nummer}" productIndex="${index}">+</button>
|
||||||
<button class="removeProduct">-</button>
|
<button class="removeProduct">-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/${jsonObj[nummer].products[index].imgName}" alt="Product" />
|
<img src="files/${jsonObj[nummer].products[index].imgName}" alt="Product" />
|
||||||
<p class="size"> Size: ${jsonObj[nummer].products[index].size}</p>
|
<p class="size"> Size: ${jsonObj[nummer].products[index].size}</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> ${jsonObj[nummer].products[index].description}</p>
|
<p> ${jsonObj[nummer].products[index].description}</p>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
container.appendChild(product);
|
container.appendChild(product);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,197 +1,197 @@
|
||||||
// Datensammlung für Produkte
|
// Datensammlung für Produkte
|
||||||
|
|
||||||
namespace Aufgabe07 {
|
namespace Aufgabe07 {
|
||||||
|
|
||||||
let shoppingPrice: number = 0;
|
let shoppingPrice: number = 0;
|
||||||
let shoppingCount: number = localStorage.length;
|
let shoppingCount: number = localStorage.length;
|
||||||
if ( localStorage.length > 1)
|
if ( localStorage.length > 1)
|
||||||
shoppingCount --;
|
shoppingCount --;
|
||||||
|
|
||||||
(<HTMLLIElement>document.querySelector("#shoppingCartNumber")).innerHTML = shoppingCount.toLocaleString();
|
(<HTMLLIElement>document.querySelector("#shoppingCartNumber")).innerHTML = shoppingCount.toLocaleString();
|
||||||
|
|
||||||
let jsonObj: Category[];
|
let jsonObj: Category[];
|
||||||
|
|
||||||
export interface Product {
|
export interface Product {
|
||||||
title: string;
|
title: string;
|
||||||
price: number;
|
price: number;
|
||||||
size: string;
|
size: string;
|
||||||
imgName: string;
|
imgName: string;
|
||||||
description: string;
|
description: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Category {
|
export interface Category {
|
||||||
title: string;
|
title: string;
|
||||||
id: string;
|
id: string;
|
||||||
products: Product[];
|
products: Product[];
|
||||||
}
|
}
|
||||||
|
|
||||||
communicate("https://yamidesu.github.io/GIS-SoSe-2020/Aufgaben/Aufgabe_07_2020-06-10/myJSON.json");
|
communicate("https://yamidesu.github.io/GIS-SoSe-2020/Aufgaben/Aufgabe_07_2020-06-10/myJSON.json");
|
||||||
|
|
||||||
export async function communicate(_url: RequestInfo): Promise<void> {
|
export async function communicate(_url: RequestInfo): Promise<void> {
|
||||||
let response: Response = await fetch(_url);
|
let response: Response = await fetch(_url);
|
||||||
jsonObj = await response.json();
|
jsonObj = await response.json();
|
||||||
console.log("Response", response);
|
console.log("Response", response);
|
||||||
printProducts(100);
|
printProducts(100);
|
||||||
|
|
||||||
/*console.log(jsonObj);
|
/*console.log(jsonObj);
|
||||||
console.log(jsonObj[0].products[2].price);
|
console.log(jsonObj[0].products[2].price);
|
||||||
console.log(jsonObj[1].products[3].title);*/
|
console.log(jsonObj[1].products[3].title);*/
|
||||||
|
|
||||||
(<HTMLLIElement>document.querySelector("#special_a")).addEventListener("click", drawSpecial);
|
(<HTMLLIElement>document.querySelector("#special_a")).addEventListener("click", drawSpecial);
|
||||||
function drawSpecial(): void {
|
function drawSpecial(): void {
|
||||||
printProducts(0);
|
printProducts(0);
|
||||||
}
|
}
|
||||||
(<HTMLLIElement>document.querySelector("#bunt_a")).addEventListener("click", drawBunt);
|
(<HTMLLIElement>document.querySelector("#bunt_a")).addEventListener("click", drawBunt);
|
||||||
function drawBunt(): void {
|
function drawBunt(): void {
|
||||||
printProducts(1);
|
printProducts(1);
|
||||||
}
|
}
|
||||||
(<HTMLLIElement>document.querySelector("#grün_a")).addEventListener("click", drawGrün);
|
(<HTMLLIElement>document.querySelector("#grün_a")).addEventListener("click", drawGrün);
|
||||||
function drawGrün(): void {
|
function drawGrün(): void {
|
||||||
printProducts(2);
|
printProducts(2);
|
||||||
}
|
}
|
||||||
(<HTMLLIElement>document.querySelector("#all_a")).addEventListener("click", drawAll);
|
(<HTMLLIElement>document.querySelector("#all_a")).addEventListener("click", drawAll);
|
||||||
function drawAll(): void {
|
function drawAll(): void {
|
||||||
printProducts(100);
|
printProducts(100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateShoppingCount();
|
updateShoppingCount();
|
||||||
|
|
||||||
function updateShoppingCount(): void {
|
function updateShoppingCount(): void {
|
||||||
shoppingCount = localStorage.length - 1;
|
shoppingCount = localStorage.length - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//printProducts(100);
|
//printProducts(100);
|
||||||
//console.log(jsonObj[1].products[3].title);
|
//console.log(jsonObj[1].products[3].title);
|
||||||
|
|
||||||
//create Structure;
|
//create Structure;
|
||||||
|
|
||||||
function printProducts(_catNumber: number): void {
|
function printProducts(_catNumber: number): void {
|
||||||
|
|
||||||
clearProducts();
|
clearProducts();
|
||||||
|
|
||||||
let catCheck: boolean = false;
|
let catCheck: boolean = false;
|
||||||
if (_catNumber != 100)
|
if (_catNumber != 100)
|
||||||
catCheck = true;
|
catCheck = true;
|
||||||
else
|
else
|
||||||
_catNumber = 0;
|
_catNumber = 0;
|
||||||
|
|
||||||
for (let nummer: number = _catNumber; nummer < jsonObj.length; nummer++) {
|
for (let nummer: number = _catNumber; nummer < jsonObj.length; nummer++) {
|
||||||
|
|
||||||
let heading: HTMLHeadingElement = document.createElement("h1");
|
let heading: HTMLHeadingElement = document.createElement("h1");
|
||||||
heading.setAttribute("id", jsonObj[nummer].id);
|
heading.setAttribute("id", jsonObj[nummer].id);
|
||||||
heading.innerHTML = `${jsonObj[nummer].title}`;
|
heading.innerHTML = `${jsonObj[nummer].title}`;
|
||||||
(<HTMLDivElement>document.querySelector("#übersicht")).appendChild(heading);
|
(<HTMLDivElement>document.querySelector("#übersicht")).appendChild(heading);
|
||||||
|
|
||||||
let container: HTMLDivElement = document.createElement("div");
|
let container: HTMLDivElement = document.createElement("div");
|
||||||
container.classList.add("container");
|
container.classList.add("container");
|
||||||
(<HTMLDivElement>document.querySelector("#übersicht")).appendChild(container);
|
(<HTMLDivElement>document.querySelector("#übersicht")).appendChild(container);
|
||||||
|
|
||||||
for (let index: number = 0; index < jsonObj[nummer].products.length; index++) {
|
for (let index: number = 0; index < jsonObj[nummer].products.length; index++) {
|
||||||
let product: HTMLDivElement = document.createElement("div");
|
let product: HTMLDivElement = document.createElement("div");
|
||||||
product.classList.add("product");
|
product.classList.add("product");
|
||||||
product.innerHTML = `
|
product.innerHTML = `
|
||||||
<h3 class="title"> ${jsonObj[nummer].products[index].title} </h3>
|
<h3 class="title"> ${jsonObj[nummer].products[index].title} </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> ${jsonObj[nummer].products[index].price.toFixed(2).toLocaleString()} ¥</span>
|
<span class="price"> ${jsonObj[nummer].products[index].price.toFixed(2).toLocaleString()} ¥</span>
|
||||||
<button class="addProduct" CategoryNumber="${nummer}" productIndex="${index}">+</button>
|
<button class="addProduct" CategoryNumber="${nummer}" productIndex="${index}">+</button>
|
||||||
<button class="removeProduct">-</button>
|
<button class="removeProduct">-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/${jsonObj[nummer].products[index].imgName}" alt="Product" />
|
<img src="files/${jsonObj[nummer].products[index].imgName}" alt="Product" />
|
||||||
<p class="size"> Size: ${jsonObj[nummer].products[index].size}</p>
|
<p class="size"> Size: ${jsonObj[nummer].products[index].size}</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> ${jsonObj[nummer].products[index].description}</p>
|
<p> ${jsonObj[nummer].products[index].description}</p>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
container.appendChild(product);
|
container.appendChild(product);
|
||||||
}
|
}
|
||||||
if (catCheck)
|
if (catCheck)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
addShoppingFunction();
|
addShoppingFunction();
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearProducts(): void {
|
function clearProducts(): void {
|
||||||
for (let nummer: number = 0; nummer < jsonObj.length; nummer++) {
|
for (let nummer: number = 0; nummer < jsonObj.length; nummer++) {
|
||||||
let alles: HTMLDivElement = (<HTMLDivElement>document.querySelector("#übersicht"));
|
let alles: HTMLDivElement = (<HTMLDivElement>document.querySelector("#übersicht"));
|
||||||
alles.innerHTML = "";
|
alles.innerHTML = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function money(_event: Event): void {
|
function money(_event: Event): void {
|
||||||
let target: HTMLElement = (<HTMLElement>_event.target);
|
let target: HTMLElement = (<HTMLElement>_event.target);
|
||||||
//let price: number = parseFloat(target.getAttribute("productPrice")!);
|
//let price: number = parseFloat(target.getAttribute("productPrice")!);
|
||||||
let price: number = jsonObj[parseInt(target.getAttribute("categoryNumber")!)].products[parseInt(target.getAttribute("productIndex")!)].price;
|
let price: number = jsonObj[parseInt(target.getAttribute("categoryNumber")!)].products[parseInt(target.getAttribute("productIndex")!)].price;
|
||||||
console.log("Artikel-Preis: " + price + " ¥");
|
console.log("Artikel-Preis: " + price + " ¥");
|
||||||
shoppingPrice += price;
|
shoppingPrice += price;
|
||||||
console.log("Shopping-Cart-Preis: " + shoppingPrice + " ¥");
|
console.log("Shopping-Cart-Preis: " + shoppingPrice + " ¥");
|
||||||
shoppingCount++;
|
shoppingCount++;
|
||||||
(<HTMLLIElement>document.querySelector("#shoppingCartNumber")).innerHTML = shoppingCount.toLocaleString();
|
(<HTMLLIElement>document.querySelector("#shoppingCartNumber")).innerHTML = shoppingCount.toLocaleString();
|
||||||
}
|
}
|
||||||
|
|
||||||
function addLocal(_event: Event): void {
|
function addLocal(_event: Event): void {
|
||||||
if (localStorage.shoppingCount) {
|
if (localStorage.shoppingCount) {
|
||||||
localStorage.shoppingCount = Number(localStorage.shoppingCount) + 1;
|
localStorage.shoppingCount = Number(localStorage.shoppingCount) + 1;
|
||||||
} else {
|
} else {
|
||||||
localStorage.shoppingCount = 1;
|
localStorage.shoppingCount = 1;
|
||||||
}
|
}
|
||||||
let target: HTMLElement = (<HTMLElement>_event.target);
|
let target: HTMLElement = (<HTMLElement>_event.target);
|
||||||
let shoppingProduct: Product = jsonObj[parseInt(target.getAttribute("categoryNumber")!)].products[parseInt(target.getAttribute("productIndex")!)];
|
let shoppingProduct: Product = jsonObj[parseInt(target.getAttribute("categoryNumber")!)].products[parseInt(target.getAttribute("productIndex")!)];
|
||||||
localStorage.setItem(`${shoppingProduct.title}`, JSON.stringify(shoppingProduct) );
|
localStorage.setItem(`${shoppingProduct.title}`, JSON.stringify(shoppingProduct) );
|
||||||
}
|
}
|
||||||
|
|
||||||
function addShoppingFunction(): void {
|
function addShoppingFunction(): void {
|
||||||
const buttons: HTMLCollectionOf<Element> = document.getElementsByClassName("addProduct");
|
const buttons: HTMLCollectionOf<Element> = document.getElementsByClassName("addProduct");
|
||||||
for (const button of buttons) {
|
for (const button of buttons) {
|
||||||
button.addEventListener("click", money);
|
button.addEventListener("click", money);
|
||||||
button.addEventListener("click", addLocal);
|
button.addEventListener("click", addLocal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Folgender auskommentierter Code dient mir als Archiv für Gedankenansätze oder Verläufe.
|
// Folgender auskommentierter Code dient mir als Archiv für Gedankenansätze oder Verläufe.
|
||||||
// Wenn dies nicht gerne gesehen ist, gebt mir kurz Bescheid und ich werde es entfernen
|
// Wenn dies nicht gerne gesehen ist, gebt mir kurz Bescheid und ich werde es entfernen
|
||||||
|
|
||||||
/*
|
/*
|
||||||
function zeichnen(tagArray: Tag[]): void {
|
function zeichnen(tagArray: Tag[]): void {
|
||||||
for (let i: number = 0; i < tagArray.length ; i++){
|
for (let i: number = 0; i < tagArray.length ; i++){
|
||||||
let title: HTMLElement = document.createElement(tagArray[i].tag);
|
let title: HTMLElement = document.createElement(tagArray[i].tag);
|
||||||
title.innerHTML = "I bims title";
|
title.innerHTML = "I bims title";
|
||||||
title.classList.add("title");
|
title.classList.add("title");
|
||||||
if (tagArray[i].image) {
|
if (tagArray[i].image) {
|
||||||
title.setAttribute("src", "value");
|
title.setAttribute("src", "value");
|
||||||
title.setAttribute("alt", "value");
|
title.setAttribute("alt", "value");
|
||||||
}
|
}
|
||||||
document.body.appendChild(title);
|
document.body.appendChild(title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
console.log("Hello Console");
|
console.log("Hello Console");
|
||||||
let theName: String = "Justin" + "Dretvic" + 20;
|
let theName: String = "Justin" + "Dretvic" + 20;
|
||||||
console.log(theName);
|
console.log(theName);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
# Template für ein Produkt in HTML
|
# Template für ein Produkt in HTML
|
||||||
<div class="product"> tag class
|
<div class="product"> tag class
|
||||||
<h3 class="title"> Color: Rainbow </h3> tag class content
|
<h3 class="title"> Color: Rainbow </h3> tag class content
|
||||||
<div class=shopIn> tag class
|
<div class=shopIn> tag class
|
||||||
<span class="price"> 3279,99 ¥ </span> tag class content
|
<span class="price"> 3279,99 ¥ </span> tag class content
|
||||||
<button>+</button> tag content
|
<button>+</button> tag content
|
||||||
<button>-</button> tag content
|
<button>-</button> tag content
|
||||||
</div>
|
</div>
|
||||||
<img src="files/grass-rainbow-square.png" alt="Product" /> tag attribute1 attribute2
|
<img src="files/grass-rainbow-square.png" alt="Product" /> tag attribute1 attribute2
|
||||||
<p class="size"> Size: 4m²</p> tag class content
|
<p class="size"> Size: 4m²</p> tag class content
|
||||||
<div class="description"> tag class
|
<div class="description"> tag class
|
||||||
<p> If you can't choose one color, go and catch them all!</p> tag content
|
<p> If you can't choose one color, go and catch them all!</p> tag content
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
let myJSON: string = JSON.stringify(categories);
|
let myJSON: string = JSON.stringify(categories);
|
||||||
JSON.stringify(categories);
|
JSON.stringify(categories);
|
||||||
console.log(myJSON);
|
console.log(myJSON);
|
||||||
*/
|
*/
|
||||||
|
|
@ -1,44 +1,44 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
||||||
<link SameSite="Secure" href="https://fonts.googleapis.com/css2?family=Chelsea+Market&display=swap" rel="stylesheet">
|
<link SameSite="Secure" href="https://fonts.googleapis.com/css2?family=Chelsea+Market&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" media="screen and (max-width: 600px)" href="product-small.css">
|
<link rel="stylesheet" media="screen and (max-width: 600px)" href="product-small.css">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 601px)" href="product-medium.css">
|
<link rel="stylesheet" media="screen and (min-width: 601px)" href="product-medium.css">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="product-big.css">
|
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="product-big.css">
|
||||||
<link rel="stylesheet" href="shop.css">
|
<link rel="stylesheet" href="shop.css">
|
||||||
<script src="shoppingCart.js" defer></script>
|
<script src="shoppingCart.js" defer></script>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>green grass</title>
|
<title>green grass</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<div class="title_bar">
|
<div class="title_bar">
|
||||||
<img src="files/grass_icon_left.png" alt="grass" />
|
<img src="files/grass_icon_left.png" alt="grass" />
|
||||||
<span><a href="shop.html" style="text-decoration: none;color:#b8d5cd">GREEN GRASS</a></span>
|
<span><a href="shop.html" style="text-decoration: none;color:#b8d5cd">GREEN GRASS</a></span>
|
||||||
<img src="files/grass_icon_right.png" alt="grass" />
|
<img src="files/grass_icon_right.png" alt="grass" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div id="übersicht">
|
<div id="übersicht">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<button style="text-align: center" id="removeAllItems">Remove All</button>
|
<button style="text-align: center" id="removeAllItems">Remove All</button>
|
||||||
<div>
|
<div>
|
||||||
<span style="margin-left: 10px;"> Current Price: </span>
|
<span style="margin-left: 10px;"> Current Price: </span>
|
||||||
<span style="margin-left: 10px;" id="showPrice">Hello</span>
|
<span style="margin-left: 10px;" id="showPrice">Hello</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<h1>Disclaimer</h1>
|
<h1>Disclaimer</h1>
|
||||||
<p>This website is not used monetarily </p>
|
<p>This website is not used monetarily </p>
|
||||||
<p>Not even if things seem to be sold here!</p>
|
<p>Not even if things seem to be sold here!</p>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -20,17 +20,17 @@ var Aufgabe07;
|
||||||
let zeug = JSON.parse(localStorage.getItem(localStorage.key(iterator)));
|
let zeug = JSON.parse(localStorage.getItem(localStorage.key(iterator)));
|
||||||
let product = document.createElement("div");
|
let product = document.createElement("div");
|
||||||
product.classList.add("product");
|
product.classList.add("product");
|
||||||
product.innerHTML = `
|
product.innerHTML = `
|
||||||
<h3 class="title"> ${zeug.title} </h3>
|
<h3 class="title"> ${zeug.title} </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> ${zeug.price} ¥</span>
|
<span class="price"> ${zeug.price} ¥</span>
|
||||||
<button class="removeProduct" itemIndex="${iterator}">-</button>
|
<button class="removeProduct" itemIndex="${iterator}">-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/${zeug.imgName}" alt="Product" />
|
<img src="files/${zeug.imgName}" alt="Product" />
|
||||||
<p class="size"> Size: ${zeug.size}</p>
|
<p class="size"> Size: ${zeug.size}</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> ${zeug.description}</p>
|
<p> ${zeug.description}</p>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
container.appendChild(product);
|
container.appendChild(product);
|
||||||
/*let shoppingPrice: HTMLSpanElement = (<HTMLDivElement>document.querySelector("#showPrice"));
|
/*let shoppingPrice: HTMLSpanElement = (<HTMLDivElement>document.querySelector("#showPrice"));
|
||||||
|
|
|
||||||
|
|
@ -1,130 +1,130 @@
|
||||||
|
|
||||||
namespace Aufgabe07 {
|
namespace Aufgabe07 {
|
||||||
|
|
||||||
let shoppingPrice: number = 0;
|
let shoppingPrice: number = 0;
|
||||||
//let shoppingCount: number = 0;
|
//let shoppingCount: number = 0;
|
||||||
|
|
||||||
export interface Product {
|
export interface Product {
|
||||||
title: string;
|
title: string;
|
||||||
price: number;
|
price: number;
|
||||||
size: string;
|
size: string;
|
||||||
imgName: string;
|
imgName: string;
|
||||||
description: string;
|
description: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Category {
|
export interface Category {
|
||||||
title: string;
|
title: string;
|
||||||
id: string;
|
id: string;
|
||||||
products: Product[];
|
products: Product[];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (localStorage.length > 0)
|
if (localStorage.length > 0)
|
||||||
printProducts();
|
printProducts();
|
||||||
//showPrice();
|
//showPrice();
|
||||||
|
|
||||||
//printProducts(100);
|
//printProducts(100);
|
||||||
//console.log(jsonObj[1].products[3].title);
|
//console.log(jsonObj[1].products[3].title);
|
||||||
|
|
||||||
//create Structure;
|
//create Structure;
|
||||||
|
|
||||||
function printProducts(): void {
|
function printProducts(): void {
|
||||||
|
|
||||||
//clearProducts();
|
//clearProducts();
|
||||||
shoppingPrice = 0;
|
shoppingPrice = 0;
|
||||||
|
|
||||||
let container: HTMLDivElement = document.createElement("div");
|
let container: HTMLDivElement = document.createElement("div");
|
||||||
container.classList.add("container");
|
container.classList.add("container");
|
||||||
(<HTMLDivElement>document.querySelector("#übersicht")).appendChild(container);
|
(<HTMLDivElement>document.querySelector("#übersicht")).appendChild(container);
|
||||||
|
|
||||||
for (let iterator: number = 0; iterator < localStorage.length; iterator++) {
|
for (let iterator: number = 0; iterator < localStorage.length; iterator++) {
|
||||||
if (localStorage.key(iterator)! == "shoppingCount")
|
if (localStorage.key(iterator)! == "shoppingCount")
|
||||||
continue;
|
continue;
|
||||||
let zeug: Product = JSON.parse(localStorage.getItem(localStorage.key(iterator)!)!);
|
let zeug: Product = JSON.parse(localStorage.getItem(localStorage.key(iterator)!)!);
|
||||||
let product: HTMLDivElement = document.createElement("div");
|
let product: HTMLDivElement = document.createElement("div");
|
||||||
product.classList.add("product");
|
product.classList.add("product");
|
||||||
product.innerHTML = `
|
product.innerHTML = `
|
||||||
<h3 class="title"> ${zeug.title} </h3>
|
<h3 class="title"> ${zeug.title} </h3>
|
||||||
<div class=shopIn>
|
<div class=shopIn>
|
||||||
<span class="price"> ${zeug.price} ¥</span>
|
<span class="price"> ${zeug.price} ¥</span>
|
||||||
<button class="removeProduct" itemIndex="${iterator}">-</button>
|
<button class="removeProduct" itemIndex="${iterator}">-</button>
|
||||||
</div>
|
</div>
|
||||||
<img src="files/${zeug.imgName}" alt="Product" />
|
<img src="files/${zeug.imgName}" alt="Product" />
|
||||||
<p class="size"> Size: ${zeug.size}</p>
|
<p class="size"> Size: ${zeug.size}</p>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p> ${zeug.description}</p>
|
<p> ${zeug.description}</p>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
container.appendChild(product);
|
container.appendChild(product);
|
||||||
|
|
||||||
/*let shoppingPrice: HTMLSpanElement = (<HTMLDivElement>document.querySelector("#showPrice"));
|
/*let shoppingPrice: HTMLSpanElement = (<HTMLDivElement>document.querySelector("#showPrice"));
|
||||||
myPrice += zeug.price;
|
myPrice += zeug.price;
|
||||||
shoppingPrice.innerHTML = myPrice.toLocaleString() + " ¥";
|
shoppingPrice.innerHTML = myPrice.toLocaleString() + " ¥";
|
||||||
//alles.innerHTML = "";*/
|
//alles.innerHTML = "";*/
|
||||||
fixPrice(zeug.price);
|
fixPrice(zeug.price);
|
||||||
}
|
}
|
||||||
(<HTMLButtonElement>document.querySelector("#removeAllItems")).addEventListener("click", clearLocalStorage);
|
(<HTMLButtonElement>document.querySelector("#removeAllItems")).addEventListener("click", clearLocalStorage);
|
||||||
addRemoveFunction();
|
addRemoveFunction();
|
||||||
} // zeug.price.toFixed(2).toLocaleString()
|
} // zeug.price.toFixed(2).toLocaleString()
|
||||||
//addShoppingFunction();
|
//addShoppingFunction();
|
||||||
|
|
||||||
function clearLocalStorage(): void {
|
function clearLocalStorage(): void {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
(<HTMLDivElement>document.querySelector("#übersicht")).innerHTML = "";
|
(<HTMLDivElement>document.querySelector("#übersicht")).innerHTML = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeItem(_event: Event): void {
|
function removeItem(_event: Event): void {
|
||||||
let target: HTMLElement = (<HTMLElement>_event.target);
|
let target: HTMLElement = (<HTMLElement>_event.target);
|
||||||
//let price: number = parseFloat(target.getAttribute("productPrice")!);
|
//let price: number = parseFloat(target.getAttribute("productPrice")!);
|
||||||
//let price: number = jsonObj[parseInt(target.getAttribute("categoryNumber")!)].products[parseInt(target.getAttribute("productIndex")!)].price;
|
//let price: number = jsonObj[parseInt(target.getAttribute("categoryNumber")!)].products[parseInt(target.getAttribute("productIndex")!)].price;
|
||||||
localStorage.removeItem(`${localStorage.key(parseInt(target.getAttribute("itemIndex")!)!)}`);
|
localStorage.removeItem(`${localStorage.key(parseInt(target.getAttribute("itemIndex")!)!)}`);
|
||||||
(<HTMLDivElement>document.querySelector("#übersicht")).innerHTML = "";
|
(<HTMLDivElement>document.querySelector("#übersicht")).innerHTML = "";
|
||||||
printProducts();
|
printProducts();
|
||||||
}
|
}
|
||||||
|
|
||||||
function addRemoveFunction(): void {
|
function addRemoveFunction(): void {
|
||||||
const buttons: HTMLCollectionOf<Element> = document.getElementsByClassName("removeProduct");
|
const buttons: HTMLCollectionOf<Element> = document.getElementsByClassName("removeProduct");
|
||||||
for (const button of buttons) {
|
for (const button of buttons) {
|
||||||
button.addEventListener("click", removeItem);
|
button.addEventListener("click", removeItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function fixPrice(_price: number): void {
|
function fixPrice(_price: number): void {
|
||||||
shoppingPrice += _price;
|
shoppingPrice += _price;
|
||||||
let shoppingPriceEle: HTMLSpanElement = (<HTMLDivElement>document.querySelector("#showPrice"));
|
let shoppingPriceEle: HTMLSpanElement = (<HTMLDivElement>document.querySelector("#showPrice"));
|
||||||
shoppingPriceEle.innerHTML = shoppingPrice.toLocaleString() + " ¥";
|
shoppingPriceEle.innerHTML = shoppingPrice.toLocaleString() + " ¥";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*function money(_event: Event): void {
|
/*function money(_event: Event): void {
|
||||||
let target: HTMLElement = (<HTMLElement>_event.target);
|
let target: HTMLElement = (<HTMLElement>_event.target);
|
||||||
//let price: number = parseFloat(target.getAttribute("productPrice")!);
|
//let price: number = parseFloat(target.getAttribute("productPrice")!);
|
||||||
let price: number = jsonObj[parseInt(target.getAttribute("categoryNumber")!)].products[parseInt(target.getAttribute("productIndex")!)].price;
|
let price: number = jsonObj[parseInt(target.getAttribute("categoryNumber")!)].products[parseInt(target.getAttribute("productIndex")!)].price;
|
||||||
console.log("Artikel-Preis: " + price + " ¥");
|
console.log("Artikel-Preis: " + price + " ¥");
|
||||||
shoppingPrice += price;
|
shoppingPrice += price;
|
||||||
console.log("Shopping-Cart-Preis: " + shoppingPrice + " ¥");
|
console.log("Shopping-Cart-Preis: " + shoppingPrice + " ¥");
|
||||||
shoppingCount++;
|
shoppingCount++;
|
||||||
(<HTMLLIElement>document.querySelector("#shoppingCartNumber")).innerHTML = shoppingCount.toLocaleString();
|
(<HTMLLIElement>document.querySelector("#shoppingCartNumber")).innerHTML = shoppingCount.toLocaleString();
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeLocal(_event: Event): void {
|
function removeLocal(_event: Event): void {
|
||||||
if (localStorage.shoppingCount) {
|
if (localStorage.shoppingCount) {
|
||||||
localStorage.shoppingCount = Number(localStorage.shoppingCount) + 1;
|
localStorage.shoppingCount = Number(localStorage.shoppingCount) + 1;
|
||||||
} else {
|
} else {
|
||||||
localStorage.shoppingCount = 1;
|
localStorage.shoppingCount = 1;
|
||||||
}
|
}
|
||||||
let target: HTMLElement = (<HTMLElement>_event.target);
|
let target: HTMLElement = (<HTMLElement>_event.target);
|
||||||
let shoppingProduct: Product = jsonObj[parseInt(target.getAttribute("categoryNumber")!)].products[parseInt(target.getAttribute("productIndex")!)];
|
let shoppingProduct: Product = jsonObj[parseInt(target.getAttribute("categoryNumber")!)].products[parseInt(target.getAttribute("productIndex")!)];
|
||||||
localStorage.setItem(`${shoppingProduct.title}`, JSON.stringify(shoppingProduct));
|
localStorage.setItem(`${shoppingProduct.title}`, JSON.stringify(shoppingProduct));
|
||||||
}
|
}
|
||||||
|
|
||||||
function addShoppingFunction(): void {
|
function addShoppingFunction(): void {
|
||||||
const buttons: HTMLCollectionOf<Element> = document.getElementsByClassName("addProduct");
|
const buttons: HTMLCollectionOf<Element> = document.getElementsByClassName("addProduct");
|
||||||
for (const button of buttons) {
|
for (const button of buttons) {
|
||||||
button.addEventListener("click", money);
|
button.addEventListener("click", money);
|
||||||
button.addEventListener("click", removeLocal);
|
button.addEventListener("click", removeLocal);
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
@ -1,31 +1,31 @@
|
||||||
import * as Http from "http";
|
import * as Http from "http";
|
||||||
|
|
||||||
export namespace A008Server {
|
export namespace A008Server {
|
||||||
console.log("Starting server"); // Ausgabe in der Server-Console
|
console.log("Starting server"); // Ausgabe in der Server-Console
|
||||||
let port: number = Number(process.env.PORT); // Deklaration der number "port" mit einem Port aus der Umgebungsvariable,
|
let port: number = Number(process.env.PORT); // Deklaration der number "port" mit einem Port aus der Umgebungsvariable,
|
||||||
// der als numerisches Objekt abgespeichert werden soll
|
// der als numerisches Objekt abgespeichert werden soll
|
||||||
if (!port) // "Wenn kein Port vergeben wurde...
|
if (!port) // "Wenn kein Port vergeben wurde...
|
||||||
port = 8100; // ...verwende den Port 8100"
|
port = 8100; // ...verwende den Port 8100"
|
||||||
|
|
||||||
let server: Http.Server = Http.createServer(); // Der Server wird aufgesetzt
|
let server: Http.Server = Http.createServer(); // Der Server wird aufgesetzt
|
||||||
server.addListener("request", handleRequest); // Listener für wenn Serveranfragen reinkommen
|
server.addListener("request", handleRequest); // Listener für wenn Serveranfragen reinkommen
|
||||||
server.addListener("listening", handleListen); // Listener für wenn der Server startet
|
server.addListener("listening", handleListen); // Listener für wenn der Server startet
|
||||||
server.listen(port); // Achtet auf Anfragen, die durch den Port durchkommen
|
server.listen(port); // Achtet auf Anfragen, die durch den Port durchkommen
|
||||||
|
|
||||||
function handleListen(): void { // wird ausgeführt, wenn der Server gestartet wird und eine Abfrage erwartet
|
function handleListen(): void { // wird ausgeführt, wenn der Server gestartet wird und eine Abfrage erwartet
|
||||||
console.log("Listening"); // Ausgabe in der Server-Console
|
console.log("Listening"); // Ausgabe in der Server-Console
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleRequest(_request: Http.IncomingMessage, _response: Http.ServerResponse): void { // wird ausgeführt, wenn eine Serveranfrage eintrifft
|
function handleRequest(_request: Http.IncomingMessage, _response: Http.ServerResponse): void { // wird ausgeführt, wenn eine Serveranfrage eintrifft
|
||||||
console.log("https://theoneandgis.herokuapp.com" + `${_request.url}`); // Ausgabe in der Server-Console
|
console.log("https://theoneandgis.herokuapp.com" + `${_request.url}`); // Ausgabe in der Server-Console
|
||||||
// console.log("-------------");
|
// console.log("-------------");
|
||||||
// console.log("I hear voices!");
|
// console.log("I hear voices!");
|
||||||
|
|
||||||
_response.setHeader("content-type", "text/html; charset=utf-8"); // Der Datentyp der Antwort wird festgelegt
|
_response.setHeader("content-type", "text/html; charset=utf-8"); // Der Datentyp der Antwort wird festgelegt
|
||||||
_response.setHeader("Access-Control-Allow-Origin", "*"); // erlaubt beliebigen Anfragen aus dem Netz, die Antwort zu lesen
|
_response.setHeader("Access-Control-Allow-Origin", "*"); // erlaubt beliebigen Anfragen aus dem Netz, die Antwort zu lesen
|
||||||
|
|
||||||
_response.write(_request.url); // Die Antwort wird mit einem string (in diesem Fall die URL) beschrieben
|
_response.write(_request.url); // Die Antwort wird mit einem string (in diesem Fall die URL) beschrieben
|
||||||
|
|
||||||
_response.end(); // deaktiviert den Server bis zur nächsten Anfrage
|
_response.end(); // deaktiviert den Server bis zur nächsten Anfrage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,28 +1,28 @@
|
||||||
import * as Http from "http";
|
import * as Http from "http";
|
||||||
|
|
||||||
export namespace A08Server {
|
export namespace A08Server {
|
||||||
console.log("Starting server");
|
console.log("Starting server");
|
||||||
let port: number = Number(process.env.PORT);
|
let port: number = Number(process.env.PORT);
|
||||||
if (!port)
|
if (!port)
|
||||||
port = 8100;
|
port = 8100;
|
||||||
|
|
||||||
let server: Http.Server = Http.createServer();
|
let server: Http.Server = Http.createServer();
|
||||||
server.addListener("request", handleRequest);
|
server.addListener("request", handleRequest);
|
||||||
server.addListener("listening", handleListen);
|
server.addListener("listening", handleListen);
|
||||||
server.listen(port);
|
server.listen(port);
|
||||||
|
|
||||||
function handleListen(): void {
|
function handleListen(): void {
|
||||||
console.log("Listening");
|
console.log("Listening");
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleRequest(_request: Http.IncomingMessage, _response: Http.ServerResponse): void {
|
function handleRequest(_request: Http.IncomingMessage, _response: Http.ServerResponse): void {
|
||||||
console.log("I hear voices!");
|
console.log("I hear voices!");
|
||||||
|
|
||||||
_response.setHeader("content-type", "text/html; charset=utf-8");
|
_response.setHeader("content-type", "text/html; charset=utf-8");
|
||||||
_response.setHeader("Access-Control-Allow-Origin", "*");
|
_response.setHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
|
||||||
_response.write(_request.url);
|
_response.write(_request.url);
|
||||||
|
|
||||||
_response.end();
|
_response.end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,49 +1,49 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<script src="tutorial.js" defer></script>
|
<script src="tutorial.js" defer></script>
|
||||||
<title>Tutorial Kapitel 08</title>
|
<title>Tutorial Kapitel 08</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<form method="" action="https://theoneandgis.herokuapp.com/">
|
<form method="" action="https://theoneandgis.herokuapp.com/">
|
||||||
<label for="vorname">Vorname:</label> <br>
|
<label for="vorname">Vorname:</label> <br>
|
||||||
<input type="text" id="vorname" name="vorname" value="Ben"> <br>
|
<input type="text" id="vorname" name="vorname" value="Ben"> <br>
|
||||||
<label for="nachname">Nachname:</label> <br>
|
<label for="nachname">Nachname:</label> <br>
|
||||||
<input type="text" id="nachname" name="nachname" value="Uchiha"> <br>
|
<input type="text" id="nachname" name="nachname" value="Uchiha"> <br>
|
||||||
<input type="submit" value="Submit Input">
|
<input type="submit" value="Submit Input">
|
||||||
<button type="submit">Submit Button</button>
|
<button type="submit">Submit Button</button>
|
||||||
<button type="button" id="theButton">Button Button</button>
|
<button type="button" id="theButton">Button Button</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<!-- <form method="get" action="">
|
<!-- <form method="get" action="">
|
||||||
<button type="submit">Get</button>
|
<button type="submit">Get</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form method="get" action="https://gis-example.herokuapp.com/">
|
<form method="get" action="https://gis-example.herokuapp.com/">
|
||||||
<button type="submit">Get mit URL in Action</button>
|
<button type="submit">Get mit URL in Action</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<button type="submit">Post</button>
|
<button type="submit">Post</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form method="post" action="https://gis-example.herokuapp.com/">
|
<form method="post" action="https://gis-example.herokuapp.com/">
|
||||||
<button type="submit">Post mit URL in Action</button>
|
<button type="submit">Post mit URL in Action</button>
|
||||||
</form> -->
|
</form> -->
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
button,label,input {
|
button,label,input {
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,41 +1,41 @@
|
||||||
|
|
||||||
namespace tutorial08 {
|
namespace tutorial08 {
|
||||||
|
|
||||||
/*console.log(formData.get("vorname"));
|
/*console.log(formData.get("vorname"));
|
||||||
|
|
||||||
for (let entry of formData) {
|
for (let entry of formData) {
|
||||||
console.log(entry);
|
console.log(entry);
|
||||||
console.log("name: " + entry[0]);
|
console.log("name: " + entry[0]);
|
||||||
console.log("value: " + entry[1]);
|
console.log("value: " + entry[1]);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
// Trennlinie
|
// Trennlinie
|
||||||
|
|
||||||
(<HTMLButtonElement>document.querySelector("#theButton")).addEventListener("click", communicate);
|
(<HTMLButtonElement>document.querySelector("#theButton")).addEventListener("click", communicate);
|
||||||
|
|
||||||
//communicate("https://theoneandgis.herokuapp.com/");
|
//communicate("https://theoneandgis.herokuapp.com/");
|
||||||
|
|
||||||
async function communicate(): Promise<void> {
|
async function communicate(): Promise<void> {
|
||||||
|
|
||||||
// let response: Response = await fetch(_url);
|
// let response: Response = await fetch(_url);
|
||||||
// let jsonObj = await response.json();
|
// let jsonObj = await response.json();
|
||||||
|
|
||||||
let formData: FormData = new FormData(document.forms[0]);
|
let formData: FormData = new FormData(document.forms[0]);
|
||||||
let url: string = "https://theoneandgis.herokuapp.com/";
|
let url: string = "https://theoneandgis.herokuapp.com/";
|
||||||
let query: URLSearchParams = new URLSearchParams(<any>formData);
|
let query: URLSearchParams = new URLSearchParams(<any>formData);
|
||||||
|
|
||||||
url += "?" + query.toString();
|
url += "?" + query.toString();
|
||||||
|
|
||||||
let response: Response = await fetch(url);
|
let response: Response = await fetch(url);
|
||||||
let theAnswer: string = await response.url;
|
let theAnswer: string = await response.url;
|
||||||
|
|
||||||
|
|
||||||
// await fetch(url);
|
// await fetch(url);
|
||||||
console.log(theAnswer);
|
console.log(theAnswer);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("hello");
|
console.log("hello");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,119 +1,119 @@
|
||||||
|
|
||||||
namespace clientSide {
|
namespace clientSide {
|
||||||
|
|
||||||
(<HTMLButtonElement>document.querySelector("#getJson")).addEventListener("click", communicateJson);
|
(<HTMLButtonElement>document.querySelector("#getJson")).addEventListener("click", communicateJson);
|
||||||
(<HTMLButtonElement>document.querySelector("#getHtml")).addEventListener("click", communicateHtml);
|
(<HTMLButtonElement>document.querySelector("#getHtml")).addEventListener("click", communicateHtml);
|
||||||
|
|
||||||
//communicate("https://theoneandgis.herokuapp.com/");
|
//communicate("https://theoneandgis.herokuapp.com/");
|
||||||
|
|
||||||
async function communicate(_path: string): Promise<void> {
|
async function communicate(_path: string): Promise<void> {
|
||||||
|
|
||||||
let formData: FormData = new FormData(document.forms[0]);
|
let formData: FormData = new FormData(document.forms[0]);
|
||||||
let url: string = "https://theoneandgis.herokuapp.com" + _path;
|
let url: string = "https://theoneandgis.herokuapp.com" + _path;
|
||||||
//let url: string = "http://localhost:8100" + _path;
|
//let url: string = "http://localhost:8100" + _path;
|
||||||
let query: URLSearchParams = new URLSearchParams(<any>formData);
|
let query: URLSearchParams = new URLSearchParams(<any>formData);
|
||||||
|
|
||||||
url += "?" + query.toString();
|
url += "?" + query.toString();
|
||||||
|
|
||||||
let response: Response = await fetch(url);
|
let response: Response = await fetch(url);
|
||||||
let responseUrl: string;
|
let responseUrl: string;
|
||||||
|
|
||||||
if (_path == "/json") {
|
if (_path == "/json") {
|
||||||
responseUrl = await response.json();
|
responseUrl = await response.json();
|
||||||
console.log(responseUrl);
|
console.log(responseUrl);
|
||||||
(<HTMLDivElement>document.getElementById("htmlResponse")).innerHTML = JSON.stringify(responseUrl);
|
(<HTMLDivElement>document.getElementById("htmlResponse")).innerHTML = JSON.stringify(responseUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_path == "/html") {
|
if (_path == "/html") {
|
||||||
let responseUrl: string = await response.text();
|
let responseUrl: string = await response.text();
|
||||||
console.log("html-log: " + responseUrl);
|
console.log("html-log: " + responseUrl);
|
||||||
(<HTMLDivElement>document.getElementById("htmlResponse")).innerHTML = responseUrl;
|
(<HTMLDivElement>document.getElementById("htmlResponse")).innerHTML = responseUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function communicateJson(): void {
|
function communicateJson(): void {
|
||||||
communicate("/json");
|
communicate("/json");
|
||||||
}
|
}
|
||||||
function communicateHtml(): void {
|
function communicateHtml(): void {
|
||||||
communicate("/html");
|
communicate("/html");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*namespace tutorial09 {
|
/*namespace tutorial09 {
|
||||||
|
|
||||||
/*console.log(formData.get("vorname"));
|
/*console.log(formData.get("vorname"));
|
||||||
|
|
||||||
for (let entry of formData) {
|
for (let entry of formData) {
|
||||||
console.log(entry);
|
console.log(entry);
|
||||||
console.log("name: " + entry[0]);
|
console.log("name: " + entry[0]);
|
||||||
console.log("value: " + entry[1]);
|
console.log("value: " + entry[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trennlinie
|
// Trennlinie
|
||||||
|
|
||||||
(<HTMLButtonElement>document.querySelector("#getHtml")).addEventListener("click", startCommunication);
|
(<HTMLButtonElement>document.querySelector("#getHtml")).addEventListener("click", startCommunication);
|
||||||
|
|
||||||
function startCommunication(): void {
|
function startCommunication(): void {
|
||||||
communicate("http://localhost:8100");
|
communicate("http://localhost:8100");
|
||||||
}
|
}
|
||||||
|
|
||||||
async function communicate(_url: RequestInfo): Promise<void> {
|
async function communicate(_url: RequestInfo): Promise<void> {
|
||||||
|
|
||||||
// let response: Response = await fetch(_url);
|
// let response: Response = await fetch(_url);
|
||||||
// let jsonObj = await response.json();
|
// let jsonObj = await response.json();
|
||||||
|
|
||||||
let formData: FormData = new FormData(document.forms[0]);
|
let formData: FormData = new FormData(document.forms[0]);
|
||||||
let formquery: URLSearchParams = new URLSearchParams(<any>formData);
|
let formquery: URLSearchParams = new URLSearchParams(<any>formData);
|
||||||
_url += "?" + formquery.toString();
|
_url += "?" + formquery.toString();
|
||||||
console.log("_url: " + _url);
|
console.log("_url: " + _url);
|
||||||
//let url: string = "https://theoneandgis.herokuapp.com/";
|
//let url: string = "https://theoneandgis.herokuapp.com/";
|
||||||
//let query: URLSearchParams = new URLSearchParams(<any>formData);
|
//let query: URLSearchParams = new URLSearchParams(<any>formData);
|
||||||
|
|
||||||
//url += "?" + query.toString();
|
//url += "?" + query.toString();
|
||||||
|
|
||||||
//debugger;
|
//debugger;
|
||||||
|
|
||||||
//let response: Response = await fetch(_url);
|
//let response: Response = await fetch(_url);
|
||||||
let response: Response = await fetch("Data.json");
|
let response: Response = await fetch("Data.json");
|
||||||
console.log("response: " + response);
|
console.log("response: " + response);
|
||||||
console.log(response);
|
console.log(response);
|
||||||
let theAnswer: string = await response.text;
|
let theAnswer: string = await response.text;
|
||||||
//let text: string = theAnswer
|
//let text: string = theAnswer
|
||||||
|
|
||||||
|
|
||||||
console.log("theAnswer: " + theAnswer);
|
console.log("theAnswer: " + theAnswer);
|
||||||
//let query: URLSearchParams = new URLSearchParams(theAnswer);
|
//let query: URLSearchParams = new URLSearchParams(theAnswer);
|
||||||
//console.log(query.toString());
|
//console.log(query.toString());
|
||||||
//console.log( new URLSearchParams(theAnswer).values() );
|
//console.log( new URLSearchParams(theAnswer).values() );
|
||||||
//console.log(query.keys() );
|
//console.log(query.keys() );
|
||||||
//let queryvorname: string = query.get("/?vorname")!;
|
//let queryvorname: string = query.get("/?vorname")!;
|
||||||
//let querynachname: string = query.get("nachname")!;
|
//let querynachname: string = query.get("nachname")!;
|
||||||
|
|
||||||
//console.log(queryvorname);
|
//console.log(queryvorname);
|
||||||
//console.log(querynachname);
|
//console.log(querynachname);
|
||||||
|
|
||||||
(<HTMLDivElement>document.querySelector("#htmlResponse")).innerHTML = `${theAnswer}`;
|
(<HTMLDivElement>document.querySelector("#htmlResponse")).innerHTML = `${theAnswer}`;
|
||||||
|
|
||||||
|
|
||||||
// await fetch(url);
|
// await fetch(url);
|
||||||
console.log(theAnswer);
|
console.log(theAnswer);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("hello");
|
console.log("hello");
|
||||||
|
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,32 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<script src="client.js" defer></script>
|
<script src="client.js" defer></script>
|
||||||
<title>Formulare Kapitel 09</title>
|
<title>Formulare Kapitel 09</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<form method="" action="https://theoneandgis.herokuapp.com">
|
<form method="" action="https://theoneandgis.herokuapp.com">
|
||||||
<label for="vorname">Name</label> <br>
|
<label for="vorname">Name</label> <br>
|
||||||
<input type="text" id="vorname" name="vorname" value="Ben"> <br>
|
<input type="text" id="vorname" name="vorname" value="Ben"> <br>
|
||||||
<label for="nachname">Geburtsjahr</label> <br>
|
<label for="nachname">Geburtsjahr</label> <br>
|
||||||
<input type="text" id="nachname" name="nachname" value="Uchiha"> <br>
|
<input type="text" id="nachname" name="nachname" value="Uchiha"> <br>
|
||||||
<button type="submit">Submit</button>
|
<button type="submit">Submit</button>
|
||||||
<button type="button" id="getHtml">HTML Button</button>
|
<button type="button" id="getHtml">HTML Button</button>
|
||||||
<button type="button" id="getJson">JSON Button</button>
|
<button type="button" id="getJson">JSON Button</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div id="htmlResponse"></div>
|
<div id="htmlResponse"></div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
button,label,input,div {
|
button,label,input,div {
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,46 +1,46 @@
|
||||||
import * as Http from "http";
|
import * as Http from "http";
|
||||||
import * as url from "url";
|
import * as url from "url";
|
||||||
import { ParsedUrlQuery } from "querystring";
|
import { ParsedUrlQuery } from "querystring";
|
||||||
|
|
||||||
export namespace ServerSide {
|
export namespace ServerSide {
|
||||||
console.log("Starting server");
|
console.log("Starting server");
|
||||||
let port: number = Number(process.env.PORT);
|
let port: number = Number(process.env.PORT);
|
||||||
// der als numerisches Objekt abgespeichert werden soll
|
// der als numerisches Objekt abgespeichert werden soll
|
||||||
if (!port)
|
if (!port)
|
||||||
port = 8100;
|
port = 8100;
|
||||||
|
|
||||||
let server: Http.Server = Http.createServer();
|
let server: Http.Server = Http.createServer();
|
||||||
server.addListener("request", handleRequest);
|
server.addListener("request", handleRequest);
|
||||||
server.addListener("listening", handleListen);
|
server.addListener("listening", handleListen);
|
||||||
server.listen(port);
|
server.listen(port);
|
||||||
|
|
||||||
function handleListen(): void {
|
function handleListen(): void {
|
||||||
console.log("Listening");
|
console.log("Listening");
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleRequest(_request: Http.IncomingMessage, _response: Http.ServerResponse): void {
|
function handleRequest(_request: Http.IncomingMessage, _response: Http.ServerResponse): void {
|
||||||
console.log("https://theoneandgis.herokuapp.com" + `${_request.url}`);
|
console.log("https://theoneandgis.herokuapp.com" + `${_request.url}`);
|
||||||
|
|
||||||
let myData: url.UrlWithParsedQuery = url.parse(`${_request.url}`, true);
|
let myData: url.UrlWithParsedQuery = url.parse(`${_request.url}`, true);
|
||||||
let myQuery: ParsedUrlQuery = myData.query;
|
let myQuery: ParsedUrlQuery = myData.query;
|
||||||
let splitThis: string = (<string>_request.url).slice(0 , 5);
|
let splitThis: string = (<string>_request.url).slice(0 , 5);
|
||||||
let myJsonString: string = JSON.stringify(myQuery);
|
let myJsonString: string = JSON.stringify(myQuery);
|
||||||
|
|
||||||
// Damit ich im Hinterkopf behalte, dass das so funktioniert
|
// Damit ich im Hinterkopf behalte, dass das so funktioniert
|
||||||
// console.log("myQuery.vorname: " + myQuery.vorname );
|
// console.log("myQuery.vorname: " + myQuery.vorname );
|
||||||
// console.log("myQuery.nachname: " + myQuery.nachname);
|
// console.log("myQuery.nachname: " + myQuery.nachname);
|
||||||
|
|
||||||
if (splitThis == "/html") {
|
if (splitThis == "/html") {
|
||||||
_response.setHeader("content-type", "application/json");
|
_response.setHeader("content-type", "application/json");
|
||||||
_response.setHeader("Access-Control-Allow-Origin", "*");
|
_response.setHeader("Access-Control-Allow-Origin", "*");
|
||||||
}
|
}
|
||||||
else if (splitThis == "/json") {
|
else if (splitThis == "/json") {
|
||||||
_response.setHeader("content-type", "text/html");
|
_response.setHeader("content-type", "text/html");
|
||||||
_response.setHeader("Access-Control-Allow-Origin", "*");
|
_response.setHeader("Access-Control-Allow-Origin", "*");
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(myJsonString);
|
console.log(myJsonString);
|
||||||
_response.write(myJsonString);
|
_response.write(myJsonString);
|
||||||
_response.end();
|
_response.end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,85 +1,85 @@
|
||||||
//mongodb + srv://AdminForUse:XV8MXEdBYuwXtQnc@ichstudieremitgis-jfrz9.mongodb.net/IchStudiereMitGiS?retryWrites=true&w=majority
|
//mongodb + srv://AdminForUse:XV8MXEdBYuwXtQnc@ichstudieremitgis-jfrz9.mongodb.net/IchStudiereMitGiS?retryWrites=true&w=majority
|
||||||
//http://localhost:8100
|
//http://localhost:8100
|
||||||
//https://theoneandgis.herokuapp.com
|
//https://theoneandgis.herokuapp.com
|
||||||
|
|
||||||
namespace clientSide {
|
namespace clientSide {
|
||||||
|
|
||||||
interface Personalien {
|
interface Personalien {
|
||||||
[type: string]: string | string[] | number | undefined;
|
[type: string]: string | string[] | number | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
(<HTMLButtonElement>document.querySelector("#abschicken")).addEventListener("click", sendData);
|
(<HTMLButtonElement>document.querySelector("#abschicken")).addEventListener("click", sendData);
|
||||||
function sendData(): void {
|
function sendData(): void {
|
||||||
communicate("http://localhost:8100", "mongo", "send", "");
|
communicate("http://localhost:8100", "mongo", "send", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
(<HTMLButtonElement>document.querySelector("#abfragen")).addEventListener("click", retrieveData);
|
(<HTMLButtonElement>document.querySelector("#abfragen")).addEventListener("click", retrieveData);
|
||||||
function retrieveData(): void {
|
function retrieveData(): void {
|
||||||
communicate("http://localhost:8100", "mongo", "retrieve", "");
|
communicate("http://localhost:8100", "mongo", "retrieve", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeData(_event: Event): void {
|
function removeData(_event: Event): void {
|
||||||
let target: HTMLElement = (<HTMLElement>_event.target);
|
let target: HTMLElement = (<HTMLElement>_event.target);
|
||||||
/*console.log(target.getAttribute("thisEntry")! );
|
/*console.log(target.getAttribute("thisEntry")! );
|
||||||
let entry: string = target.getAttribute("thisEntry")!;
|
let entry: string = target.getAttribute("thisEntry")!;
|
||||||
console.log("entry: ", entry);*/
|
console.log("entry: ", entry);*/
|
||||||
let id: string = target.getAttribute("thisEntry")!;
|
let id: string = target.getAttribute("thisEntry")!;
|
||||||
communicate("https://theoneandgis.herokuapp.com", "mongo", "remove", id);
|
communicate("https://theoneandgis.herokuapp.com", "mongo", "remove", id);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Personalien {
|
interface Personalien {
|
||||||
vorname: string;
|
vorname: string;
|
||||||
nachname: string;
|
nachname: string;
|
||||||
geburtsjahr: number;
|
geburtsjahr: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function communicate(_baseUrl: string, _aim: string , _task: string, _id: string): Promise<void> {
|
async function communicate(_baseUrl: string, _aim: string , _task: string, _id: string): Promise<void> {
|
||||||
let formData: FormData = new FormData(document.forms[0]);
|
let formData: FormData = new FormData(document.forms[0]);
|
||||||
let url: string = "";
|
let url: string = "";
|
||||||
if (_id == "") {
|
if (_id == "") {
|
||||||
//tslint:disable-next-line: no-any
|
//tslint:disable-next-line: no-any
|
||||||
let query: URLSearchParams = new URLSearchParams(<any>formData);
|
let query: URLSearchParams = new URLSearchParams(<any>formData);
|
||||||
url = _baseUrl + "/" + _aim + "/" + _task + "?" + query.toString();
|
url = _baseUrl + "/" + _aim + "/" + _task + "?" + query.toString();
|
||||||
} else {
|
} else {
|
||||||
url = _baseUrl + "/" + _aim + "/" + _task + "?" + "_id=" + `${_id}`;
|
url = _baseUrl + "/" + _aim + "/" + _task + "?" + "_id=" + `${_id}`;
|
||||||
}
|
}
|
||||||
let response: Response = await fetch(url);
|
let response: Response = await fetch(url);
|
||||||
let jsonResponse: Personalien[] = await response.json();
|
let jsonResponse: Personalien[] = await response.json();
|
||||||
|
|
||||||
if (_task == "send") {
|
if (_task == "send") {
|
||||||
let jsonString: string = JSON.stringify(jsonResponse);
|
let jsonString: string = JSON.stringify(jsonResponse);
|
||||||
(<HTMLDivElement>document.querySelector("#divResponse")).innerHTML = jsonString;
|
(<HTMLDivElement>document.querySelector("#divResponse")).innerHTML = jsonString;
|
||||||
//console.log(jsonResponse[0].vorname + " " + jsonResponse[0].nachname + " " + jsonResponse[0].geburtsjahr);
|
//console.log(jsonResponse[0].vorname + " " + jsonResponse[0].nachname + " " + jsonResponse[0].geburtsjahr);
|
||||||
}
|
}
|
||||||
if (_task == "retrieve") {
|
if (_task == "retrieve") {
|
||||||
let jsonString: string = formatCollection(jsonResponse);
|
let jsonString: string = formatCollection(jsonResponse);
|
||||||
(<HTMLDivElement>document.querySelector("#divDatabase")).innerHTML = jsonString;
|
(<HTMLDivElement>document.querySelector("#divDatabase")).innerHTML = jsonString;
|
||||||
addRemoveFunction();
|
addRemoveFunction();
|
||||||
}
|
}
|
||||||
|
|
||||||
(<HTMLFormElement>document.getElementById("myForm")).reset();
|
(<HTMLFormElement>document.getElementById("myForm")).reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatCollection(_jsonResponse: Personalien[]): string {
|
function formatCollection(_jsonResponse: Personalien[]): string {
|
||||||
let jsonString: string = "";
|
let jsonString: string = "";
|
||||||
for (let index: number = 0; index <= _jsonResponse.length; index++) {
|
for (let index: number = 0; index <= _jsonResponse.length; index++) {
|
||||||
if (_jsonResponse[index]) {
|
if (_jsonResponse[index]) {
|
||||||
jsonString += `<button class="removeButton" thisEntry=${(JSON.stringify(_jsonResponse[index]._id))}> Delete Entry </button><br>`;
|
jsonString += `<button class="removeButton" thisEntry=${(JSON.stringify(_jsonResponse[index]._id))}> Delete Entry </button><br>`;
|
||||||
let current: Personalien = <Personalien>_jsonResponse[index];
|
let current: Personalien = <Personalien>_jsonResponse[index];
|
||||||
for (let key in current) {
|
for (let key in current) {
|
||||||
jsonString += key + ": " + JSON.stringify(current[key]) + "<br>";
|
jsonString += key + ": " + JSON.stringify(current[key]) + "<br>";
|
||||||
}
|
}
|
||||||
jsonString += "<br>";
|
jsonString += "<br>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return jsonString;
|
return jsonString;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addRemoveFunction(): void {
|
function addRemoveFunction(): void {
|
||||||
let removeButtons: NodeListOf<HTMLButtonElement> = document.querySelectorAll(".removeButton");
|
let removeButtons: NodeListOf<HTMLButtonElement> = document.querySelectorAll(".removeButton");
|
||||||
for (const iterator of removeButtons)
|
for (const iterator of removeButtons)
|
||||||
iterator.addEventListener("click", removeData);
|
iterator.addEventListener("click", removeData);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,64 +1,64 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<script src="client.js" defer></script>
|
<script src="client.js" defer></script>
|
||||||
<title>Kapitel 11</title>
|
<title>Kapitel 11</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<button class="container">Becher</button>
|
<button class="container">Becher</button>
|
||||||
<button id="blueberry">Blau</button>
|
<button id="blueberry">Blau</button>
|
||||||
<button id="raspberry">Rot</button>
|
<button id="raspberry">Rot</button>
|
||||||
<button id="streusel">bunte Streusel</button>
|
<button id="streusel">bunte Streusel</button>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<form id="myForm" method="" action="">
|
<form id="myForm" method="" action="">
|
||||||
<!--https://theoneandgis.herokuapp.com-->
|
<!--https://theoneandgis.herokuapp.com-->
|
||||||
|
|
||||||
<label for="vorname" method="get">Vorname
|
<label for="vorname" method="get">Vorname
|
||||||
</label><br>
|
</label><br>
|
||||||
<input type="text" id="vorname" name="vorname" value="Vorname" onfocus="this.value=''"><br>
|
<input type="text" id="vorname" name="vorname" value="Vorname" onfocus="this.value=''"><br>
|
||||||
|
|
||||||
<label for="nachname">
|
<label for="nachname">
|
||||||
Nachname
|
Nachname
|
||||||
</label><br>
|
</label><br>
|
||||||
<input type="text" id="nachname" name="nachname" value="Nachname" onfocus="this.value=''"><br>
|
<input type="text" id="nachname" name="nachname" value="Nachname" onfocus="this.value=''"><br>
|
||||||
|
|
||||||
<label for="geburtsjahr">
|
<label for="geburtsjahr">
|
||||||
Geburtsjahr
|
Geburtsjahr
|
||||||
</label><br>
|
</label><br>
|
||||||
<input type="text" id="geburtsjahr" name="geburtsjahr" value="2000"><br>
|
<input type="text" id="geburtsjahr" name="geburtsjahr" value="2000"><br>
|
||||||
|
|
||||||
<button type="button" id="abschicken"> Eintrag </button>
|
<button type="button" id="abschicken"> Eintrag </button>
|
||||||
<button type="button" id="abfragen"> Abfrage </button>
|
<button type="button" id="abfragen"> Abfrage </button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<div id="divResponse"></div>
|
<div id="divResponse"></div>
|
||||||
<hr>
|
<hr>
|
||||||
<div id="divDatabase"></div>
|
<div id="divDatabase"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
button,
|
button,
|
||||||
label,
|
label,
|
||||||
input,
|
input,
|
||||||
div {
|
div {
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
body{
|
body{
|
||||||
background-color: black;
|
background-color: black;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,65 +1,65 @@
|
||||||
import * as Mongo from "mongodb";
|
import * as Mongo from "mongodb";
|
||||||
|
|
||||||
export namespace handleMongo {
|
export namespace handleMongo {
|
||||||
|
|
||||||
export interface Personalien {
|
export interface Personalien {
|
||||||
[type: string]: string | string[] | number | undefined;
|
[type: string]: string | string[] | number | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
let content: Mongo.Collection;
|
let content: Mongo.Collection;
|
||||||
let dbUrl: string = "";
|
let dbUrl: string = "";
|
||||||
|
|
||||||
function chooseUrl(_whichDB: string): void {
|
function chooseUrl(_whichDB: string): void {
|
||||||
if (_whichDB == "local")
|
if (_whichDB == "local")
|
||||||
dbUrl = "mongodb://127.0.0.1:27017/";
|
dbUrl = "mongodb://127.0.0.1:27017/";
|
||||||
if (_whichDB == "remote")
|
if (_whichDB == "remote")
|
||||||
dbUrl = "mongodb+srv://AdminForUse:XV8MXEdBYuwXtQnc@ichstudieremitgis-jfrz9.mongodb.net/IchStudiereMitGiS?retryWrites=true&w=majority";
|
dbUrl = "mongodb+srv://AdminForUse:XV8MXEdBYuwXtQnc@ichstudieremitgis-jfrz9.mongodb.net/IchStudiereMitGiS?retryWrites=true&w=majority";
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function connectDB(_whichDB: string): Promise<void> { // _url: string
|
export async function connectDB(_whichDB: string): Promise<void> { // _url: string
|
||||||
chooseUrl(_whichDB);
|
chooseUrl(_whichDB);
|
||||||
let options: Mongo.MongoClientOptions = { useNewUrlParser: true, useUnifiedTopology: true };
|
let options: Mongo.MongoClientOptions = { useNewUrlParser: true, useUnifiedTopology: true };
|
||||||
let mongoClient: Mongo.MongoClient = new Mongo.MongoClient(dbUrl, options);
|
let mongoClient: Mongo.MongoClient = new Mongo.MongoClient(dbUrl, options);
|
||||||
await mongoClient.connect();
|
await mongoClient.connect();
|
||||||
//content = mongoClient.db("db").collection("Students");
|
//content = mongoClient.db("db").collection("Students");
|
||||||
content = mongoClient.db("MeineHochschule").collection("Students");
|
content = mongoClient.db("MeineHochschule").collection("Students");
|
||||||
console.log("Database connection: ", content != undefined);
|
console.log("Database connection: ", content != undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function insertData(_order: Personalien): void {
|
export function insertData(_order: Personalien): void {
|
||||||
content.insertOne(_order);
|
content.insertOne(_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function removeData(_entry: Personalien): Promise<void> {
|
export async function removeData(_entry: Personalien): Promise<void> {
|
||||||
//console.log("_entry: ", _entry);
|
//console.log("_entry: ", _entry);
|
||||||
//console.log(_entry._id);
|
//console.log(_entry._id);
|
||||||
let id: string = <string>_entry._id;
|
let id: string = <string>_entry._id;
|
||||||
let objID: Mongo.ObjectID = new Mongo.ObjectID(id);
|
let objID: Mongo.ObjectID = new Mongo.ObjectID(id);
|
||||||
await content.deleteOne({"_id": objID});
|
await content.deleteOne({"_id": objID});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function findCollection(): Promise<Personalien[]> {
|
export async function findCollection(): Promise<Personalien[]> {
|
||||||
let foundCollection: Personalien[] = await content.find().toArray();
|
let foundCollection: Personalien[] = await content.find().toArray();
|
||||||
return foundCollection;
|
return foundCollection;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
async function findManyData(_order: Personalien): Promise<string> {
|
async function findManyData(_order: Personalien): Promise<string> {
|
||||||
let test: Mongo.Cursor = content.find(_order);
|
let test: Mongo.Cursor = content.find(_order);
|
||||||
let testArray: Personalien[] = await test.toArray();
|
let testArray: Personalien[] = await test.toArray();
|
||||||
console.log( testArray );
|
console.log( testArray );
|
||||||
return testArray.toString();
|
return testArray.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function findOneData(_order: Personalien): Promise<void> {
|
async function findOneData(_order: Personalien): Promise<void> {
|
||||||
let test2: any = await content.findOne(_order);
|
let test2: any = await content.findOne(_order);
|
||||||
console.log("findOneData: ", test2);
|
console.log("findOneData: ", test2);
|
||||||
//console.log(test2.name);
|
//console.log(test2.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeData(_order: Personalien): void {
|
function removeData(_order: Personalien): void {
|
||||||
content.remove(_order);
|
content.remove(_order);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,69 +1,69 @@
|
||||||
import * as Http from "http";
|
import * as Http from "http";
|
||||||
import * as url from "url";
|
import * as url from "url";
|
||||||
import { ParsedUrlQuery } from "querystring";
|
import { ParsedUrlQuery } from "querystring";
|
||||||
import { handleMongo } from "./mongo";
|
import { handleMongo } from "./mongo";
|
||||||
|
|
||||||
//import {testThis } from "mongo.js";
|
//import {testThis } from "mongo.js";
|
||||||
|
|
||||||
export namespace ServerSide {
|
export namespace ServerSide {
|
||||||
|
|
||||||
console.log("Starting server");
|
console.log("Starting server");
|
||||||
let port: number = Number(process.env.PORT);
|
let port: number = Number(process.env.PORT);
|
||||||
if (!port)
|
if (!port)
|
||||||
port = 8100;
|
port = 8100;
|
||||||
|
|
||||||
let server: Http.Server = Http.createServer();
|
let server: Http.Server = Http.createServer();
|
||||||
server.addListener("request", handleRequest);
|
server.addListener("request", handleRequest);
|
||||||
server.addListener("listening", handleListen);
|
server.addListener("listening", handleListen);
|
||||||
server.listen(port);
|
server.listen(port);
|
||||||
|
|
||||||
let myArgs: string[] = process.argv.slice(2);
|
let myArgs: string[] = process.argv.slice(2);
|
||||||
let whichDB: string = myArgs[0];
|
let whichDB: string = myArgs[0];
|
||||||
handleMongo.connectDB(whichDB);
|
handleMongo.connectDB(whichDB);
|
||||||
|
|
||||||
|
|
||||||
function handleListen(): void {
|
function handleListen(): void {
|
||||||
console.log("Listening");
|
console.log("Listening");
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleRequest(_request: Http.IncomingMessage, _response: Http.ServerResponse): Promise<void> {
|
async function handleRequest(_request: Http.IncomingMessage, _response: Http.ServerResponse): Promise<void> {
|
||||||
console.log("https://theoneandgis.herokuapp.com" + `${_request.url}`);
|
console.log("https://theoneandgis.herokuapp.com" + `${_request.url}`);
|
||||||
|
|
||||||
let myData: url.UrlWithParsedQuery = url.parse(`${_request.url}`, true);
|
let myData: url.UrlWithParsedQuery = url.parse(`${_request.url}`, true);
|
||||||
let myQuery: ParsedUrlQuery = myData.query;
|
let myQuery: ParsedUrlQuery = myData.query;
|
||||||
let myQueryString: string = JSON.stringify(myQuery);
|
let myQueryString: string = JSON.stringify(myQuery);
|
||||||
//let splitString: string = (<string>_request.url).slice(0, 9);
|
//let splitString: string = (<string>_request.url).slice(0, 9);
|
||||||
|
|
||||||
_response.setHeader("content-type", "application/json");
|
_response.setHeader("content-type", "application/json");
|
||||||
_response.setHeader("Access-Control-Allow-Origin", "*");
|
_response.setHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
|
||||||
if ( (<string>_request.url).includes("/mongo") ) {
|
if ( (<string>_request.url).includes("/mongo") ) {
|
||||||
console.log(" myQueryString: ", myQueryString);
|
console.log(" myQueryString: ", myQueryString);
|
||||||
console.log(" <string>_request.url: ", <string>_request.url);
|
console.log(" <string>_request.url: ", <string>_request.url);
|
||||||
await mongoAction( _response, myQueryString , (<string>_request.url) );
|
await mongoAction( _response, myQueryString , (<string>_request.url) );
|
||||||
}
|
}
|
||||||
|
|
||||||
_response.end();
|
_response.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function mongoAction(_response: Http.ServerResponse, _query: string, _command: string): Promise<void> {
|
async function mongoAction(_response: Http.ServerResponse, _query: string, _command: string): Promise<void> {
|
||||||
if (_command.includes("/send")) {
|
if (_command.includes("/send")) {
|
||||||
let myJsonObj: handleMongo.Personalien = JSON.parse(_query);
|
let myJsonObj: handleMongo.Personalien = JSON.parse(_query);
|
||||||
handleMongo.insertData(myJsonObj);
|
handleMongo.insertData(myJsonObj);
|
||||||
_response.write(_query);
|
_response.write(_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( _command.includes("/retrieve") ) {
|
if ( _command.includes("/retrieve") ) {
|
||||||
let value: handleMongo.Personalien[] = await handleMongo.findCollection();
|
let value: handleMongo.Personalien[] = await handleMongo.findCollection();
|
||||||
let handlThis: string = JSON.stringify(value);
|
let handlThis: string = JSON.stringify(value);
|
||||||
_response.write(handlThis);
|
_response.write(handlThis);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( _command.includes("/remove") ) {
|
if ( _command.includes("/remove") ) {
|
||||||
let myJsonObj: handleMongo.Personalien = JSON.parse(_query);
|
let myJsonObj: handleMongo.Personalien = JSON.parse(_query);
|
||||||
await handleMongo.removeData(myJsonObj);
|
await handleMongo.removeData(myJsonObj);
|
||||||
_response.write(`{"":""}`);
|
_response.write(`{"":""}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,9 +1,9 @@
|
||||||
02.07.2020 | 21:31 | https://pixabay.com/de/illustrations/ice-cream-dessert-sweet-süßwaren-3490976/
|
02.07.2020 | 21:31 | https://pixabay.com/de/illustrations/ice-cream-dessert-sweet-süßwaren-3490976/
|
||||||
02.07.2020 | 21:32 | https://pixabay.com/de/photos/sonnenaufgang-boot-ruderboot-1014712/
|
02.07.2020 | 21:32 | https://pixabay.com/de/photos/sonnenaufgang-boot-ruderboot-1014712/
|
||||||
02.07.2020 | 21:35 | https://pixabay.com/de/photos/softeis-softeistüte-eis-schokoeis-50845/
|
02.07.2020 | 21:35 | https://pixabay.com/de/photos/softeis-softeistüte-eis-schokoeis-50845/
|
||||||
02.07.2020 | 21:40 | https://pixabay.com/de/photos/trinken-glas-gießen-bar-pub-eis-1870139/
|
02.07.2020 | 21:40 | https://pixabay.com/de/photos/trinken-glas-gießen-bar-pub-eis-1870139/
|
||||||
02.07.2020 | 21:52 | https://freiburg.stadtbesten.de/wp-content/uploads/sites/4/2017/06/ice-cream-cone-1274894_1920.jpg
|
02.07.2020 | 21:52 | https://freiburg.stadtbesten.de/wp-content/uploads/sites/4/2017/06/ice-cream-cone-1274894_1920.jpg
|
||||||
17.07.2020 | 21:51 | https://5.imimg.com/data5/GG/MY/MY-52641035/paper-bowl-with-paper-lid-500x500.jpg
|
17.07.2020 | 21:51 | https://5.imimg.com/data5/GG/MY/MY-52641035/paper-bowl-with-paper-lid-500x500.jpg
|
||||||
17.07.2020 | 23:55 | https://pixabay.com/de/photos/bunte-streusel-s%C3%BC%C3%9Fwaren-lose-50723/
|
17.07.2020 | 23:55 | https://pixabay.com/de/photos/bunte-streusel-s%C3%BC%C3%9Fwaren-lose-50723/
|
||||||
18.07.2020 | 00:13 | https://pixabay.com/get/53e0dd40424fad00f5d8997cc2293f7d1139d9f85254784c752d78d3904d_1920.jpg
|
18.07.2020 | 00:13 | https://pixabay.com/get/53e0dd40424fad00f5d8997cc2293f7d1139d9f85254784c752d78d3904d_1920.jpg
|
||||||
18.07.2020 | 00:29 | https://pixabay.com/get/52e7d4464c53ab14f6d1867dda29327f1d3cdae3544c704c7c2a7bd69344cd51_1920.jpg
|
18.07.2020 | 00:29 | https://pixabay.com/get/52e7d4464c53ab14f6d1867dda29327f1d3cdae3544c704c7c2a7bd69344cd51_1920.jpg
|
||||||
|
|
@ -1,113 +1,113 @@
|
||||||
@media screen and (min-width: 0px) {
|
@media screen and (min-width: 0px) {
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-image: url(../html-shop/images/background.png);
|
background-image: url(../html-shop/images/background.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
#tableDiv {
|
#tableDiv {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tableDiv button {
|
#tableDiv button {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: solid black 2px;
|
border: solid black 2px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
border: solid black 2px;
|
border: solid black 2px;
|
||||||
padding: 0px 5%;
|
padding: 0px 5%;
|
||||||
background-color: rgb(0, 102, 255);
|
background-color: rgb(0, 102, 255);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
th, td {
|
th, td {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.removeButton {
|
.removeButton {
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttonDiv {
|
.buttonDiv {
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
}
|
}
|
||||||
.buttonDiv button {
|
.buttonDiv button {
|
||||||
width: 45%;
|
width: 45%;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#formDiv {
|
div#formDiv {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
padding: 10px 5%;
|
padding: 10px 5%;
|
||||||
border: solid black 2px;
|
border: solid black 2px;
|
||||||
}
|
}
|
||||||
form#myForm {
|
form#myForm {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
}
|
}
|
||||||
form#myForm input, form#myForm label, form#myForm button {
|
form#myForm input, form#myForm label, form#myForm button {
|
||||||
margin: 2px 5%;
|
margin: 2px 5%;
|
||||||
}
|
}
|
||||||
form#myForm button {
|
form#myForm button {
|
||||||
min-height: 30px;
|
min-height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@media screen and (min-width: 601px) {
|
@media screen and (min-width: 601px) {
|
||||||
.removeButton {
|
.removeButton {
|
||||||
width: 70%;
|
width: 70%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
table {
|
table {
|
||||||
width: 70%;
|
width: 70%;
|
||||||
}
|
}
|
||||||
.buttonDiv {
|
.buttonDiv {
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
width: 70%;
|
width: 70%;
|
||||||
}
|
}
|
||||||
.buttonDiv button {
|
.buttonDiv button {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
width: 45%;
|
width: 45%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (min-width: 1025px) {
|
@media screen and (min-width: 1025px) {
|
||||||
.removeButton {
|
.removeButton {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
table {
|
table {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
.buttonDiv {
|
.buttonDiv {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
.buttonDiv button {
|
.buttonDiv button {
|
||||||
width: 45%;
|
width: 45%;
|
||||||
}
|
}
|
||||||
#tableDiv .removeOne:hover, #tableDiv .removeButton:hover {
|
#tableDiv .removeOne:hover, #tableDiv .removeButton:hover {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
}
|
}
|
||||||
#tableDiv .editOne:hover {
|
#tableDiv .editOne:hover {
|
||||||
background-color: yellow;
|
background-color: yellow;
|
||||||
}
|
}
|
||||||
div#formDiv {
|
div#formDiv {
|
||||||
width: 60%;
|
width: 60%;
|
||||||
}
|
}
|
||||||
form#myForm button:hover {
|
form#myForm button:hover {
|
||||||
background-color: green;
|
background-color: green;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,45 +1,45 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>Administrator</title>
|
<title>Administrator</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" href="../index.css">
|
<link rel="stylesheet" href="../index.css">
|
||||||
<link rel="stylesheet" href="admin.css">
|
<link rel="stylesheet" href="admin.css">
|
||||||
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
||||||
<script src="../script-frontend/admin.js" defer></script>
|
<script src="../script-frontend/admin.js" defer></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<div class="top-nav">
|
<div class="top-nav">
|
||||||
<div id="logo">
|
<div id="logo">
|
||||||
<a href="../index.html"><img src="../html-landing-page/images/nice-ice-logo.png" alt=""></a>
|
<a href="../index.html"><img src="../html-landing-page/images/nice-ice-logo.png" alt=""></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="warenkorb">
|
<div id="warenkorb">
|
||||||
<a href="../html-warenkorb/warenkorb.html"><i class='fas fa-shopping-cart'></i> <span>0</span></a>
|
<a href="../html-warenkorb/warenkorb.html"><i class='fas fa-shopping-cart'></i> <span>0</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<nav>
|
<nav>
|
||||||
<div class="bottom-nav">
|
<div class="bottom-nav">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="admin.html">Administrator</a></li>
|
<li><a href="admin.html">Administrator</a></li>
|
||||||
<li><a href="../html-memes/memes.html">Über uns</a></li>
|
<li><a href="../html-memes/memes.html">Über uns</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<main>
|
<main>
|
||||||
<div id="tableDiv">
|
<div id="tableDiv">
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div>
|
<div>
|
||||||
<span>( - Disclaimer - )</span>
|
<span>( - Disclaimer - )</span>
|
||||||
<span>Ich verdiene mit dieser Website kein Geld</span>
|
<span>Ich verdiene mit dieser Website kein Geld</span>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,35 +1,35 @@
|
||||||
body {
|
body {
|
||||||
background-image: url(images/sunrise-1014712_1920.jpg);
|
background-image: url(images/sunrise-1014712_1920.jpg);
|
||||||
background-position-x: 50%;
|
background-position-x: 50%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: auto 100vh;
|
background-size: auto 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bestellbox {
|
.bestellbox {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 200px;
|
top: 200px;
|
||||||
background-color: rgba(58, 58, 58, 0.8);
|
background-color: rgba(58, 58, 58, 0.8);
|
||||||
color: white;
|
color: white;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 0px 10px;
|
margin: 0px 10px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
.bestellbox span {
|
.bestellbox span {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
.bestellbox a {
|
.bestellbox a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.bestellbox #box-togo, #box-tostay {
|
.bestellbox #box-togo, #box-tostay {
|
||||||
background-color: rgba(128, 128, 128, 0.8);
|
background-color: rgba(128, 128, 128, 0.8);
|
||||||
box-shadow: 3px 3px 3px white;
|
box-shadow: 3px 3px 3px white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
body {
|
body {
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bestellbox {
|
.bestellbox {
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
margin: 0px 20px;
|
margin: 0px 20px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
.bestellbox span {
|
.bestellbox span {
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
}
|
}
|
||||||
.bestellbox #box-togo, #box-tostay {
|
.bestellbox #box-togo, #box-tostay {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
margin: 20px 0px;
|
margin: 20px 0px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
body {
|
body {
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
background-size: 100vw 100vh;
|
background-size: 100vw 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bestellbox {
|
.bestellbox {
|
||||||
top: 150px;
|
top: 150px;
|
||||||
}
|
}
|
||||||
.bestellbox #box-togo:hover, #box-tostay:hover {
|
.bestellbox #box-togo:hover, #box-tostay:hover {
|
||||||
background-color: rgb(0, 102, 255);
|
background-color: rgb(0, 102, 255);
|
||||||
}
|
}
|
||||||
|
|
@ -1,64 +1,64 @@
|
||||||
@media screen and (min-width: 0px) {
|
@media screen and (min-width: 0px) {
|
||||||
.top-nav {
|
.top-nav {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 10vh;
|
height: 10vh;
|
||||||
padding: 5px 0px;
|
padding: 5px 0px;
|
||||||
}
|
}
|
||||||
.top-nav a {
|
.top-nav a {
|
||||||
font-size: 0px;
|
font-size: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#imageBox {
|
#imageBox {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
#imageBox div {
|
#imageBox div {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
#imageBox img {
|
#imageBox img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: solid black 3px;
|
border: solid black 3px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
#buttonRight, #buttonLeft {
|
#buttonRight, #buttonLeft {
|
||||||
height: 5vh;
|
height: 5vh;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: rgba(0,0,0,75%);
|
background-color: rgba(0,0,0,75%);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
color: white;
|
color: white;
|
||||||
border: solid black 3px;
|
border: solid black 3px;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (min-width: 601px) {
|
@media screen and (min-width: 601px) {
|
||||||
|
|
||||||
}
|
}
|
||||||
@media screen and (min-width: 1025px) {
|
@media screen and (min-width: 1025px) {
|
||||||
#imageBox div {
|
#imageBox div {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
#imageBox img {
|
#imageBox img {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
max-height: 650px;
|
max-height: 650px;
|
||||||
}
|
}
|
||||||
#buttonRight, #buttonLeft {
|
#buttonRight, #buttonLeft {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,44 +1,44 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 0px)" href="../html-landing-page/landing-page-01-phone.css">
|
<link rel="stylesheet" media="screen and (min-width: 0px)" href="../html-landing-page/landing-page-01-phone.css">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 601px)" href="../html-landing-page/landing-page-02-tablet.css">
|
<link rel="stylesheet" media="screen and (min-width: 601px)" href="../html-landing-page/landing-page-02-tablet.css">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="../html-landing-page/landing-page-03-desktop.css">
|
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="../html-landing-page/landing-page-03-desktop.css">
|
||||||
<link rel="stylesheet" href="../index.css">
|
<link rel="stylesheet" href="../index.css">
|
||||||
<link rel="stylesheet" href="memes.css">
|
<link rel="stylesheet" href="memes.css">
|
||||||
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
||||||
<script src='../script-frontend/memes.js' defer></script>
|
<script src='../script-frontend/memes.js' defer></script>
|
||||||
<title>MEMS!</title>
|
<title>MEMS!</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<div class="top-nav">
|
<div class="top-nav">
|
||||||
<div id="logo">
|
<div id="logo">
|
||||||
<a href="../index.html"><img src="../html-landing-page/images/nice-ice-logo.png" alt=""></a>
|
<a href="../index.html"><img src="../html-landing-page/images/nice-ice-logo.png" alt=""></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<nav>
|
<nav>
|
||||||
<div class="bottom-nav">
|
<div class="bottom-nav">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="../html-admin/admin.html">Administrator</a></li>
|
<li><a href="../html-admin/admin.html">Administrator</a></li>
|
||||||
<li><a href="memes.html">Über uns</a></li>
|
<li><a href="memes.html">Über uns</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<main>
|
<main>
|
||||||
<div id="imageBox">
|
<div id="imageBox">
|
||||||
<img src="images/GiSBeLike.png" alt="Some weird Memes" />
|
<img src="images/GiSBeLike.png" alt="Some weird Memes" />
|
||||||
<div>
|
<div>
|
||||||
<button id="buttonLeft"><</button>
|
<button id="buttonLeft"><</button>
|
||||||
<button id="buttonRight">></button>
|
<button id="buttonRight">></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,169 +1,169 @@
|
||||||
@media screen and (min-width: 0px) {
|
@media screen and (min-width: 0px) {
|
||||||
body {
|
body {
|
||||||
background-image: url(images/background.png);
|
background-image: url(images/background.png);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#topContainer {
|
#topContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
padding: 0px 10px 0px 10px;
|
padding: 0px 10px 0px 10px;
|
||||||
margin: 20px 0px;
|
margin: 20px 0px;
|
||||||
}
|
}
|
||||||
#topContainer > span {
|
#topContainer > span {
|
||||||
border-bottom: solid 3px;
|
border-bottom: solid 3px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
#topContainer button {
|
#topContainer button {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: rgb(0, 102, 255);
|
background-color: rgb(0, 102, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
#productContainer > span {
|
#productContainer > span {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
border-bottom: solid 3px;
|
border-bottom: solid 3px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#topTable {
|
#topTable {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#topTable button {
|
#topTable button {
|
||||||
width: 23%;
|
width: 23%;
|
||||||
margin: 4px 0px;
|
margin: 4px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#topTake button {
|
#topTake button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#topContainer{
|
#topContainer{
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#topContainer, #productContainer{
|
#topContainer, #productContainer{
|
||||||
border: solid black;
|
border: solid black;
|
||||||
margin: 20px 0px;
|
margin: 20px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#extraSpan {
|
#extraSpan {
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
#buttonContainer{
|
#buttonContainer{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid black;
|
border: solid black;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#containerDiv, #flavourDiv, #toppingDiv{
|
#containerDiv, #flavourDiv, #toppingDiv{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
margin: 20px 0px;
|
margin: 20px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#containerDiv div, #flavourDiv div, #toppingDiv div{
|
#containerDiv div, #flavourDiv div, #toppingDiv div{
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#container, #flavour, #topping{
|
#container, #flavour, #topping{
|
||||||
margin: 20px 0px;
|
margin: 20px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container, .flavour, .topping{
|
.container, .flavour, .topping{
|
||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container img {
|
.container img {
|
||||||
border: solid black 3px;
|
border: solid black 3px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
.container img, .flavour img, .topping img {
|
.container img, .flavour img, .topping img {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
.container button, .flavour button, .topping button {
|
.container button, .flavour button, .topping button {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-radius: 5%;
|
border-radius: 5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#buttonContainer button {
|
#buttonContainer button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
color: white;
|
color: white;
|
||||||
background-color: rgb(0, 102, 255);
|
background-color: rgb(0, 102, 255);
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#buttonContainer a {
|
#buttonContainer a {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: white;
|
color: white;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#displayContainer {
|
#displayContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border: solid black 3px;
|
border: solid black 3px;
|
||||||
margin: 20px 0px;
|
margin: 20px 0px;
|
||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
#displayContainer img {
|
#displayContainer img {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
margin: 0px 5px;
|
margin: 0px 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (min-width: 601px) {
|
@media screen and (min-width: 601px) {
|
||||||
#topTable button, #topTake button {
|
#topTable button, #topTake button {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#buttonContainer button {
|
#buttonContainer button {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
padding: 5px 0px;
|
padding: 5px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#containerDiv div, #flavourDiv div, #toppingDiv div{
|
#containerDiv div, #flavourDiv div, #toppingDiv div{
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.container, .flavour, .topping{
|
.container, .flavour, .topping{
|
||||||
width: 30%;
|
width: 30%;
|
||||||
}
|
}
|
||||||
#containerDiv button, #flavourDiv button, #toppingDiv button{
|
#containerDiv button, #flavourDiv button, #toppingDiv button{
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (min-width: 1025px) {
|
@media screen and (min-width: 1025px) {
|
||||||
.container, .flavour, .topping{
|
.container, .flavour, .topping{
|
||||||
width: 12%;
|
width: 12%;
|
||||||
}
|
}
|
||||||
#topTable button {
|
#topTable button {
|
||||||
width: 10%;
|
width: 10%;
|
||||||
margin: 4px 0px;
|
margin: 4px 0px;
|
||||||
}
|
}
|
||||||
#topTable button:hover, #topTake button:hover, #buttonContainer button:hover{
|
#topTable button:hover, #topTake button:hover, #buttonContainer button:hover{
|
||||||
background-color: black;
|
background-color: black;
|
||||||
color: rgb(0, 102, 255);
|
color: rgb(0, 102, 255);
|
||||||
}
|
}
|
||||||
.container button:hover, .flavour button:hover, .topping button:hover {
|
.container button:hover, .flavour button:hover, .topping button:hover {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,77 +1,77 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" href="../index.css">
|
<link rel="stylesheet" href="../index.css">
|
||||||
<link rel="stylesheet" href="shop.css">
|
<link rel="stylesheet" href="shop.css">
|
||||||
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
||||||
<script src="../script-frontend/shop.js" defer></script>
|
<script src="../script-frontend/shop.js" defer></script>
|
||||||
<title>Shop</title>
|
<title>Shop</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<div class="top-nav">
|
<div class="top-nav">
|
||||||
<div id="logo">
|
<div id="logo">
|
||||||
<a href="../index.html"><img src="../html-landing-page/images/nice-ice-logo.png" alt=""></a>
|
<a href="../index.html"><img src="../html-landing-page/images/nice-ice-logo.png" alt=""></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="warenkorb">
|
<div id="warenkorb">
|
||||||
<a href="../html-warenkorb/warenkorb.html"><i class='fas fa-shopping-cart'></i> <span>0</span></a>
|
<a href="../html-warenkorb/warenkorb.html"><i class='fas fa-shopping-cart'></i> <span>0</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<nav>
|
<nav>
|
||||||
<div class="bottom-nav">
|
<div class="bottom-nav">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="../html-admin/admin.html">Administrator</a></li>
|
<li><a href="../html-admin/admin.html">Administrator</a></li>
|
||||||
<li><a href="../html-memes/memes.html">Über uns</a></li>
|
<li><a href="../html-memes/memes.html">Über uns</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<main>
|
<main>
|
||||||
<div id="topContainer">
|
<div id="topContainer">
|
||||||
<span>Wohin wollen Sie das Eis?</span>
|
<span>Wohin wollen Sie das Eis?</span>
|
||||||
<div><span id="extraSpan">(Muss nur einmal pro Bestellvorgang ausgewählt werden)</span></div>
|
<div><span id="extraSpan">(Muss nur einmal pro Bestellvorgang ausgewählt werden)</span></div>
|
||||||
<div>
|
<div>
|
||||||
<span>Zum Tisch?</span>
|
<span>Zum Tisch?</span>
|
||||||
<div id="topTable"></div>
|
<div id="topTable"></div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>Zum Mitnehmen?</span>
|
<span>Zum Mitnehmen?</span>
|
||||||
<div id="topTake"></div>
|
<div id="topTake"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="productContainer">
|
<div id="productContainer">
|
||||||
<h1 id="containerHeader">Behälter (max 1)</h1>
|
<h1 id="containerHeader">Behälter (max 1)</h1>
|
||||||
<div id="containerDiv"></div>
|
<div id="containerDiv"></div>
|
||||||
<h1 id="flavourHeader">Eis Sorten (max 6)</h1>
|
<h1 id="flavourHeader">Eis Sorten (max 6)</h1>
|
||||||
<div id="flavourDiv"></div>
|
<div id="flavourDiv"></div>
|
||||||
<h1 id="toppingHeader">Toppings (max 3)</h1>
|
<h1 id="toppingHeader">Toppings (max 3)</h1>
|
||||||
<div id="toppingDiv"></div>
|
<div id="toppingDiv"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="displayContainer">
|
<div id="displayContainer">
|
||||||
<div id="behälter"></div>
|
<div id="behälter"></div>
|
||||||
<div id="eis1"></div>
|
<div id="eis1"></div>
|
||||||
<div id="eis2"></div>
|
<div id="eis2"></div>
|
||||||
<div id="eis3"></div>
|
<div id="eis3"></div>
|
||||||
<div id="eis4"></div>
|
<div id="eis4"></div>
|
||||||
<div id="eis5"></div>
|
<div id="eis5"></div>
|
||||||
<div id="eis6"></div>
|
<div id="eis6"></div>
|
||||||
<div id="topping1"></div>
|
<div id="topping1"></div>
|
||||||
<div id="topping2"></div>
|
<div id="topping2"></div>
|
||||||
<div id="topping3"></div>
|
<div id="topping3"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="buttonContainer">
|
<div id="buttonContainer">
|
||||||
<button id="resetButton">Eis zurücksetzen</button>
|
<button id="resetButton">Eis zurücksetzen</button>
|
||||||
<button id="nextButton">Nächstes Eis</button>
|
<button id="nextButton">Nächstes Eis</button>
|
||||||
<button id="sendButton">Bestellung speichern</button>
|
<button id="sendButton">Bestellung speichern</button>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div>
|
<div>
|
||||||
<span>( - Disclaimer - )</span>
|
<span>( - Disclaimer - )</span>
|
||||||
<span>Ich verdiene mit dieser Website kein Geld</span>
|
<span>Ich verdiene mit dieser Website kein Geld</span>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,97 +1,97 @@
|
||||||
@media screen and (min-width: 0px) {
|
@media screen and (min-width: 0px) {
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-image: url(../html-shop/images/background.png);
|
background-image: url(../html-shop/images/background.png);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#mainContainer {
|
#mainContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
/*align-items: stretch;*/
|
/*align-items: stretch;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
div.product, form {
|
div.product, form {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
border: dotted rgb(0, 25, 136) 3px;
|
border: dotted rgb(0, 25, 136) 3px;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
background-color: rgba(0, 102, 255, 70%);
|
background-color: rgba(0, 102, 255, 70%);
|
||||||
color: white;
|
color: white;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 20px 0px;
|
margin: 20px 0px;
|
||||||
}
|
}
|
||||||
div.product button {
|
div.product button {
|
||||||
background-color: rgba(0,0,0,50%);
|
background-color: rgba(0,0,0,50%);
|
||||||
border: solid rgb(0, 25, 136) 2px;
|
border: solid rgb(0, 25, 136) 2px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
div.product span {
|
div.product span {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
form {
|
form {
|
||||||
padding: 20px 75px;
|
padding: 20px 75px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
form input {
|
form input {
|
||||||
margin: 0px 0px 10px 0px;
|
margin: 0px 0px 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
button#sendOrder {
|
button#sendOrder {
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
color: white;
|
color: white;
|
||||||
background-color: red;
|
background-color: red;
|
||||||
border: solid black 3px;
|
border: solid black 3px;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@media screen and (min-width: 601px) {
|
@media screen and (min-width: 601px) {
|
||||||
body {
|
body {
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.product button {
|
div.product button {
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
button#sendOrder{
|
button#sendOrder{
|
||||||
height: 50px;
|
height: 50px;
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
width: 75%;
|
width: 75%;
|
||||||
}
|
}
|
||||||
|
|
||||||
form input {
|
form input {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@media screen and (min-width: 1025px) {
|
@media screen and (min-width: 1025px) {
|
||||||
body {
|
body {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.product button:hover {
|
div.product button:hover {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
button#sendOrder{
|
button#sendOrder{
|
||||||
height: 50px;
|
height: 50px;
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
button#sendOrder:hover{
|
button#sendOrder:hover{
|
||||||
background-color: black;
|
background-color: black;
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,65 +1,65 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>Warenkorb</title>
|
<title>Warenkorb</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" href="../index.css">
|
<link rel="stylesheet" href="../index.css">
|
||||||
<link rel="stylesheet" href="warenkorb.css">
|
<link rel="stylesheet" href="warenkorb.css">
|
||||||
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
||||||
<script src="../script-frontend/warenkorb.js" defer></script>
|
<script src="../script-frontend/warenkorb.js" defer></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<div class="top-nav">
|
<div class="top-nav">
|
||||||
<div id="logo">
|
<div id="logo">
|
||||||
<a href="../index.html"><img src="../html-landing-page/images/nice-ice-logo.png" alt=""></a>
|
<a href="../index.html"><img src="../html-landing-page/images/nice-ice-logo.png" alt=""></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="warenkorb">
|
<div id="warenkorb">
|
||||||
<a href="#"><i class='fas fa-shopping-cart'></i> <span>0</span></a>
|
<a href="#"><i class='fas fa-shopping-cart'></i> <span>0</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<nav>
|
<nav>
|
||||||
<div class="bottom-nav">
|
<div class="bottom-nav">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="../html-shop/shop.html">Shop</a></li>
|
<li><a href="../html-shop/shop.html">Shop</a></li>
|
||||||
<li><a href="../html-admin/admin.html">Administrator</a></li>
|
<li><a href="../html-admin/admin.html">Administrator</a></li>
|
||||||
<li><a href="../html-memes/memes.html">Über uns</a></li>
|
<li><a href="../html-memes/memes.html">Über uns</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<main>
|
<main>
|
||||||
<div id="mainContainer">
|
<div id="mainContainer">
|
||||||
<div id="check"></div>
|
<div id="check"></div>
|
||||||
<form id="myForm" method="POST" action="(#)">
|
<form id="myForm" method="POST" action="(#)">
|
||||||
<!--https://theoneandgis.herokuapp.com-->
|
<!--https://theoneandgis.herokuapp.com-->
|
||||||
|
|
||||||
<label for="vorname">Vorname</label>
|
<label for="vorname">Vorname</label>
|
||||||
<input type="text" id="vorname" name="vorname" value="Vorname" onfocus="this.value=''">
|
<input type="text" id="vorname" name="vorname" value="Vorname" onfocus="this.value=''">
|
||||||
|
|
||||||
<label for="nachname">Nachname</label>
|
<label for="nachname">Nachname</label>
|
||||||
<input type="text" id="nachname" name="nachname" value="Nachname" onfocus="this.value=''">
|
<input type="text" id="nachname" name="nachname" value="Nachname" onfocus="this.value=''">
|
||||||
|
|
||||||
<label for="straße">Straße</label>
|
<label for="straße">Straße</label>
|
||||||
<input type="text" id="straße" name="straße" value="Straße-Hausnummer" onfocus="this.value=''">
|
<input type="text" id="straße" name="straße" value="Straße-Hausnummer" onfocus="this.value=''">
|
||||||
|
|
||||||
<label for="postleitzahl">Postleitzahl</label>
|
<label for="postleitzahl">Postleitzahl</label>
|
||||||
<input type="text" id="postleitzahl" name="postleitzahl" value="PLZ-Wohnort" onfocus="this.value=''">
|
<input type="text" id="postleitzahl" name="postleitzahl" value="PLZ-Wohnort" onfocus="this.value=''">
|
||||||
</form>
|
</form>
|
||||||
<!--<button id="printOrder">print order</button>-->
|
<!--<button id="printOrder">print order</button>-->
|
||||||
<button id="sendOrder">Bestellung Abschicken</button>
|
<button id="sendOrder">Bestellung Abschicken</button>
|
||||||
<!--<button id="formButton">Send Form</button>-->
|
<!--<button id="formButton">Send Form</button>-->
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
<div>
|
<div>
|
||||||
<span>( - Disclaimer - )</span>
|
<span>( - Disclaimer - )</span>
|
||||||
<span>Ich verdiene mit dieser Website kein Geld</span>
|
<span>Ich verdiene mit dieser Website kein Geld</span>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,145 +1,145 @@
|
||||||
@media screen and (min-width: 0px) {
|
@media screen and (min-width: 0px) {
|
||||||
|
|
||||||
/* Die Seite ist auf Mindestbreite von 333px ausgelegt */
|
/* Die Seite ist auf Mindestbreite von 333px ausgelegt */
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/*background-image: url(images/sunrise-1014712_1920.jpg);
|
/*background-image: url(images/sunrise-1014712_1920.jpg);
|
||||||
background-position: 50% 10%;
|
background-position: 50% 10%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;*/
|
background-size: cover;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-nav {
|
.top-nav {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 70% 25%;
|
grid-template-columns: 70% 25%;
|
||||||
grid-column-gap: 5%;
|
grid-column-gap: 5%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 10vh;
|
height: 10vh;
|
||||||
}
|
}
|
||||||
.top-nav a {
|
.top-nav a {
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.top-nav #warenkorb {
|
.top-nav #warenkorb {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
position: relative;
|
position: relative;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
}
|
}
|
||||||
.top-nav #logo, #warenkorb {
|
.top-nav #logo, #warenkorb {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.top-nav img {
|
.top-nav img {
|
||||||
height: 60px;
|
height: 60px;
|
||||||
width: 220px;
|
width: 220px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-nav {
|
.bottom-nav {
|
||||||
background-color: hsla(0, 0%, 0%, 0%);
|
background-color: hsla(0, 0%, 0%, 0%);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.bottom-nav ul {
|
.bottom-nav ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
.bottom-nav ul li {
|
.bottom-nav ul li {
|
||||||
background-color: rgb(0, 102, 255);
|
background-color: rgb(0, 102, 255);
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
border: solid rgb(0, 25, 136) 2px;
|
border: solid rgb(0, 25, 136) 2px;
|
||||||
|
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
.bottom-nav ul a {
|
.bottom-nav ul a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer div {
|
footer div {
|
||||||
margin-top: 200px;
|
margin-top: 200px;
|
||||||
background-color: rgb(43, 43, 43);
|
background-color: rgb(43, 43, 43);
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@media screen and (min-width: 601px) {
|
@media screen and (min-width: 601px) {
|
||||||
body {
|
body {
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.top-nav {
|
div.top-nav {
|
||||||
height: 120px;
|
height: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-nav #warenkorb {
|
.top-nav #warenkorb {
|
||||||
font-size: 70px;
|
font-size: 70px;
|
||||||
}
|
}
|
||||||
.top-nav img {
|
.top-nav img {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
width: 380px;
|
width: 380px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@media screen and (min-width: 1025px) {
|
@media screen and (min-width: 1025px) {
|
||||||
body {
|
body {
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-nav #warenkorb a:hover {
|
.top-nav #warenkorb a:hover {
|
||||||
color:rgb(0, 102, 255);
|
color:rgb(0, 102, 255);
|
||||||
}
|
}
|
||||||
div.top-nav {
|
div.top-nav {
|
||||||
height: 150px;
|
height: 150px;
|
||||||
}
|
}
|
||||||
.top-nav img {
|
.top-nav img {
|
||||||
height: 120px;
|
height: 120px;
|
||||||
width: 460px;
|
width: 460px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-nav {
|
.bottom-nav {
|
||||||
background-color: rgb(0, 102, 255);
|
background-color: rgb(0, 102, 255);
|
||||||
}
|
}
|
||||||
.bottom-nav ul {
|
.bottom-nav ul {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
.bottom-nav ul li {
|
.bottom-nav ul li {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
.bottom-nav ul a {
|
.bottom-nav ul a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.bottom-nav ul a:hover {
|
.bottom-nav ul a:hover {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,42 +1,42 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 0px)" href="html-landing-page/landing-page-01-phone.css">
|
<link rel="stylesheet" media="screen and (min-width: 0px)" href="html-landing-page/landing-page-01-phone.css">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 601px)" href="html-landing-page/landing-page-02-tablet.css">
|
<link rel="stylesheet" media="screen and (min-width: 601px)" href="html-landing-page/landing-page-02-tablet.css">
|
||||||
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="html-landing-page/landing-page-03-desktop.css">
|
<link rel="stylesheet" media="screen and (min-width: 1025px)" href="html-landing-page/landing-page-03-desktop.css">
|
||||||
<link rel="stylesheet" href="index.css">
|
<link rel="stylesheet" href="index.css">
|
||||||
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
||||||
<script src="script-frontend/index.js" defer></script>
|
<script src="script-frontend/index.js" defer></script>
|
||||||
<!--<title>Eisdile Olé</title>-->
|
<!--<title>Eisdile Olé</title>-->
|
||||||
<title>Nice Ice</title>
|
<title>Nice Ice</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<div class="top-nav">
|
<div class="top-nav">
|
||||||
<div id="logo">
|
<div id="logo">
|
||||||
<a href="#"><img src="html-landing-page/images/nice-ice-logo.png" alt=""></a>
|
<a href="#"><img src="html-landing-page/images/nice-ice-logo.png" alt=""></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="warenkorb">
|
<div id="warenkorb">
|
||||||
<a href="html-warenkorb/warenkorb.html"><i class='fas fa-shopping-cart'></i> <span>0</span></a>
|
<a href="html-warenkorb/warenkorb.html"><i class='fas fa-shopping-cart'></i> <span>0</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<nav>
|
<nav>
|
||||||
<div class="bottom-nav">
|
<div class="bottom-nav">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="html-admin/admin.html">Administrator</a></li>
|
<li><a href="html-admin/admin.html">Administrator</a></li>
|
||||||
<li><a href="html-memes/memes.html">Über uns</a></li>
|
<li><a href="html-memes/memes.html">Über uns</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<main>
|
<main>
|
||||||
<div class="bestellbox">
|
<div class="bestellbox">
|
||||||
<span> Eis gefällig? </span>
|
<span> Eis gefällig? </span>
|
||||||
<a id="box-togo" href="html-shop/shop.html">Na klar!</a>
|
<a id="box-togo" href="html-shop/shop.html">Na klar!</a>
|
||||||
<!--<a id="box-tostay" href="#">Gemütlich zum Tisch</a>-->
|
<!--<a id="box-tostay" href="#">Gemütlich zum Tisch</a>-->
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
=> usage
|
=> usage
|
||||||
|
|
||||||
/mongo || call Database
|
/mongo || call Database
|
||||||
=> /mongo/nameOfCollection
|
=> /mongo/nameOfCollection
|
||||||
|
|
||||||
/nameOfCollection || choose, which Collection you're calling
|
/nameOfCollection || choose, which Collection you're calling
|
||||||
=> /nameOfCollection/furtherCommand
|
=> /nameOfCollection/furtherCommand
|
||||||
|
|
||||||
/findCollection || return a whole collection
|
/findCollection || return a whole collection
|
||||||
/findEntry || return a single entry
|
/findEntry || return a single entry
|
||||||
|
|
||||||
/insertEntry || insert a single entry
|
/insertEntry || insert a single entry
|
||||||
/removeEntry || remove a single entry
|
/removeEntry || remove a single entry
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ var handleMongo;
|
||||||
handleMongo.insertObject = insertObject;
|
handleMongo.insertObject = insertObject;
|
||||||
async function removeEntry(_collection, _entry) {
|
async function removeEntry(_collection, _entry) {
|
||||||
connectCollection(_collection);
|
connectCollection(_collection);
|
||||||
if (!(_entry.id == undefined)) {
|
if (_entry._id != undefined) {
|
||||||
let id = _entry._id;
|
let id = _entry._id;
|
||||||
let objID = new Mongo.ObjectID(id);
|
let objID = new Mongo.ObjectID(id);
|
||||||
await currentCollection.deleteOne({ "_id": objID });
|
await currentCollection.deleteOne({ "_id": objID });
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"useMongo.js","sourceRoot":"","sources":["useMongo.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AAEjC,IAAiB,WAAW,CA+F3B;AA/FD,WAAiB,WAAW;IAMxB,IAAI,kBAAoC,CAAC;IACzC,IAAI,gBAAkC,CAAC;IACvC,IAAI,iBAAmC,CAAC;IACxC,IAAI,KAAK,GAAW,EAAE,CAAC;IAEvB,SAAS,SAAS,CAAC,QAAgB;QAC/B,IAAI,QAAQ,IAAI,OAAO;YACnB,KAAK,GAAG,4BAA4B,CAAC;QACzC,IAAI,QAAQ,IAAI,QAAQ;YACpB,KAAK,GAAG,8HAA8H,CAAC;IAC/I,CAAC;IAEM,KAAK,UAAU,SAAS,CAAC,QAAgB;QAC5C,SAAS,CAAC,QAAQ,CAAC,CAAC;QACpB,IAAI,OAAO,GAA6B,EAAE,eAAe,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC;QAC5F,IAAI,WAAW,GAAsB,IAAI,KAAK,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC3E,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;QAC5B,kBAAkB,GAAG,WAAW,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACtE,gBAAgB,GAAG,WAAW,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAClE,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,kBAAkB,IAAI,SAAS,CAAC,CAAC;IAC1E,CAAC;IARqB,qBAAS,YAQ9B,CAAA;IAEM,KAAK,UAAU,iBAAiB,CAAC,WAAmB;QACvD,IAAI,WAAW,IAAI,UAAU;YACzB,iBAAiB,GAAG,kBAAkB,CAAC;aACtC,IAAI,WAAW,IAAI,QAAQ;YAC5B,iBAAiB,GAAG,gBAAgB,CAAC;IAC7C,CAAC;IALqB,6BAAiB,oBAKtC,CAAA;IAED,SAAgB,WAAW,CAAC,WAAmB,EAAE,MAAkB;QAC/D,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC9B,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IAJe,uBAAW,cAI1B,CAAA;IAEM,KAAK,UAAU,YAAY,CAAC,WAAmB,EAAE,MAAoB;QACxE,QAAQ,CAAC;QACT,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;QAC1C,iGAAiG;QACjG,MAAM,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,MAAM,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IARqB,wBAAY,eAQjC,CAAA;IAEM,KAAK,UAAU,WAAW,CAAC,WAAmB,EAAE,MAAkB;QACrE,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC/B,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,SAAS,CAAC,EAAE;YAC3B,IAAI,EAAE,GAAmB,MAAM,CAAC,GAAG,CAAC;YACpC,IAAI,KAAK,GAAmB,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YACnD,MAAM,iBAAiB,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;SACvD;aACI;YACD,MAAM,iBAAiB,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,EAAC,CAAC,CAAC;SAC1D;IACL,CAAC;IAVqB,uBAAW,cAUhC,CAAA;IAEM,KAAK,UAAU,YAAY,CAAC,WAAmB;QAClD,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC/B,IAAI,UAAU,GAAW,MAAM,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC3D,OAAO,UAAU,CAAC;IACtB,CAAC;IAJqB,wBAAY,eAIjC,CAAA;IAEM,KAAK,UAAU,cAAc,CAAC,WAAmB;QACpD,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC/B,IAAI,eAAe,GAAiB,MAAM,iBAAiB,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;QACnG,OAAO,eAAe,CAAC;IAC3B,CAAC;IAJqB,0BAAc,iBAInC,CAAA;IAEM,KAAK,UAAU,SAAS,CAAC,WAAmB,EAAE,MAAkB;QACnE,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC/B,IAAI,EAAE,GAAmB,MAAM,CAAC,GAAG,CAAC;QACpC,IAAI,KAAK,GAAmB,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACnD,IAAI,UAAU,GAAe,MAAM,iBAAiB,CAAC,OAAO,CAAC,EAAC,GAAG,EAAE,KAAK,EAAC,CAAE,CAAC;QAC5E,OAAO,UAAU,CAAC;IACtB,CAAC;IANqB,qBAAS,YAM9B,CAAA;IAEM,KAAK,UAAU,WAAW,CAAC,WAAmB,EAAE,MAAkB;QACrE,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC/B,IAAI,EAAE,GAAmB,MAAM,CAAC,GAAG,CAAC;QACpC,IAAI,KAAK,GAAmB,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACnD,OAAO,MAAM,CAAC,GAAG,CAAC;QAClB,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC7B,IAAI,MAAM,CAAC,UAAU,IAAI,SAAS;YAC9B,iBAAiB,CAAC,SAAS,CAAC,EAAC,GAAG,EAAE,KAAK,EAAC,EAAE,EAAC,IAAI,EAAE,EAAC,UAAU,EAAW,MAAM,CAAC,UAAW,EAAC,EAAC,CAAC,CAAC;;YAE7F,iBAAiB,CAAC,SAAS,CAAC,EAAC,GAAG,EAAE,KAAK,EAAC,EAAE,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC,CAAC;IAClE,CAAC;IAVqB,uBAAW,cAUhC,CAAA;AAEL,CAAC,EA/FgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QA+F3B"}
|
{"version":3,"file":"useMongo.js","sourceRoot":"","sources":["useMongo.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AAEjC,IAAiB,WAAW,CA+F3B;AA/FD,WAAiB,WAAW;IAMxB,IAAI,kBAAoC,CAAC;IACzC,IAAI,gBAAkC,CAAC;IACvC,IAAI,iBAAmC,CAAC;IACxC,IAAI,KAAK,GAAW,EAAE,CAAC;IAEvB,SAAS,SAAS,CAAC,QAAgB;QAC/B,IAAI,QAAQ,IAAI,OAAO;YACnB,KAAK,GAAG,4BAA4B,CAAC;QACzC,IAAI,QAAQ,IAAI,QAAQ;YACpB,KAAK,GAAG,8HAA8H,CAAC;IAC/I,CAAC;IAEM,KAAK,UAAU,SAAS,CAAC,QAAgB;QAC5C,SAAS,CAAC,QAAQ,CAAC,CAAC;QACpB,IAAI,OAAO,GAA6B,EAAE,eAAe,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC;QAC5F,IAAI,WAAW,GAAsB,IAAI,KAAK,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC3E,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;QAC5B,kBAAkB,GAAG,WAAW,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACtE,gBAAgB,GAAG,WAAW,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAClE,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,kBAAkB,IAAI,SAAS,CAAC,CAAC;IAC1E,CAAC;IARqB,qBAAS,YAQ9B,CAAA;IAEM,KAAK,UAAU,iBAAiB,CAAC,WAAmB;QACvD,IAAI,WAAW,IAAI,UAAU;YACzB,iBAAiB,GAAG,kBAAkB,CAAC;aACtC,IAAI,WAAW,IAAI,QAAQ;YAC5B,iBAAiB,GAAG,gBAAgB,CAAC;IAC7C,CAAC;IALqB,6BAAiB,oBAKtC,CAAA;IAED,SAAgB,WAAW,CAAC,WAAmB,EAAE,MAAkB;QAC/D,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC9B,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IAJe,uBAAW,cAI1B,CAAA;IAEM,KAAK,UAAU,YAAY,CAAC,WAAmB,EAAE,MAAoB;QACxE,QAAQ,CAAC;QACT,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;QAC1C,iGAAiG;QACjG,MAAM,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,MAAM,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IARqB,wBAAY,eAQjC,CAAA;IAEM,KAAK,UAAU,WAAW,CAAC,WAAmB,EAAE,MAAkB;QACrE,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC/B,IAAI,MAAM,CAAC,GAAG,IAAI,SAAS,EAAE;YACzB,IAAI,EAAE,GAAmB,MAAM,CAAC,GAAG,CAAC;YACpC,IAAI,KAAK,GAAmB,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YACnD,MAAM,iBAAiB,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;SACvD;aACI;YACD,MAAM,iBAAiB,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,EAAC,CAAC,CAAC;SAC1D;IACL,CAAC;IAVqB,uBAAW,cAUhC,CAAA;IAEM,KAAK,UAAU,YAAY,CAAC,WAAmB;QAClD,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC/B,IAAI,UAAU,GAAW,MAAM,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC3D,OAAO,UAAU,CAAC;IACtB,CAAC;IAJqB,wBAAY,eAIjC,CAAA;IAEM,KAAK,UAAU,cAAc,CAAC,WAAmB;QACpD,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC/B,IAAI,eAAe,GAAiB,MAAM,iBAAiB,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;QACnG,OAAO,eAAe,CAAC;IAC3B,CAAC;IAJqB,0BAAc,iBAInC,CAAA;IAEM,KAAK,UAAU,SAAS,CAAC,WAAmB,EAAE,MAAkB;QACnE,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC/B,IAAI,EAAE,GAAmB,MAAM,CAAC,GAAG,CAAC;QACpC,IAAI,KAAK,GAAmB,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACnD,IAAI,UAAU,GAAe,MAAM,iBAAiB,CAAC,OAAO,CAAC,EAAC,GAAG,EAAE,KAAK,EAAC,CAAE,CAAC;QAC5E,OAAO,UAAU,CAAC;IACtB,CAAC;IANqB,qBAAS,YAM9B,CAAA;IAEM,KAAK,UAAU,WAAW,CAAC,WAAmB,EAAE,MAAkB;QACrE,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC/B,IAAI,EAAE,GAAmB,MAAM,CAAC,GAAG,CAAC;QACpC,IAAI,KAAK,GAAmB,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACnD,OAAO,MAAM,CAAC,GAAG,CAAC;QAClB,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC7B,IAAI,MAAM,CAAC,UAAU,IAAI,SAAS;YAC9B,iBAAiB,CAAC,SAAS,CAAC,EAAC,GAAG,EAAE,KAAK,EAAC,EAAE,EAAC,IAAI,EAAE,EAAC,UAAU,EAAW,MAAM,CAAC,UAAW,EAAC,EAAC,CAAC,CAAC;;YAE7F,iBAAiB,CAAC,SAAS,CAAC,EAAC,GAAG,EAAE,KAAK,EAAC,EAAE,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC,CAAC;IAClE,CAAC;IAVqB,uBAAW,cAUhC,CAAA;AAEL,CAAC,EA/FgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QA+F3B"}
|
||||||
|
|
@ -1,98 +1,98 @@
|
||||||
import * as Mongo from "mongodb";
|
import * as Mongo from "mongodb";
|
||||||
|
|
||||||
export namespace handleMongo {
|
export namespace handleMongo {
|
||||||
|
|
||||||
export interface ProduktObj {
|
export interface ProduktObj {
|
||||||
[type: string]: string | string[] | number | undefined;
|
[type: string]: string | string[] | number | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
let productsCollection: Mongo.Collection;
|
let productsCollection: Mongo.Collection;
|
||||||
let ordersCollection: Mongo.Collection;
|
let ordersCollection: Mongo.Collection;
|
||||||
let currentCollection: Mongo.Collection;
|
let currentCollection: Mongo.Collection;
|
||||||
let dbUrl: string = "";
|
let dbUrl: string = "";
|
||||||
|
|
||||||
function chooseUrl(_whichDB: string): void {
|
function chooseUrl(_whichDB: string): void {
|
||||||
if (_whichDB == "local")
|
if (_whichDB == "local")
|
||||||
dbUrl = "mongodb://127.0.0.1:27017/";
|
dbUrl = "mongodb://127.0.0.1:27017/";
|
||||||
if (_whichDB == "remote")
|
if (_whichDB == "remote")
|
||||||
dbUrl = "mongodb+srv://AdminForUse:XV8MXEdBYuwXtQnc@ichstudieremitgis-jfrz9.mongodb.net/IchStudiereMitGiS?retryWrites=true&w=majority";
|
dbUrl = "mongodb+srv://AdminForUse:XV8MXEdBYuwXtQnc@ichstudieremitgis-jfrz9.mongodb.net/IchStudiereMitGiS?retryWrites=true&w=majority";
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function connectDB(_whichDB: string): Promise<void> { // _url: string
|
export async function connectDB(_whichDB: string): Promise<void> { // _url: string
|
||||||
chooseUrl(_whichDB);
|
chooseUrl(_whichDB);
|
||||||
let options: Mongo.MongoClientOptions = { useNewUrlParser: true, useUnifiedTopology: true };
|
let options: Mongo.MongoClientOptions = { useNewUrlParser: true, useUnifiedTopology: true };
|
||||||
let mongoClient: Mongo.MongoClient = new Mongo.MongoClient(dbUrl, options);
|
let mongoClient: Mongo.MongoClient = new Mongo.MongoClient(dbUrl, options);
|
||||||
await mongoClient.connect();
|
await mongoClient.connect();
|
||||||
productsCollection = mongoClient.db("NiceIce").collection("Products");
|
productsCollection = mongoClient.db("NiceIce").collection("Products");
|
||||||
ordersCollection = mongoClient.db("NiceIce").collection("Orders");
|
ordersCollection = mongoClient.db("NiceIce").collection("Orders");
|
||||||
console.log("Database connection: ", productsCollection != undefined);
|
console.log("Database connection: ", productsCollection != undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function connectCollection(_collection: string): Promise<void> {
|
export async function connectCollection(_collection: string): Promise<void> {
|
||||||
if (_collection == "products")
|
if (_collection == "products")
|
||||||
currentCollection = productsCollection;
|
currentCollection = productsCollection;
|
||||||
else if (_collection == "orders")
|
else if (_collection == "orders")
|
||||||
currentCollection = ordersCollection;
|
currentCollection = ordersCollection;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function insertEntry(_collection: string, _order: ProduktObj): void {
|
export function insertEntry(_collection: string, _order: ProduktObj): void {
|
||||||
connectCollection(_collection);
|
connectCollection(_collection);
|
||||||
console.log("_order", _order);
|
console.log("_order", _order);
|
||||||
currentCollection.insertOne(_order);
|
currentCollection.insertOne(_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function insertObject(_collection: string, _order: ProduktObj[]): Promise<void> {
|
export async function insertObject(_collection: string, _order: ProduktObj[]): Promise<void> {
|
||||||
debugger;
|
debugger;
|
||||||
connectCollection(_collection);
|
connectCollection(_collection);
|
||||||
console.log("this _collection: ", _order);
|
console.log("this _collection: ", _order);
|
||||||
//let replacement: ProduktObj[] = JSON.parse(JSON.stringify(_order).split("_id").join("old_id"));
|
//let replacement: ProduktObj[] = JSON.parse(JSON.stringify(_order).split("_id").join("old_id"));
|
||||||
await currentCollection.insert(_order[0]);
|
await currentCollection.insert(_order[0]);
|
||||||
await currentCollection.insert(_order[1]);
|
await currentCollection.insert(_order[1]);
|
||||||
console.log("_collection: ", _order);
|
console.log("_collection: ", _order);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function removeEntry(_collection: string, _entry: ProduktObj): Promise<void> {
|
export async function removeEntry(_collection: string, _entry: ProduktObj): Promise<void> {
|
||||||
connectCollection(_collection);
|
connectCollection(_collection);
|
||||||
if (!(_entry.id == undefined)) {
|
if (_entry._id != undefined) {
|
||||||
let id: string = <string>_entry._id;
|
let id: string = <string>_entry._id;
|
||||||
let objID: Mongo.ObjectID = new Mongo.ObjectID(id);
|
let objID: Mongo.ObjectID = new Mongo.ObjectID(id);
|
||||||
await currentCollection.deleteOne({ "_id": objID });
|
await currentCollection.deleteOne({ "_id": objID });
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
await currentCollection.deleteMany({ "Nr": _entry.Nr});
|
await currentCollection.deleteMany({ "Nr": _entry.Nr});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function countEntries(_collection: string): Promise<number> {
|
export async function countEntries(_collection: string): Promise<number> {
|
||||||
connectCollection(_collection);
|
connectCollection(_collection);
|
||||||
let entryCount: number = await currentCollection.count({});
|
let entryCount: number = await currentCollection.count({});
|
||||||
return entryCount;
|
return entryCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function findCollection(_collection: string): Promise<ProduktObj[]> {
|
export async function findCollection(_collection: string): Promise<ProduktObj[]> {
|
||||||
connectCollection(_collection);
|
connectCollection(_collection);
|
||||||
let foundCollection: ProduktObj[] = await currentCollection.find().sort({ category: 1 }).toArray();
|
let foundCollection: ProduktObj[] = await currentCollection.find().sort({ category: 1 }).toArray();
|
||||||
return foundCollection;
|
return foundCollection;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function findEntry(_collection: string, _entry: ProduktObj): Promise<ProduktObj> {
|
export async function findEntry(_collection: string, _entry: ProduktObj): Promise<ProduktObj> {
|
||||||
connectCollection(_collection);
|
connectCollection(_collection);
|
||||||
let id: string = <string>_entry._id;
|
let id: string = <string>_entry._id;
|
||||||
let objID: Mongo.ObjectID = new Mongo.ObjectID(id);
|
let objID: Mongo.ObjectID = new Mongo.ObjectID(id);
|
||||||
let foundEntry: ProduktObj = await currentCollection.findOne({_id: objID})!;
|
let foundEntry: ProduktObj = await currentCollection.findOne({_id: objID})!;
|
||||||
return foundEntry;
|
return foundEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function updateEntry(_collection: string, _entry: ProduktObj): Promise<void> {
|
export async function updateEntry(_collection: string, _entry: ProduktObj): Promise<void> {
|
||||||
connectCollection(_collection);
|
connectCollection(_collection);
|
||||||
let id: string = <string>_entry._id;
|
let id: string = <string>_entry._id;
|
||||||
let objID: Mongo.ObjectID = new Mongo.ObjectID(id);
|
let objID: Mongo.ObjectID = new Mongo.ObjectID(id);
|
||||||
delete _entry._id;
|
delete _entry._id;
|
||||||
console.log("entry", _entry);
|
console.log("entry", _entry);
|
||||||
if (_entry.orderCount != undefined)
|
if (_entry.orderCount != undefined)
|
||||||
currentCollection.updateOne({_id: objID}, {$set: {orderCount: (<number>_entry.orderCount)}});
|
currentCollection.updateOne({_id: objID}, {$set: {orderCount: (<number>_entry.orderCount)}});
|
||||||
else
|
else
|
||||||
currentCollection.updateOne({_id: objID}, {$set: _entry});
|
currentCollection.updateOne({_id: objID}, {$set: _entry});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,118 +1,118 @@
|
||||||
import * as Http from "http";
|
import * as Http from "http";
|
||||||
import * as url from "url";
|
import * as url from "url";
|
||||||
import { ParsedUrlQuery } from "querystring";
|
import { ParsedUrlQuery } from "querystring";
|
||||||
import { handleMongo as useMongo } from "./useMongo";
|
import { handleMongo as useMongo } from "./useMongo";
|
||||||
|
|
||||||
//mongodb + srv://AdminForUse:XV8MXEdBYuwXtQnc@ichstudieremitgis-jfrz9.mongodb.net/IchStudiereMitGiS?retryWrites=true&w=majority
|
//mongodb + srv://AdminForUse:XV8MXEdBYuwXtQnc@ichstudieremitgis-jfrz9.mongodb.net/IchStudiereMitGiS?retryWrites=true&w=majority
|
||||||
//http://localhost:8100
|
//http://localhost:8100
|
||||||
//https://theoneandgis.herokuapp.com
|
//https://theoneandgis.herokuapp.com
|
||||||
|
|
||||||
export namespace ServerSide {
|
export namespace ServerSide {
|
||||||
|
|
||||||
console.log("Starting server");
|
console.log("Starting server");
|
||||||
let port: number = Number(process.env.PORT);
|
let port: number = Number(process.env.PORT);
|
||||||
if (!port)
|
if (!port)
|
||||||
port = 8100;
|
port = 8100;
|
||||||
|
|
||||||
let server: Http.Server = Http.createServer();
|
let server: Http.Server = Http.createServer();
|
||||||
server.addListener("request", handleRequest);
|
server.addListener("request", handleRequest);
|
||||||
server.addListener("listening", handleListen);
|
server.addListener("listening", handleListen);
|
||||||
server.listen(port);
|
server.listen(port);
|
||||||
|
|
||||||
let myArgs: string[] = process.argv.slice(2);
|
let myArgs: string[] = process.argv.slice(2);
|
||||||
let whichDB: string = myArgs[0];
|
let whichDB: string = myArgs[0];
|
||||||
useMongo.connectDB(whichDB);
|
useMongo.connectDB(whichDB);
|
||||||
|
|
||||||
function handleListen(): void {
|
function handleListen(): void {
|
||||||
console.log("Your server Listening");
|
console.log("Your server Listening");
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleRequest(_request: Http.IncomingMessage, _response: Http.ServerResponse): Promise<void> {
|
async function handleRequest(_request: Http.IncomingMessage, _response: Http.ServerResponse): Promise<void> {
|
||||||
console.log("http://web-url" + `${_request.url}`); // Hier müsste ggf. auch zu Heruko gewechselt werden, wenn es von Bedeutung ist
|
console.log("http://web-url" + `${_request.url}`); // Hier müsste ggf. auch zu Heruko gewechselt werden, wenn es von Bedeutung ist
|
||||||
|
|
||||||
let myData: url.UrlWithParsedQuery = url.parse(`${_request.url}`, true);
|
let myData: url.UrlWithParsedQuery = url.parse(`${_request.url}`, true);
|
||||||
let myQuery: ParsedUrlQuery = myData.query;
|
let myQuery: ParsedUrlQuery = myData.query;
|
||||||
console.log("myQuery", myQuery);
|
console.log("myQuery", myQuery);
|
||||||
let myQueryObject: useMongo.ProduktObj = myQuery;
|
let myQueryObject: useMongo.ProduktObj = myQuery;
|
||||||
let myQueryString: string = JSON.stringify(myQuery);
|
let myQueryString: string = JSON.stringify(myQuery);
|
||||||
let responseUrlString: string = <string>_request.url;
|
let responseUrlString: string = <string>_request.url;
|
||||||
//let splitString: string = (<string>_request.url).slice(0, 9);
|
//let splitString: string = (<string>_request.url).slice(0, 9);
|
||||||
let post: useMongo.ProduktObj = {};
|
let post: useMongo.ProduktObj = {};
|
||||||
|
|
||||||
_response.setHeader("content-type", "application/json");
|
_response.setHeader("content-type", "application/json");
|
||||||
_response.setHeader("Access-Control-Allow-Origin", "*");
|
_response.setHeader("Access-Control-Allow-Origin", "*");
|
||||||
console.log("_request.method", _request.method);
|
console.log("_request.method", _request.method);
|
||||||
if (_request.method == "POST") {
|
if (_request.method == "POST") {
|
||||||
let body: string = "";
|
let body: string = "";
|
||||||
_request.on("data", data => {
|
_request.on("data", data => {
|
||||||
body += data;
|
body += data;
|
||||||
});
|
});
|
||||||
_request.on("end", async () => {
|
_request.on("end", async () => {
|
||||||
post = JSON.parse(body);
|
post = JSON.parse(body);
|
||||||
console.log("post: ", post);
|
console.log("post: ", post);
|
||||||
post = await JSON.parse(body);
|
post = await JSON.parse(body);
|
||||||
responseUrlString = "/mongo/orders/insertEntry";
|
responseUrlString = "/mongo/orders/insertEntry";
|
||||||
handleAction(_request, _response, myQueryString, responseUrlString, post);
|
handleAction(_request, _response, myQueryString, responseUrlString, post);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
await handleAction(_request, _response, myQueryString, responseUrlString, myQueryObject);
|
await handleAction(_request, _response, myQueryString, responseUrlString, myQueryObject);
|
||||||
_response.end();
|
_response.end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleAction(_request: Http.IncomingMessage, _response: Http.ServerResponse, _myQueryString: string, _responseUrlString: string, _orderObj: useMongo.ProduktObj): Promise<void> {
|
async function handleAction(_request: Http.IncomingMessage, _response: Http.ServerResponse, _myQueryString: string, _responseUrlString: string, _orderObj: useMongo.ProduktObj): Promise<void> {
|
||||||
console.log("handleAction", _orderObj);
|
console.log("handleAction", _orderObj);
|
||||||
let whichCollection: string = "";
|
let whichCollection: string = "";
|
||||||
if ( _responseUrlString.includes("/products") ) {
|
if ( _responseUrlString.includes("/products") ) {
|
||||||
whichCollection = "products";
|
whichCollection = "products";
|
||||||
}
|
}
|
||||||
if (_responseUrlString.includes("/orders")) {
|
if (_responseUrlString.includes("/orders")) {
|
||||||
whichCollection = "orders";
|
whichCollection = "orders";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( _responseUrlString.includes("/mongo") ) {
|
if ( _responseUrlString.includes("/mongo") ) {
|
||||||
await mongoAction(_response, _myQueryString, whichCollection, _responseUrlString, _orderObj);
|
await mongoAction(_response, _myQueryString, whichCollection, _responseUrlString, _orderObj);
|
||||||
}
|
}
|
||||||
console.log("end");
|
console.log("end");
|
||||||
_response.end();
|
_response.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function mongoAction(_response: Http.ServerResponse, _query: string, _whichCollection: string, _command: string, _orderObj: useMongo.ProduktObj): Promise<void> {
|
async function mongoAction(_response: Http.ServerResponse, _query: string, _whichCollection: string, _command: string, _orderObj: useMongo.ProduktObj): Promise<void> {
|
||||||
let myJsonObj: useMongo.ProduktObj = JSON.parse(_query);
|
let myJsonObj: useMongo.ProduktObj = JSON.parse(_query);
|
||||||
console.log("mongoAction", _orderObj);
|
console.log("mongoAction", _orderObj);
|
||||||
|
|
||||||
if (_command.includes("/findCollection")) {
|
if (_command.includes("/findCollection")) {
|
||||||
let value: useMongo.ProduktObj[] = await useMongo.findCollection(_whichCollection);
|
let value: useMongo.ProduktObj[] = await useMongo.findCollection(_whichCollection);
|
||||||
let handleThis: string = JSON.stringify(value);
|
let handleThis: string = JSON.stringify(value);
|
||||||
console.log("handleThis", handleThis);
|
console.log("handleThis", handleThis);
|
||||||
_response.write(handleThis);
|
_response.write(handleThis);
|
||||||
}
|
}
|
||||||
if (_command.includes("/findEntry")) {
|
if (_command.includes("/findEntry")) {
|
||||||
let foundEntry: useMongo.ProduktObj = await useMongo.findEntry(_whichCollection, _orderObj);
|
let foundEntry: useMongo.ProduktObj = await useMongo.findEntry(_whichCollection, _orderObj);
|
||||||
console.log("foundEntry", foundEntry);
|
console.log("foundEntry", foundEntry);
|
||||||
_response.write(JSON.stringify(foundEntry));
|
_response.write(JSON.stringify(foundEntry));
|
||||||
}
|
}
|
||||||
if (_command.includes("/updateEntry")) {
|
if (_command.includes("/updateEntry")) {
|
||||||
useMongo.updateEntry(_whichCollection, _orderObj);
|
useMongo.updateEntry(_whichCollection, _orderObj);
|
||||||
_response.write(_query); // technically no response
|
_response.write(_query); // technically no response
|
||||||
}
|
}
|
||||||
/*if (_command.includes("/insertObject")) {
|
/*if (_command.includes("/insertObject")) {
|
||||||
await useMongo.insertObject(_whichCollection, _orderObj);
|
await useMongo.insertObject(_whichCollection, _orderObj);
|
||||||
//_response.write(_query); // technically no response
|
//_response.write(_query); // technically no response
|
||||||
}*/
|
}*/
|
||||||
if (_command.includes("/insertEntry")) {
|
if (_command.includes("/insertEntry")) {
|
||||||
useMongo.insertEntry(_whichCollection, _orderObj); //myJsonObj
|
useMongo.insertEntry(_whichCollection, _orderObj); //myJsonObj
|
||||||
_response.write(_query); // technically no response
|
_response.write(_query); // technically no response
|
||||||
}
|
}
|
||||||
if (_command.includes("/removeEntry")) {
|
if (_command.includes("/removeEntry")) {
|
||||||
await useMongo.removeEntry(_whichCollection, myJsonObj);
|
await useMongo.removeEntry(_whichCollection, myJsonObj);
|
||||||
_response.write(`{"":""}`); // technically no response
|
_response.write(`{"":""}`); // technically no response
|
||||||
}
|
}
|
||||||
if (_command.includes("/countEntries")) {
|
if (_command.includes("/countEntries")) {
|
||||||
let countNumber: number = await useMongo.countEntries(_whichCollection);
|
let countNumber: number = await useMongo.countEntries(_whichCollection);
|
||||||
_response.write(`{"orderID":"${countNumber}"}`);
|
_response.write(`{"orderID":"${countNumber}"}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
var frontShop;
|
var frontShop;
|
||||||
(function (frontShop) {
|
(function (frontShop) {
|
||||||
let serverUrl = "https://theoneandgis.herokuapp.com";
|
let serverUrl = "http://localhost:8100";
|
||||||
init();
|
init();
|
||||||
async function init() {
|
async function init() {
|
||||||
await getOrderList();
|
await getOrderList();
|
||||||
|
|
@ -27,37 +27,37 @@ var frontShop;
|
||||||
previousNr = iterator.Nr;
|
previousNr = iterator.Nr;
|
||||||
}
|
}
|
||||||
if (!(iterator.vorname == undefined)) {
|
if (!(iterator.vorname == undefined)) {
|
||||||
table.innerHTML = `
|
table.innerHTML = `
|
||||||
<tr>
|
<tr>
|
||||||
<th>Bestellung</th>
|
<th>Bestellung</th>
|
||||||
<td>Nr. ${iterator.Nr}</td>
|
<td>Nr. ${iterator.Nr}</td>
|
||||||
<tr>
|
<tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Preis</th>
|
<th>Preis</th>
|
||||||
<td>${iterator.orderPrice} €</td>
|
<td>${iterator.orderPrice} €</td>
|
||||||
</tr>
|
</tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<td>${iterator.vorname} ${iterator.nachname}</td>
|
<td>${iterator.vorname} ${iterator.nachname}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Straße</th>
|
<th>Straße</th>
|
||||||
<td>${iterator.straße}</td>
|
<td>${iterator.straße}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Wohnort</th>
|
<th>Wohnort</th>
|
||||||
<td>${iterator.postleitzahl}</td>
|
<td>${iterator.postleitzahl}</td>
|
||||||
</tr>
|
</tr>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
table.innerHTML += `
|
table.innerHTML += `
|
||||||
<tr>
|
<tr>
|
||||||
<th>Bestellung</th>
|
<th>Bestellung</th>
|
||||||
<td>Nr. ${iterator.Nr}</td>
|
<td>Nr. ${iterator.Nr}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Preis</th>
|
<th>Preis</th>
|
||||||
<td>${iterator.productPrice}€</td>
|
<td>${iterator.productPrice}€</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
for (const key in iterator) {
|
for (const key in iterator) {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
|
|
@ -97,8 +97,8 @@ var frontShop;
|
||||||
document.querySelector("#tableDiv").append(table);
|
document.querySelector("#tableDiv").append(table);
|
||||||
let div = document.createElement("div");
|
let div = document.createElement("div");
|
||||||
div.classList.add("buttonDiv");
|
div.classList.add("buttonDiv");
|
||||||
div.innerHTML = `
|
div.innerHTML = `
|
||||||
<button class="removeOne" content=${JSON.stringify(iterator._id)}>▲ Entfernen ▲</button>
|
<button class="removeOne" content=${JSON.stringify(iterator._id)}>▲ Entfernen ▲</button>
|
||||||
<button class="editOne" content=${JSON.stringify(iterator)}>▲ Bearbeiten ▲</button> `;
|
<button class="editOne" content=${JSON.stringify(iterator)}>▲ Bearbeiten ▲</button> `;
|
||||||
document.querySelector("#tableDiv").append(div);
|
document.querySelector("#tableDiv").append(div);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,201 +1,201 @@
|
||||||
|
|
||||||
namespace frontShop {
|
namespace frontShop {
|
||||||
|
|
||||||
interface Products {
|
interface Products {
|
||||||
[type: string]: string | number;
|
[type: string]: string | number;
|
||||||
}
|
}
|
||||||
|
|
||||||
let serverUrl: string = "https://theoneandgis.herokuapp.com";
|
let serverUrl: string = "http://localhost:8100";
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
async function init(): Promise<void> {
|
async function init(): Promise<void> {
|
||||||
await getOrderList();
|
await getOrderList();
|
||||||
addListening();
|
addListening();
|
||||||
fixCartCount();
|
fixCartCount();
|
||||||
}
|
}
|
||||||
async function getOrderList(): Promise<void> {
|
async function getOrderList(): Promise<void> {
|
||||||
let url: string = serverUrl + "/mongo/orders/findCollection" + "?";
|
let url: string = serverUrl + "/mongo/orders/findCollection" + "?";
|
||||||
let response: Response = await fetch(url);
|
let response: Response = await fetch(url);
|
||||||
let jsonResponse: Products[] = await response.json();
|
let jsonResponse: Products[] = await response.json();
|
||||||
let previousNr: number = -1;
|
let previousNr: number = -1;
|
||||||
//(<HTMLDivElement>document.querySelector("#tableDiv")).innerHTML = JSON.stringify(jsonResponse);
|
//(<HTMLDivElement>document.querySelector("#tableDiv")).innerHTML = JSON.stringify(jsonResponse);
|
||||||
|
|
||||||
for (const iterator of jsonResponse) {
|
for (const iterator of jsonResponse) {
|
||||||
if (iterator.orderCount != undefined)
|
if (iterator.orderCount != undefined)
|
||||||
continue;
|
continue;
|
||||||
let table: HTMLTableElement = document.createElement("table");
|
let table: HTMLTableElement = document.createElement("table");
|
||||||
|
|
||||||
if (previousNr != iterator.Nr) {
|
if (previousNr != iterator.Nr) {
|
||||||
let button: HTMLButtonElement = document.createElement("button");
|
let button: HTMLButtonElement = document.createElement("button");
|
||||||
button.setAttribute("content", `${iterator.Nr}`);
|
button.setAttribute("content", `${iterator.Nr}`);
|
||||||
button.classList.add("removeButton");
|
button.classList.add("removeButton");
|
||||||
button.innerHTML = `Bestellung Nr. ${iterator.Nr} entfernen`;
|
button.innerHTML = `Bestellung Nr. ${iterator.Nr} entfernen`;
|
||||||
(<HTMLDivElement>document.querySelector("#tableDiv")).append(button);
|
(<HTMLDivElement>document.querySelector("#tableDiv")).append(button);
|
||||||
previousNr = <number>iterator.Nr;
|
previousNr = <number>iterator.Nr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!(iterator.vorname == undefined)) {
|
if (!(iterator.vorname == undefined)) {
|
||||||
table.innerHTML = `
|
table.innerHTML = `
|
||||||
<tr>
|
<tr>
|
||||||
<th>Bestellung</th>
|
<th>Bestellung</th>
|
||||||
<td>Nr. ${iterator.Nr}</td>
|
<td>Nr. ${iterator.Nr}</td>
|
||||||
<tr>
|
<tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Preis</th>
|
<th>Preis</th>
|
||||||
<td>${iterator.orderPrice} €</td>
|
<td>${iterator.orderPrice} €</td>
|
||||||
</tr>
|
</tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<td>${iterator.vorname} ${iterator.nachname}</td>
|
<td>${iterator.vorname} ${iterator.nachname}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Straße</th>
|
<th>Straße</th>
|
||||||
<td>${iterator.straße}</td>
|
<td>${iterator.straße}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Wohnort</th>
|
<th>Wohnort</th>
|
||||||
<td>${iterator.postleitzahl}</td>
|
<td>${iterator.postleitzahl}</td>
|
||||||
</tr>
|
</tr>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
table.innerHTML += `
|
table.innerHTML += `
|
||||||
<tr>
|
<tr>
|
||||||
<th>Bestellung</th>
|
<th>Bestellung</th>
|
||||||
<td>Nr. ${iterator.Nr}</td>
|
<td>Nr. ${iterator.Nr}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Preis</th>
|
<th>Preis</th>
|
||||||
<td>${iterator.productPrice}€</td>
|
<td>${iterator.productPrice}€</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
for (const key in iterator) {
|
for (const key in iterator) {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case ("container"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.container}</td></tr>`;
|
case ("container"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.container}</td></tr>`;
|
||||||
break;
|
break;
|
||||||
case ("flavour1"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.flavour1}</td></tr>`;
|
case ("flavour1"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.flavour1}</td></tr>`;
|
||||||
break;
|
break;
|
||||||
case ("flavour2"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.flavour2}</td></tr>`;
|
case ("flavour2"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.flavour2}</td></tr>`;
|
||||||
break;
|
break;
|
||||||
case ("flavour3"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.flavour3}</td></tr>`;
|
case ("flavour3"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.flavour3}</td></tr>`;
|
||||||
break;
|
break;
|
||||||
case ("flavour4"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.flavour4}</td></tr>`;
|
case ("flavour4"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.flavour4}</td></tr>`;
|
||||||
break;
|
break;
|
||||||
case ("flavour5"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.flavour5}</td></tr>`;
|
case ("flavour5"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.flavour5}</td></tr>`;
|
||||||
break;
|
break;
|
||||||
case ("flavour6"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.flavour6}</td></tr>`;
|
case ("flavour6"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.flavour6}</td></tr>`;
|
||||||
break;
|
break;
|
||||||
case ("topping1"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.topping1}</td></tr>`;
|
case ("topping1"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.topping1}</td></tr>`;
|
||||||
break;
|
break;
|
||||||
case ("topping2"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.topping2}</td></tr>`;
|
case ("topping2"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.topping2}</td></tr>`;
|
||||||
break;
|
break;
|
||||||
case ("topping3"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.topping3}</td></tr>`;
|
case ("topping3"): table.innerHTML += `<tr><th>${key}</th><td>${iterator.topping3}</td></tr>`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
(<HTMLDivElement>document.querySelector("#tableDiv")).append(table);
|
(<HTMLDivElement>document.querySelector("#tableDiv")).append(table);
|
||||||
let div: HTMLDivElement = document.createElement("div");
|
let div: HTMLDivElement = document.createElement("div");
|
||||||
div.classList.add("buttonDiv");
|
div.classList.add("buttonDiv");
|
||||||
div.innerHTML = `
|
div.innerHTML = `
|
||||||
<button class="removeOne" content=${JSON.stringify(iterator._id)}>▲ Entfernen ▲</button>
|
<button class="removeOne" content=${JSON.stringify(iterator._id)}>▲ Entfernen ▲</button>
|
||||||
<button class="editOne" content=${JSON.stringify(iterator)}>▲ Bearbeiten ▲</button> `;
|
<button class="editOne" content=${JSON.stringify(iterator)}>▲ Bearbeiten ▲</button> `;
|
||||||
(<HTMLDivElement>document.querySelector("#tableDiv")).append(div);
|
(<HTMLDivElement>document.querySelector("#tableDiv")).append(div);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function addListening(): void {
|
function addListening(): void {
|
||||||
let elementList: NodeListOf<Element> = document.querySelectorAll(".removeOne");
|
let elementList: NodeListOf<Element> = document.querySelectorAll(".removeOne");
|
||||||
for (const iterator of elementList)
|
for (const iterator of elementList)
|
||||||
iterator.addEventListener("click", removeDataID);
|
iterator.addEventListener("click", removeDataID);
|
||||||
let elementList2: NodeListOf<Element> = document.querySelectorAll(".removeButton");
|
let elementList2: NodeListOf<Element> = document.querySelectorAll(".removeButton");
|
||||||
for (const iterator of elementList2)
|
for (const iterator of elementList2)
|
||||||
iterator.addEventListener("click", removeDataNR);
|
iterator.addEventListener("click", removeDataNR);
|
||||||
let elementList3: NodeListOf<Element> = document.querySelectorAll(".editOne");
|
let elementList3: NodeListOf<Element> = document.querySelectorAll(".editOne");
|
||||||
for (const iterator of elementList3)
|
for (const iterator of elementList3)
|
||||||
iterator.addEventListener("click", editData);
|
iterator.addEventListener("click", editData);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function removeDataID(_event: Event): Promise<void> {
|
async function removeDataID(_event: Event): Promise<void> {
|
||||||
await removeData(_event, "id");
|
await removeData(_event, "id");
|
||||||
}
|
}
|
||||||
|
|
||||||
async function removeDataNR(_event: Event): Promise<void> {
|
async function removeDataNR(_event: Event): Promise<void> {
|
||||||
await removeData(_event, "order");
|
await removeData(_event, "order");
|
||||||
}
|
}
|
||||||
|
|
||||||
async function removeData(_event: Event, _parameter: string): Promise<void> {
|
async function removeData(_event: Event, _parameter: string): Promise<void> {
|
||||||
let target: HTMLElement = (<HTMLElement>_event.target);
|
let target: HTMLElement = (<HTMLElement>_event.target);
|
||||||
let query: string = "";
|
let query: string = "";
|
||||||
if (_parameter == "id")
|
if (_parameter == "id")
|
||||||
query = `_id=${target.getAttribute("content")!}`;
|
query = `_id=${target.getAttribute("content")!}`;
|
||||||
else if (_parameter == "order")
|
else if (_parameter == "order")
|
||||||
query = `Nr=${target.getAttribute("content")!}`;
|
query = `Nr=${target.getAttribute("content")!}`;
|
||||||
console.log(query);
|
console.log(query);
|
||||||
let url: string = serverUrl + "/mongo/orders/removeEntry/?" + query;
|
let url: string = serverUrl + "/mongo/orders/removeEntry/?" + query;
|
||||||
await fetch(url);
|
await fetch(url);
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
function editData(_event: Event): void {
|
function editData(_event: Event): void {
|
||||||
|
|
||||||
let target: HTMLElement = (<HTMLElement>_event.target);
|
let target: HTMLElement = (<HTMLElement>_event.target);
|
||||||
let obj: Products = JSON.parse(target.getAttribute("content")!);
|
let obj: Products = JSON.parse(target.getAttribute("content")!);
|
||||||
let div: HTMLDivElement = document.createElement("div");
|
let div: HTMLDivElement = document.createElement("div");
|
||||||
div.setAttribute("id", "formDiv");
|
div.setAttribute("id", "formDiv");
|
||||||
div.innerHTML = `<form id="myForm"></form>`;
|
div.innerHTML = `<form id="myForm"></form>`;
|
||||||
if ((<HTMLFormElement>document.querySelector("#myForm")) != null)
|
if ((<HTMLFormElement>document.querySelector("#myForm")) != null)
|
||||||
(<HTMLDivElement>document.querySelector("#tableDiv")).removeChild(div);
|
(<HTMLDivElement>document.querySelector("#tableDiv")).removeChild(div);
|
||||||
(<HTMLDivElement>document.querySelector("#tableDiv")).append(div);
|
(<HTMLDivElement>document.querySelector("#tableDiv")).append(div);
|
||||||
for (const iterator in obj) {
|
for (const iterator in obj) {
|
||||||
let label: HTMLLabelElement = document.createElement("label");
|
let label: HTMLLabelElement = document.createElement("label");
|
||||||
label.setAttribute("for", iterator);
|
label.setAttribute("for", iterator);
|
||||||
label.innerHTML = `${iterator}`;
|
label.innerHTML = `${iterator}`;
|
||||||
let input: HTMLInputElement = document.createElement("input");
|
let input: HTMLInputElement = document.createElement("input");
|
||||||
input.setAttribute("type", "text");
|
input.setAttribute("type", "text");
|
||||||
input.setAttribute("name", `${iterator}`);
|
input.setAttribute("name", `${iterator}`);
|
||||||
input.setAttribute("id", `${iterator}`);
|
input.setAttribute("id", `${iterator}`);
|
||||||
input.setAttribute("value", <string>obj[iterator]);
|
input.setAttribute("value", <string>obj[iterator]);
|
||||||
|
|
||||||
if (iterator == "_id") {
|
if (iterator == "_id") {
|
||||||
input.setAttribute("readonly", "");
|
input.setAttribute("readonly", "");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
input.setAttribute("onfocus", `if(this.value == "${<string>obj[iterator]}") this.value=""`);
|
input.setAttribute("onfocus", `if(this.value == "${<string>obj[iterator]}") this.value=""`);
|
||||||
input.setAttribute("onblur", `if(this.value == "") this.value="${<string>obj[iterator]}"`);
|
input.setAttribute("onblur", `if(this.value == "") this.value="${<string>obj[iterator]}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
(<HTMLLabelElement>document.querySelector("#myForm")).append(label);
|
(<HTMLLabelElement>document.querySelector("#myForm")).append(label);
|
||||||
(<HTMLInputElement>document.querySelector("#myForm")).append(input);
|
(<HTMLInputElement>document.querySelector("#myForm")).append(input);
|
||||||
}
|
}
|
||||||
let button: HTMLButtonElement = document.createElement("button");
|
let button: HTMLButtonElement = document.createElement("button");
|
||||||
button.setAttribute("id", "setAttribute");
|
button.setAttribute("id", "setAttribute");
|
||||||
button.innerHTML = "Bestätigung";
|
button.innerHTML = "Bestätigung";
|
||||||
button.addEventListener("click", confirmForm);
|
button.addEventListener("click", confirmForm);
|
||||||
(<HTMLInputElement>document.querySelector("#myForm")).append(button);
|
(<HTMLInputElement>document.querySelector("#myForm")).append(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function confirmForm(): Promise<void> {
|
async function confirmForm(): Promise<void> {
|
||||||
let formData: FormData = new FormData(document.forms[0]);
|
let formData: FormData = new FormData(document.forms[0]);
|
||||||
let url: string = "";
|
let url: string = "";
|
||||||
//tslint:disable-next-line: no-any
|
//tslint:disable-next-line: no-any
|
||||||
let query: URLSearchParams = new URLSearchParams(<any>formData);
|
let query: URLSearchParams = new URLSearchParams(<any>formData);
|
||||||
url = serverUrl + "/" + "mongo" + "/" + "orders" + "/" + "updateEntry" + "/" + "?" + query.toString();
|
url = serverUrl + "/" + "mongo" + "/" + "orders" + "/" + "updateEntry" + "/" + "?" + query.toString();
|
||||||
await fetch(url);
|
await fetch(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
function fixCartCount(): void {
|
function fixCartCount(): void {
|
||||||
if (localStorage["CartCount"] != undefined)
|
if (localStorage["CartCount"] != undefined)
|
||||||
localStorage.removeItem("CartCount");
|
localStorage.removeItem("CartCount");
|
||||||
let count: number = 0;
|
let count: number = 0;
|
||||||
for (const key in localStorage) {
|
for (const key in localStorage) {
|
||||||
if (key.includes("Combination")) {
|
if (key.includes("Combination")) {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
localStorage.setItem("CartCount", `${count}`);
|
localStorage.setItem("CartCount", `${count}`);
|
||||||
(<HTMLElement>document.querySelector("#warenkorb span")).innerHTML = `${localStorage.CartCount}`;
|
(<HTMLElement>document.querySelector("#warenkorb span")).innerHTML = `${localStorage.CartCount}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
|
|
||||||
namespace frontShop {
|
namespace frontShop {
|
||||||
|
|
||||||
fixCartCount();
|
fixCartCount();
|
||||||
|
|
||||||
function fixCartCount(): void {
|
function fixCartCount(): void {
|
||||||
if (localStorage["CartCount"] != undefined)
|
if (localStorage["CartCount"] != undefined)
|
||||||
localStorage.removeItem("CartCount");
|
localStorage.removeItem("CartCount");
|
||||||
let count: number = 0;
|
let count: number = 0;
|
||||||
for (const key in localStorage) {
|
for (const key in localStorage) {
|
||||||
if (key.includes("Combination")) {
|
if (key.includes("Combination")) {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
localStorage.setItem("CartCount", `${count}`);
|
localStorage.setItem("CartCount", `${count}`);
|
||||||
(<HTMLElement>document.querySelector("#warenkorb span")).innerHTML = `${localStorage.CartCount}`;
|
(<HTMLElement>document.querySelector("#warenkorb span")).innerHTML = `${localStorage.CartCount}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,29 +1,29 @@
|
||||||
// Konzept-Idee: https://www.w3schools.com/howto/howto_js_slideshow_gallery.asp
|
// Konzept-Idee: https://www.w3schools.com/howto/howto_js_slideshow_gallery.asp
|
||||||
|
|
||||||
let pictureNames: string[] = ["GiSBeLike.png", "ItWasAllAMystery.png", "JsTs.png", "LearningTsBeLike.png"];
|
let pictureNames: string[] = ["GiSBeLike.png", "ItWasAllAMystery.png", "JsTs.png", "LearningTsBeLike.png"];
|
||||||
|
|
||||||
document.querySelector("#buttonLeft")!.addEventListener("click", previousImage);
|
document.querySelector("#buttonLeft")!.addEventListener("click", previousImage);
|
||||||
document.querySelector("#buttonRight")!.addEventListener("click", nextImage);
|
document.querySelector("#buttonRight")!.addEventListener("click", nextImage);
|
||||||
|
|
||||||
function nextImage(): void {
|
function nextImage(): void {
|
||||||
changeImage(1);
|
changeImage(1);
|
||||||
}
|
}
|
||||||
function previousImage(): void {
|
function previousImage(): void {
|
||||||
changeImage(-1);
|
changeImage(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeImage(_vorzeichen: number): void {
|
function changeImage(_vorzeichen: number): void {
|
||||||
for (const iterator of pictureNames) {
|
for (const iterator of pictureNames) {
|
||||||
let currentImage: string = (<string>document.querySelector("#imageBox img")!.getAttribute("src"));
|
let currentImage: string = (<string>document.querySelector("#imageBox img")!.getAttribute("src"));
|
||||||
if (("images/" + iterator) == currentImage) {
|
if (("images/" + iterator) == currentImage) {
|
||||||
if (pictureNames.indexOf(iterator) == pictureNames.length - 1 && _vorzeichen == +1)
|
if (pictureNames.indexOf(iterator) == pictureNames.length - 1 && _vorzeichen == +1)
|
||||||
document.querySelector("#imageBox img")!.setAttribute("src", `images/${pictureNames[0]}`);
|
document.querySelector("#imageBox img")!.setAttribute("src", `images/${pictureNames[0]}`);
|
||||||
else if (pictureNames.indexOf(iterator) == 0 && _vorzeichen == -1)
|
else if (pictureNames.indexOf(iterator) == 0 && _vorzeichen == -1)
|
||||||
document.querySelector("#imageBox img")!.setAttribute("src", `images/${pictureNames[pictureNames.length - 1]}`);
|
document.querySelector("#imageBox img")!.setAttribute("src", `images/${pictureNames[pictureNames.length - 1]}`);
|
||||||
else
|
else
|
||||||
document.querySelector("#imageBox img")!.setAttribute("src", `images/${pictureNames[pictureNames.indexOf(iterator) + _vorzeichen]}`);
|
document.querySelector("#imageBox img")!.setAttribute("src", `images/${pictureNames[pictureNames.indexOf(iterator) + _vorzeichen]}`);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
var frontShop;
|
var frontShop;
|
||||||
(function (frontShop) {
|
(function (frontShop) {
|
||||||
let serverUrl = "https://theoneandgis.herokuapp.com";
|
let serverUrl = "http://localhost:8100";
|
||||||
let combinationArray = [];
|
let combinationArray = [];
|
||||||
let combinationCount = 0;
|
let combinationCount = 0;
|
||||||
let tisch = "";
|
let tisch = "";
|
||||||
|
|
@ -37,12 +37,12 @@ var frontShop;
|
||||||
function printProducts(_jsonResponse) {
|
function printProducts(_jsonResponse) {
|
||||||
for (const iterator of _jsonResponse) {
|
for (const iterator of _jsonResponse) {
|
||||||
delete iterator._id;
|
delete iterator._id;
|
||||||
document.querySelector(`#${iterator.category}Div`).innerHTML += `
|
document.querySelector(`#${iterator.category}Div`).innerHTML += `
|
||||||
<div class="${iterator.category}">
|
<div class="${iterator.category}">
|
||||||
<img src="images/${iterator.imageName}" alt="Product"/><br>
|
<img src="images/${iterator.imageName}" alt="Product"/><br>
|
||||||
<div class="product_name">${iterator.name.replace("-", " ")}</div>
|
<div class="product_name">${iterator.name.replace("-", " ")}</div>
|
||||||
<button class="product_button" content=${JSON.stringify(iterator)}>Hinzufügen</button>
|
<button class="product_button" content=${JSON.stringify(iterator)}>Hinzufügen</button>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -52,7 +52,7 @@ var frontShop;
|
||||||
iterator.addEventListener("click", addProduct);
|
iterator.addEventListener("click", addProduct);
|
||||||
document.querySelector("#id_table_0").addEventListener("click", addProduct);
|
document.querySelector("#id_table_0").addEventListener("click", addProduct);
|
||||||
document.querySelector("#nextButton").addEventListener("click", addCurrent);
|
document.querySelector("#nextButton").addEventListener("click", addCurrent);
|
||||||
document.querySelector("#sendButton").addEventListener("click", addToLocal);
|
document.querySelector("#sendButton").addEventListener("click", addOrderToLocal);
|
||||||
document.querySelector("#resetButton").addEventListener("click", clearCombination);
|
document.querySelector("#resetButton").addEventListener("click", clearCombination);
|
||||||
}
|
}
|
||||||
function addProduct(_event) {
|
function addProduct(_event) {
|
||||||
|
|
@ -128,10 +128,13 @@ var frontShop;
|
||||||
localStorage.setItem("CartCount", `${count}`);
|
localStorage.setItem("CartCount", `${count}`);
|
||||||
document.querySelector("#warenkorb span").innerHTML = `${localStorage.CartCount}`;
|
document.querySelector("#warenkorb span").innerHTML = `${localStorage.CartCount}`;
|
||||||
}
|
}
|
||||||
|
function addOrderToLocal() {
|
||||||
|
addToLocal();
|
||||||
|
window.location.href = "../html-warenkorb/warenkorb.html";
|
||||||
|
}
|
||||||
function addToLocal() {
|
function addToLocal() {
|
||||||
combinationArray.push(tisch);
|
combinationArray.push(tisch);
|
||||||
localStorage.setItem(`Combination${combinationCount}`, "[" + combinationArray.toLocaleString() + "]");
|
localStorage.setItem(`Combination${combinationCount}`, "[" + combinationArray.toLocaleString() + "]");
|
||||||
window.location.href = "../html-warenkorb/warenkorb.html";
|
|
||||||
}
|
}
|
||||||
function displayOrder() {
|
function displayOrder() {
|
||||||
document.querySelector("#displayContainer").innerHTML = "";
|
document.querySelector("#displayContainer").innerHTML = "";
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,166 +1,175 @@
|
||||||
|
|
||||||
namespace frontShop {
|
namespace frontShop {
|
||||||
|
|
||||||
let serverUrl: string = "https://theoneandgis.herokuapp.com";
|
let serverUrl: string = "http://localhost:8100";
|
||||||
let combinationArray: string[] = [];
|
let combinationArray: string[] = [];
|
||||||
let combinationCount: number = 0;
|
let combinationCount: number = 0;
|
||||||
let tisch: string = "";
|
let tisch: string = "";
|
||||||
|
|
||||||
interface Products {
|
interface Products {
|
||||||
[type: string]: string | number;
|
[type: string]: string | number;
|
||||||
}
|
}
|
||||||
|
|
||||||
// create page
|
// create page
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
async function init(): Promise<void> {
|
async function init(): Promise<void> {
|
||||||
printTopButtons();
|
printTopButtons();
|
||||||
await getProductList();
|
await getProductList();
|
||||||
addButtonFunctions();
|
addButtonFunctions();
|
||||||
fixCartCount();
|
fixCartCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
function printTopButtons(): void {
|
function printTopButtons(): void {
|
||||||
for (let i: number = 1; i <= 20; i++) {
|
for (let i: number = 1; i <= 20; i++) {
|
||||||
let button: HTMLButtonElement = document.createElement("button");
|
let button: HTMLButtonElement = document.createElement("button");
|
||||||
button.setAttribute("id", "id_table_" + `${i}`);
|
button.setAttribute("id", "id_table_" + `${i}`);
|
||||||
button.setAttribute("content", `{"tisch":"${i}"}`);
|
button.setAttribute("content", `{"tisch":"${i}"}`);
|
||||||
button.classList.add("product_button");
|
button.classList.add("product_button");
|
||||||
button.innerHTML = `Tisch: ${i}`;
|
button.innerHTML = `Tisch: ${i}`;
|
||||||
(<HTMLDivElement>document.querySelector("#topTable")).append(button);
|
|
||||||
}
|
(<HTMLDivElement>document.querySelector("#topTable")).append(button);
|
||||||
let button: HTMLButtonElement = document.createElement("button");
|
}
|
||||||
button.setAttribute("id", "id_table_0");
|
|
||||||
button.setAttribute("content", `{"tisch":"0"}`);
|
let button: HTMLButtonElement = document.createElement("button");
|
||||||
button.innerHTML = "Zum Mitnehmen!";
|
button.setAttribute("id", "id_table_0");
|
||||||
(<HTMLDivElement>document.querySelector("#topTake")).append(button);
|
button.setAttribute("content", `{"tisch":"0"}`);
|
||||||
}
|
button.innerHTML = "Zum Mitnehmen!";
|
||||||
|
|
||||||
async function getProductList(): Promise<void> {
|
(<HTMLDivElement>document.querySelector("#topTake")).append(button);
|
||||||
let url: string = serverUrl + "/mongo/products/findCollection" + "?";
|
}
|
||||||
let response: Response = await fetch(url);
|
|
||||||
let jsonResponse: Products[] = await response.json();
|
async function getProductList(): Promise<void> {
|
||||||
printProducts(jsonResponse);
|
let url: string = serverUrl + "/mongo/products/findCollection" + "?";
|
||||||
}
|
let response: Response = await fetch(url);
|
||||||
|
let jsonResponse: Products[] = await response.json();
|
||||||
function printProducts(_jsonResponse: Products[]): void {
|
printProducts(jsonResponse);
|
||||||
for (const iterator of _jsonResponse) {
|
}
|
||||||
delete iterator._id;
|
|
||||||
(<HTMLElement>document.querySelector(`#${iterator.category}Div`)).innerHTML += `
|
function printProducts(_jsonResponse: Products[]): void {
|
||||||
<div class="${iterator.category}">
|
for (const iterator of _jsonResponse) {
|
||||||
<img src="images/${iterator.imageName}" alt="Product"/><br>
|
delete iterator._id;
|
||||||
<div class="product_name">${(<string>iterator.name).replace("-", " ")}</div>
|
(<HTMLElement>document.querySelector(`#${iterator.category}Div`)).innerHTML += `
|
||||||
<button class="product_button" content=${JSON.stringify(iterator)}>Hinzufügen</button>
|
<div class="${iterator.category}">
|
||||||
</div>
|
<img src="images/${iterator.imageName}" alt="Product"/><br>
|
||||||
`;
|
<div class="product_name">${(<string>iterator.name).replace("-", " ")}</div>
|
||||||
}
|
<button class="product_button" content=${JSON.stringify(iterator)}>Hinzufügen</button>
|
||||||
}
|
</div>
|
||||||
|
`;
|
||||||
function addButtonFunctions(): void {
|
}
|
||||||
let buttonList: NodeListOf<HTMLButtonElement> = document.querySelectorAll(".product_button");
|
}
|
||||||
for (const iterator of buttonList)
|
|
||||||
iterator.addEventListener("click", addProduct);
|
function addButtonFunctions(): void {
|
||||||
|
let buttonList: NodeListOf<HTMLButtonElement> = document.querySelectorAll(".product_button");
|
||||||
(<HTMLButtonElement>document.querySelector("#id_table_0")).addEventListener("click", addProduct);
|
for (const iterator of buttonList)
|
||||||
(<HTMLButtonElement>document.querySelector("#nextButton")).addEventListener("click", addCurrent);
|
iterator.addEventListener("click", addProduct);
|
||||||
(<HTMLButtonElement>document.querySelector("#sendButton")).addEventListener("click", addToLocal);
|
|
||||||
(<HTMLButtonElement>document.querySelector("#resetButton")).addEventListener("click", clearCombination);
|
(<HTMLButtonElement>document.querySelector("#id_table_0")).addEventListener("click", addProduct);
|
||||||
}
|
(<HTMLButtonElement>document.querySelector("#nextButton")).addEventListener("click", addCurrent);
|
||||||
|
(<HTMLButtonElement>document.querySelector("#sendButton")).addEventListener("click", addOrderToLocal);
|
||||||
function addProduct(_event: Event): void {
|
(<HTMLButtonElement>document.querySelector("#resetButton")).addEventListener("click", clearCombination);
|
||||||
let target: HTMLElement = (<HTMLElement>_event.target);
|
}
|
||||||
let product: Products = JSON.parse(target.getAttribute("content")!);
|
|
||||||
if (product.tisch != undefined) {
|
function addProduct(_event: Event): void {
|
||||||
tisch = JSON.stringify(product);
|
let target: HTMLElement = (<HTMLElement>_event.target);
|
||||||
console.log(tisch);
|
let product: Products = JSON.parse(target.getAttribute("content")!);
|
||||||
}
|
if (product.tisch != undefined) {
|
||||||
|
tisch = JSON.stringify(product);
|
||||||
switch (product.category) {
|
console.log(tisch);
|
||||||
case "container": {
|
}
|
||||||
if (checkMaximum(1, product)) {
|
|
||||||
let index: number = combinationArray.indexOf(combinationArray.find(_element => _element = <string>product.category)!);
|
switch (product.category) {
|
||||||
combinationArray[index] = JSON.stringify(product);
|
case "container": {
|
||||||
displayOrder();
|
if (checkMaximum(1, product)) {
|
||||||
}
|
let index: number = combinationArray.indexOf(combinationArray.find(_element => _element = <string>product.category)!);
|
||||||
else {
|
combinationArray[index] = JSON.stringify(product);
|
||||||
combinationArray.push(JSON.stringify(product));
|
displayOrder();
|
||||||
displayOrder();
|
}
|
||||||
}
|
else {
|
||||||
break;
|
combinationArray.push(JSON.stringify(product));
|
||||||
}
|
displayOrder();
|
||||||
case "flavour": {
|
}
|
||||||
if (!checkMaximum(6, product)) {
|
break;
|
||||||
combinationArray.push(JSON.stringify(product));
|
}
|
||||||
displayOrder();
|
case "flavour": {
|
||||||
}
|
if (!checkMaximum(6, product)) {
|
||||||
break;
|
combinationArray.push(JSON.stringify(product));
|
||||||
}
|
displayOrder();
|
||||||
case "topping": {
|
}
|
||||||
if (!checkMaximum(3, product)) {
|
break;
|
||||||
combinationArray.push(JSON.stringify(product));
|
}
|
||||||
displayOrder();
|
case "topping": {
|
||||||
}
|
if (!checkMaximum(3, product)) {
|
||||||
break;
|
combinationArray.push(JSON.stringify(product));
|
||||||
}
|
displayOrder();
|
||||||
}
|
}
|
||||||
console.log("combinationArray", combinationArray);
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function checkMaximum(_maximum: number, _targetString: Products): boolean {
|
console.log("combinationArray", combinationArray);
|
||||||
let countOccurence: number = 0;
|
}
|
||||||
for (let i: number = 0; i < combinationArray.length; i++) {
|
|
||||||
let checkString: string = combinationArray[i];
|
function checkMaximum(_maximum: number, _targetString: Products): boolean {
|
||||||
if (checkString.includes(<string>_targetString.category))
|
let countOccurence: number = 0;
|
||||||
countOccurence++;
|
for (let i: number = 0; i < combinationArray.length; i++) {
|
||||||
if (countOccurence == _maximum) {
|
let checkString: string = combinationArray[i];
|
||||||
alert("Die maximale Anzahl von " + _maximum + " wurde bereits erreicht");
|
|
||||||
return true;
|
if (checkString.includes(<string>_targetString.category))
|
||||||
}
|
countOccurence++;
|
||||||
}
|
|
||||||
return false;
|
if (countOccurence == _maximum) {
|
||||||
}
|
alert("Die maximale Anzahl von " + _maximum + " wurde bereits erreicht");
|
||||||
|
return true;
|
||||||
function addCurrent(): void {
|
}
|
||||||
addToLocal();
|
}
|
||||||
clearCombination();
|
return false;
|
||||||
fixCartCount();
|
}
|
||||||
combinationCount++;
|
|
||||||
}
|
function addCurrent(): void {
|
||||||
|
addToLocal();
|
||||||
function clearCombination(): void {
|
clearCombination();
|
||||||
combinationArray = [];
|
fixCartCount();
|
||||||
displayOrder();
|
combinationCount++;
|
||||||
(<HTMLDivElement>document.querySelector("#topContainer")).scrollIntoView(true);
|
}
|
||||||
}
|
|
||||||
|
function clearCombination(): void {
|
||||||
function fixCartCount(): void {
|
combinationArray = [];
|
||||||
if (localStorage["CartCount"] != undefined)
|
displayOrder();
|
||||||
localStorage.removeItem("CartCount");
|
(<HTMLDivElement>document.querySelector("#topContainer")).scrollIntoView(true);
|
||||||
let count: number = 0;
|
}
|
||||||
for (const key in localStorage) {
|
|
||||||
if (key.includes("Combination")) {
|
function fixCartCount(): void {
|
||||||
count++;
|
if (localStorage["CartCount"] != undefined)
|
||||||
}
|
localStorage.removeItem("CartCount");
|
||||||
}
|
let count: number = 0;
|
||||||
localStorage.setItem("CartCount", `${count}`);
|
for (const key in localStorage) {
|
||||||
(<HTMLElement>document.querySelector("#warenkorb span")).innerHTML = `${localStorage.CartCount}`;
|
if (key.includes("Combination")) {
|
||||||
}
|
count++;
|
||||||
|
}
|
||||||
function addToLocal(): void {
|
}
|
||||||
combinationArray.push(tisch);
|
localStorage.setItem("CartCount", `${count}`);
|
||||||
localStorage.setItem(`Combination${combinationCount}`, "[" + combinationArray.toLocaleString() + "]");
|
(<HTMLElement>document.querySelector("#warenkorb span")).innerHTML = `${localStorage.CartCount}`;
|
||||||
window.location.href = "../html-warenkorb/warenkorb.html";
|
}
|
||||||
}
|
|
||||||
|
function addOrderToLocal(): void {
|
||||||
function displayOrder(): void {
|
addToLocal();
|
||||||
(<HTMLElement>document.querySelector("#displayContainer")).innerHTML = "";
|
window.location.href = "../html-warenkorb/warenkorb.html";
|
||||||
for (let i: number = combinationArray.length - 1; i > -1; i--) {
|
}
|
||||||
console.log(combinationArray[i]);
|
|
||||||
let obj: Products = JSON.parse(combinationArray[i]);
|
function addToLocal(): void {
|
||||||
(<HTMLElement>document.querySelector("#displayContainer")).innerHTML += `<img src="images/${obj.imageName}" alt=""/>`;
|
combinationArray.push(tisch);
|
||||||
}
|
localStorage.setItem(`Combination${combinationCount}`, "[" + combinationArray.toLocaleString() + "]");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
function displayOrder(): void {
|
||||||
|
(<HTMLElement>document.querySelector("#displayContainer")).innerHTML = "";
|
||||||
|
for (let i: number = combinationArray.length - 1; i > -1; i--) {
|
||||||
|
console.log(combinationArray[i]);
|
||||||
|
let obj: Products = JSON.parse(combinationArray[i]);
|
||||||
|
(<HTMLElement>document.querySelector("#displayContainer")).innerHTML += `<img src="images/${obj.imageName}" alt=""/>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
var frontShop;
|
var frontShop;
|
||||||
(function (frontShop) {
|
(function (frontShop) {
|
||||||
let serverUrl = "https://theoneandgis.herokuapp.com";
|
let serverUrl = "http://localhost:8100";
|
||||||
let orderArray = [];
|
let orderArray = [];
|
||||||
let orderPrice = 0;
|
let orderPrice = 0;
|
||||||
let orderNumber = 0;
|
let orderNumber = 0;
|
||||||
|
|
@ -80,22 +80,23 @@ var frontShop;
|
||||||
url = serverUrl + "/" + "mongo" + "/" + "orders" + "/" + "insertEntry" + "/" + "?" + query.toString() + `&Nr=${orderNumber}` + `&orderPrice=${orderPrice.toFixed(2)}`;
|
url = serverUrl + "/" + "mongo" + "/" + "orders" + "/" + "insertEntry" + "/" + "?" + query.toString() + `&Nr=${orderNumber}` + `&orderPrice=${orderPrice.toFixed(2)}`;
|
||||||
await fetch(url);
|
await fetch(url);
|
||||||
for (const iterator of orderArray) {
|
for (const iterator of orderArray) {
|
||||||
|
console.log("{" + `"area":"mongo","collection":"orders","action":"insertEntry",` + iterator.slice(1, iterator.length - 1));
|
||||||
await fetch(serverUrl, {
|
await fetch(serverUrl, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "text/plain"
|
"Content-Type": "text/plain"
|
||||||
},
|
},
|
||||||
body: iterator
|
body: "{" + `"area":"mongo","collection":"orders","action":"insertEntry",` + iterator.slice(1, iterator.length - 1) + "}"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
orderNumber++;
|
orderNumber++;
|
||||||
await fetch(serverUrl + "/mongo/orders/updateEntry" + "?_id=5f1a48d7a8f957baaa07cfeb&orderCount=" + orderNumber.toString());
|
await fetch(serverUrl + "/mongo/orders/updateEntry" + "?_id=5f34646911221b807b8df54c&orderCount=" + orderNumber.toString());
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
location.reload();
|
location.reload();
|
||||||
alert("Ihre Bestellung wurde eingereicht. Bitte melden Sie sich am Tresen, sobald Ihre Nummer aufgerufen wird! ♥");
|
alert("Ihre Bestellung wurde eingereicht. Bitte melden Sie sich am Tresen, sobald Ihre Nummer aufgerufen wird! ♥");
|
||||||
}
|
}
|
||||||
async function getNumber() {
|
async function getNumber() {
|
||||||
let response = await fetch(serverUrl + "/mongo/orders/findEntry?_id=5f1a48d7a8f957baaa07cfeb");
|
let response = await fetch(serverUrl + "/mongo/orders/findEntry?_id=5f34646911221b807b8df54c");
|
||||||
let orderObj = await response.json();
|
let orderObj = await response.json();
|
||||||
let orderObjNumber = parseFloat(orderObj.orderCount);
|
let orderObjNumber = parseFloat(orderObj.orderCount);
|
||||||
return orderObjNumber;
|
return orderObjNumber;
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"warenkorb.js","sourceRoot":"","sources":["warenkorb.ts"],"names":[],"mappings":";AACA,IAAU,SAAS,CAiJlB;AAjJD,WAAU,SAAS;IAEf,IAAI,SAAS,GAAW,oCAAoC,CAAC;IAC7D,IAAI,UAAU,GAAa,EAAE,CAAC;IAC9B,IAAI,UAAU,GAAW,CAAC,CAAC;IAC3B,IAAI,WAAW,GAAW,CAAC,CAAC;IAE5B,IAAI,EAAE,CAAC;IAEP,KAAK,UAAU,IAAI;QACf,MAAM,QAAQ,EAAE,CAAC;QACjB,MAAM,iBAAiB,EAAE,CAAC;QAC1B,YAAY,EAAE,CAAC;IACnB,CAAC;IAMD,KAAK,UAAU,QAAQ;QACnB,2DAA2D;QAC3D,WAAW,GAAG,MAAM,SAAS,EAAE,CAAC;QAChC,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE;YAC5B,IAAI,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;gBAClE,IAAI,OAAO,GAAW,YAAY,CAAC,OAAO,CAAC,GAAG,CAAE,CAAC;gBACjD,IAAI,UAAU,GAAe,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBACvD,IAAI,aAAa,GAAW,GAAG,CAAC;gBAChC,IAAI,YAAY,GAAW,CAAC,CAAC;gBAC7B,IAAI,YAAY,GAAW,CAAC,CAAC;gBAC7B,IAAI,UAAU,GAAW,CAAC,CAAC;gBAE3B,IAAI,GAAG,GAAmB,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;gBACxD,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;gBAC7B,GAAG,CAAC,SAAS,GAAG,EAAE,CAAC;gBACnB,KAAK,MAAM,IAAI,IAAI,UAAU;oBACzB,IAAI,IAAI,CAAC,QAAQ,IAAI,WAAW,EAAE;wBAC9B,aAAa,IAAI,aAAa,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,CAAC;wBAC9D,GAAG,CAAC,SAAS,IAAI,mBAAmB,IAAI,CAAC,IAAI,aAAa,CAAC;qBAC9D;gBACL,KAAK,MAAM,IAAI,IAAI,UAAU;oBACzB,IAAI,IAAI,CAAC,QAAQ,IAAI,SAAS,EAAE;wBAC5B,aAAa,IAAI,WAAW,YAAY,GAAG,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,CAAC;wBAC3E,GAAG,CAAC,SAAS,IAAI,mBAAmB,YAAY,KAAK,IAAI,CAAC,IAAI,aAAa,CAAC;wBAC5E,YAAY,EAAE,CAAC;qBAClB;gBACL,KAAK,MAAM,IAAI,IAAI,UAAU;oBACzB,IAAI,IAAI,CAAC,QAAQ,IAAI,SAAS,EAAE;wBAC5B,aAAa,IAAI,WAAW,YAAY,GAAG,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,CAAC;wBAC3E,GAAG,CAAC,SAAS,IAAI,qBAAqB,YAAY,KAAK,IAAI,CAAC,IAAI,aAAa,CAAC;wBAC9E,YAAY,EAAE,CAAC;qBAClB;gBACL,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE;oBAC3B,IAAI,IAAI,CAAC,KAAK,IAAI,SAAS,EAAE;wBACzB,UAAU,IAAY,IAAI,CAAC,KAAK,CAAC;wBACjC,UAAU,IAAY,IAAI,CAAC,KAAK,CAAC;qBACpC;iBACJ;gBACD,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE;oBAC3B,IAAI,IAAI,CAAC,KAAK,IAAI,SAAS,EAAE;wBACzB,aAAa,IAAI,SAAS,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,KAAK,GAAG,GAAG,GAAG,CAAC;qBAC9D;iBACJ;gBACD,aAAa,IAAI,gBAAgB,GAAG,GAAG,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,MAAM,GAAG,GAAG,GAAG,IAAI,WAAW,GAAG,GAAG,GAAG,CAAC;gBACvH,yIAAyI;gBACzI,+IAA+I;gBAC/I,aAAa,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;gBACvE,GAAG,CAAC,SAAS,IAAI,4CAA4C,UAAU,CAAC,MAAM,gBAAgB,GAAG,qBAAqB,UAAU,CAAC,MAAM,GAAG,CAAC,qBAAqB,CAAC;gBACjK,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBACd,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBAC/D,6FAA6F;aAChG;SACJ;IACL,CAAC;IAED;;;;;;;OAOG;IAEH,KAAK,UAAU,YAAY;QACvB,IAAI,QAAQ,GAAa,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,IAAI,GAAG,GAAW,EAAE,CAAC;QACrB,kCAAkC;QAClC,IAAI,KAAK,GAAoB,IAAI,eAAe,CAAM,QAAQ,CAAC,CAAC;QAChE,GAAG,GAAG,SAAS,GAAG,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,QAAQ,GAAG,GAAG,GAAG,aAAa,GAAG,GAAG,GAAG,GAAG,GAAG,KAAK,CAAC,QAAQ,EAAE,GAAG,OAAO,WAAW,EAAE,GAAG,eAAe,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACtK,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAEjB,KAAK,MAAM,QAAQ,IAAI,UAAU,EAAE;YAC/B,MAAM,KAAK,CAAC,SAAS,EAAE;gBACnB,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACL,cAAc,EAAE,YAAY;iBAC/B;gBACD,IAAI,EAAE,QAAQ;aACjB,CAAC,CAAC;SACN;QAED,WAAW,EAAE,CAAC;QACd,MAAM,KAAK,CAAE,SAAS,GAAG,2BAA2B,GAAG,2CAA2C,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;QAE7H,YAAY,CAAC,KAAK,EAAE,CAAC;QACrB,QAAQ,CAAC,MAAM,EAAE,CAAC;QAClB,KAAK,CAAC,2GAA2G,CAAC,CAAC;IACvH,CAAC;IAED,KAAK,UAAU,SAAS;QACpB,IAAI,QAAQ,GAAa,MAAM,KAAK,CAAC,SAAS,GAAG,sDAAsD,CAAC,CAAC;QACzG,IAAI,QAAQ,GAAa,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC/C,IAAI,cAAc,GAAW,UAAU,CAAS,QAAQ,CAAC,UAAU,CAAC,CAAC;QACrE,OAAO,cAAc,CAAC;IAC1B,CAAC;IAED,KAAK,UAAU,iBAAiB;QAC5B,2FAA2F;QAC7E,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC5F,2FAA2F;QAC3F,IAAI,WAAW,GAAwB,QAAQ,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;QAClF,KAAK,MAAM,QAAQ,IAAI,WAAW;YAC9B,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;IAC9D,CAAC;IAED,SAAS,iBAAiB,CAAC,MAAa;QACpC,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC3F,IAAI,MAAM,GAA8B,MAAM,CAAC,MAAO,CAAC;QACvD,OAAO,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,YAAY,CAAE,CAAC,CAAC,CAAC;QAClE,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,WAAW,CAAE,CAAC,CAAE;QAC5D,QAAQ,CAAC,MAAM,EAAE,CAAC;IACtB,CAAC;IAED,SAAS,YAAY;QACjB,IAAI,YAAY,CAAC,WAAW,CAAC,IAAI,SAAS;YACtC,YAAY,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACzC,IAAI,KAAK,GAAW,CAAC,CAAC;QACtB,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE;YAC5B,IAAI,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;gBAC7B,KAAK,EAAE,CAAC;aACX;SACJ;QACD,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;QAChC,QAAQ,CAAC,aAAa,CAAC,iBAAiB,CAAE,CAAC,SAAS,GAAG,GAAG,YAAY,CAAC,SAAS,EAAE,CAAC;IACrG,CAAC;AACL,CAAC,EAjJS,SAAS,KAAT,SAAS,QAiJlB"}
|
{"version":3,"file":"warenkorb.js","sourceRoot":"","sources":["warenkorb.ts"],"names":[],"mappings":";AACA,IAAU,SAAS,CAkJlB;AAlJD,WAAU,SAAS;IAEf,IAAI,SAAS,GAAW,uBAAuB,CAAC;IAChD,IAAI,UAAU,GAAa,EAAE,CAAC;IAC9B,IAAI,UAAU,GAAW,CAAC,CAAC;IAC3B,IAAI,WAAW,GAAW,CAAC,CAAC;IAE5B,IAAI,EAAE,CAAC;IAEP,KAAK,UAAU,IAAI;QACf,MAAM,QAAQ,EAAE,CAAC;QACjB,MAAM,iBAAiB,EAAE,CAAC;QAC1B,YAAY,EAAE,CAAC;IACnB,CAAC;IAMD,KAAK,UAAU,QAAQ;QACnB,2DAA2D;QAC3D,WAAW,GAAG,MAAM,SAAS,EAAE,CAAC;QAChC,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE;YAC5B,IAAI,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;gBAClE,IAAI,OAAO,GAAW,YAAY,CAAC,OAAO,CAAC,GAAG,CAAE,CAAC;gBACjD,IAAI,UAAU,GAAe,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBACvD,IAAI,aAAa,GAAW,GAAG,CAAC;gBAChC,IAAI,YAAY,GAAW,CAAC,CAAC;gBAC7B,IAAI,YAAY,GAAW,CAAC,CAAC;gBAC7B,IAAI,UAAU,GAAW,CAAC,CAAC;gBAE3B,IAAI,GAAG,GAAmB,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;gBACxD,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;gBAC7B,GAAG,CAAC,SAAS,GAAG,EAAE,CAAC;gBACnB,KAAK,MAAM,IAAI,IAAI,UAAU;oBACzB,IAAI,IAAI,CAAC,QAAQ,IAAI,WAAW,EAAE;wBAC9B,aAAa,IAAI,aAAa,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,CAAC;wBAC9D,GAAG,CAAC,SAAS,IAAI,mBAAmB,IAAI,CAAC,IAAI,aAAa,CAAC;qBAC9D;gBACL,KAAK,MAAM,IAAI,IAAI,UAAU;oBACzB,IAAI,IAAI,CAAC,QAAQ,IAAI,SAAS,EAAE;wBAC5B,aAAa,IAAI,WAAW,YAAY,GAAG,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,CAAC;wBAC3E,GAAG,CAAC,SAAS,IAAI,mBAAmB,YAAY,KAAK,IAAI,CAAC,IAAI,aAAa,CAAC;wBAC5E,YAAY,EAAE,CAAC;qBAClB;gBACL,KAAK,MAAM,IAAI,IAAI,UAAU;oBACzB,IAAI,IAAI,CAAC,QAAQ,IAAI,SAAS,EAAE;wBAC5B,aAAa,IAAI,WAAW,YAAY,GAAG,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,CAAC;wBAC3E,GAAG,CAAC,SAAS,IAAI,qBAAqB,YAAY,KAAK,IAAI,CAAC,IAAI,aAAa,CAAC;wBAC9E,YAAY,EAAE,CAAC;qBAClB;gBACL,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE;oBAC3B,IAAI,IAAI,CAAC,KAAK,IAAI,SAAS,EAAE;wBACzB,UAAU,IAAY,IAAI,CAAC,KAAK,CAAC;wBACjC,UAAU,IAAY,IAAI,CAAC,KAAK,CAAC;qBACpC;iBACJ;gBACD,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE;oBAC3B,IAAI,IAAI,CAAC,KAAK,IAAI,SAAS,EAAE;wBACzB,aAAa,IAAI,SAAS,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,KAAK,GAAG,GAAG,GAAG,CAAC;qBAC9D;iBACJ;gBACD,aAAa,IAAI,gBAAgB,GAAG,GAAG,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,MAAM,GAAG,GAAG,GAAG,IAAI,WAAW,GAAG,GAAG,GAAG,CAAC;gBACvH,yIAAyI;gBACzI,+IAA+I;gBAC/I,aAAa,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;gBACvE,GAAG,CAAC,SAAS,IAAI,4CAA4C,UAAU,CAAC,MAAM,gBAAgB,GAAG,qBAAqB,UAAU,CAAC,MAAM,GAAG,CAAC,qBAAqB,CAAC;gBACjK,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBACd,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBAC/D,6FAA6F;aAChG;SACJ;IACL,CAAC;IAED;;;;;;;OAOG;IAEH,KAAK,UAAU,YAAY;QACvB,IAAI,QAAQ,GAAa,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,IAAI,GAAG,GAAW,EAAE,CAAC;QACrB,kCAAkC;QAClC,IAAI,KAAK,GAAoB,IAAI,eAAe,CAAM,QAAQ,CAAC,CAAC;QAChE,GAAG,GAAG,SAAS,GAAG,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,QAAQ,GAAG,GAAG,GAAG,aAAa,GAAG,GAAG,GAAG,GAAG,GAAG,KAAK,CAAC,QAAQ,EAAE,GAAG,OAAO,WAAW,EAAE,GAAG,eAAe,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACtK,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAEjB,KAAK,MAAM,QAAQ,IAAI,UAAU,EAAE;YAC/B,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,8DAA8D,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAE,CAAC;YAC5H,MAAM,KAAK,CAAC,SAAS,EAAE;gBACnB,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACL,cAAc,EAAE,YAAY;iBAC/B;gBACD,IAAI,EAAE,GAAG,GAAG,8DAA8D,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG;aAC5H,CAAC,CAAC;SACN;QAED,WAAW,EAAE,CAAC;QACd,MAAM,KAAK,CAAC,SAAS,GAAG,2BAA2B,GAAG,2CAA2C,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;QAE5H,YAAY,CAAC,KAAK,EAAE,CAAC;QACrB,QAAQ,CAAC,MAAM,EAAE,CAAC;QAClB,KAAK,CAAC,2GAA2G,CAAC,CAAC;IACvH,CAAC;IAED,KAAK,UAAU,SAAS;QACpB,IAAI,QAAQ,GAAa,MAAM,KAAK,CAAC,SAAS,GAAG,sDAAsD,CAAC,CAAC;QACzG,IAAI,QAAQ,GAAa,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC/C,IAAI,cAAc,GAAW,UAAU,CAAS,QAAQ,CAAC,UAAU,CAAC,CAAC;QACrE,OAAO,cAAc,CAAC;IAC1B,CAAC;IAED,KAAK,UAAU,iBAAiB;QAC5B,2FAA2F;QAC7E,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC5F,2FAA2F;QAC3F,IAAI,WAAW,GAAwB,QAAQ,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;QAClF,KAAK,MAAM,QAAQ,IAAI,WAAW;YAC9B,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;IAC9D,CAAC;IAED,SAAS,iBAAiB,CAAC,MAAa;QACpC,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC3F,IAAI,MAAM,GAA8B,MAAM,CAAC,MAAO,CAAC;QACvD,OAAO,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,YAAY,CAAE,CAAC,CAAC,CAAC;QAClE,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,WAAW,CAAE,CAAC,CAAE;QAC5D,QAAQ,CAAC,MAAM,EAAE,CAAC;IACtB,CAAC;IAED,SAAS,YAAY;QACjB,IAAI,YAAY,CAAC,WAAW,CAAC,IAAI,SAAS;YACtC,YAAY,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACzC,IAAI,KAAK,GAAW,CAAC,CAAC;QACtB,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE;YAC5B,IAAI,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;gBAC7B,KAAK,EAAE,CAAC;aACX;SACJ;QACD,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;QAChC,QAAQ,CAAC,aAAa,CAAC,iBAAiB,CAAE,CAAC,SAAS,GAAG,GAAG,YAAY,CAAC,SAAS,EAAE,CAAC;IACrG,CAAC;AACL,CAAC,EAlJS,SAAS,KAAT,SAAS,QAkJlB"}
|
||||||
|
|
@ -1,147 +1,148 @@
|
||||||
|
|
||||||
namespace frontShop {
|
namespace frontShop {
|
||||||
|
|
||||||
let serverUrl: string = "https://theoneandgis.herokuapp.com";
|
let serverUrl: string = "http://localhost:8100";
|
||||||
let orderArray: string[] = [];
|
let orderArray: string[] = [];
|
||||||
let orderPrice: number = 0;
|
let orderPrice: number = 0;
|
||||||
let orderNumber: number = 0;
|
let orderNumber: number = 0;
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
async function init(): Promise<void> {
|
async function init(): Promise<void> {
|
||||||
await setOrder();
|
await setOrder();
|
||||||
await addButtonListener();
|
await addButtonListener();
|
||||||
fixCartCount();
|
fixCartCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Products {
|
interface Products {
|
||||||
[type: string]: string | number;
|
[type: string]: string | number;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setOrder(): Promise<void> {
|
async function setOrder(): Promise<void> {
|
||||||
//let formData: FormData = new FormData(document.forms[0]);
|
//let formData: FormData = new FormData(document.forms[0]);
|
||||||
orderNumber = await getNumber();
|
orderNumber = await getNumber();
|
||||||
for (const key in localStorage) {
|
for (const key in localStorage) {
|
||||||
if (localStorage.getItem(key) != null && key.includes("Combination")) {
|
if (localStorage.getItem(key) != null && key.includes("Combination")) {
|
||||||
let content: string = localStorage.getItem(key)!;
|
let content: string = localStorage.getItem(key)!;
|
||||||
let contentObj: Products[] = await JSON.parse(content);
|
let contentObj: Products[] = await JSON.parse(content);
|
||||||
let contentString: string = "{";
|
let contentString: string = "{";
|
||||||
let countFlavour: number = 1;
|
let countFlavour: number = 1;
|
||||||
let countTopping: number = 1;
|
let countTopping: number = 1;
|
||||||
let countPrice: number = 0;
|
let countPrice: number = 0;
|
||||||
|
|
||||||
let div: HTMLDivElement = document.createElement("div");
|
let div: HTMLDivElement = document.createElement("div");
|
||||||
div.classList.add("product");
|
div.classList.add("product");
|
||||||
div.innerHTML = ``;
|
div.innerHTML = ``;
|
||||||
for (const keys of contentObj)
|
for (const keys of contentObj)
|
||||||
if (keys.category == "container") {
|
if (keys.category == "container") {
|
||||||
contentString += `"container"` + ":" + `"${keys.name}"` + ",";
|
contentString += `"container"` + ":" + `"${keys.name}"` + ",";
|
||||||
div.innerHTML += `<span>Behälter: ${keys.name}</span><br>`;
|
div.innerHTML += `<span>Behälter: ${keys.name}</span><br>`;
|
||||||
}
|
}
|
||||||
for (const keys of contentObj)
|
for (const keys of contentObj)
|
||||||
if (keys.category == "flavour") {
|
if (keys.category == "flavour") {
|
||||||
contentString += `"flavour${countFlavour}"` + ":" + `"${keys.name}"` + ",";
|
contentString += `"flavour${countFlavour}"` + ":" + `"${keys.name}"` + ",";
|
||||||
div.innerHTML += `<span>Kugel Nr. ${countFlavour}: ${keys.name}</span><br>`;
|
div.innerHTML += `<span>Kugel Nr. ${countFlavour}: ${keys.name}</span><br>`;
|
||||||
countFlavour++;
|
countFlavour++;
|
||||||
}
|
}
|
||||||
for (const keys of contentObj)
|
for (const keys of contentObj)
|
||||||
if (keys.category == "topping") {
|
if (keys.category == "topping") {
|
||||||
contentString += `"topping${countTopping}"` + ":" + `"${keys.name}"` + ",";
|
contentString += `"topping${countTopping}"` + ":" + `"${keys.name}"` + ",";
|
||||||
div.innerHTML += `<span>Topping Nr. ${countTopping}: ${keys.name}</span><br>`;
|
div.innerHTML += `<span>Topping Nr. ${countTopping}: ${keys.name}</span><br>`;
|
||||||
countTopping++;
|
countTopping++;
|
||||||
}
|
}
|
||||||
for (const keys of contentObj) {
|
for (const keys of contentObj) {
|
||||||
if (keys.price != undefined) {
|
if (keys.price != undefined) {
|
||||||
orderPrice += <number>keys.price;
|
orderPrice += <number>keys.price;
|
||||||
countPrice += <number>keys.price;
|
countPrice += <number>keys.price;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const keys of contentObj) {
|
for (const keys of contentObj) {
|
||||||
if (keys.tisch != undefined) {
|
if (keys.tisch != undefined) {
|
||||||
contentString += `"tisch"` + ":" + `"${keys.tisch}"` + ",";
|
contentString += `"tisch"` + ":" + `"${keys.tisch}"` + ",";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
contentString += `"productPrice"` + ":" + `"${countPrice.toFixed(2)}"` + "," + `"Nr"` + ":" + `"${orderNumber}"` + ",";
|
contentString += `"productPrice"` + ":" + `"${countPrice.toFixed(2)}"` + "," + `"Nr"` + ":" + `"${orderNumber}"` + ",";
|
||||||
//contentString += `"vorname"` + ":" + `"${formData.get("vorname")}"` + "," + `"nachname"` + ":" + `"${formData.get("nachname")}"` + ",";
|
//contentString += `"vorname"` + ":" + `"${formData.get("vorname")}"` + "," + `"nachname"` + ":" + `"${formData.get("nachname")}"` + ",";
|
||||||
//contentString += `"straße"` + ":" + `"${formData.get("straße")}"` + "," + `"postleitzahl"` + ":" + `"${formData.get("postleitzahl")}"` + ",";
|
//contentString += `"straße"` + ":" + `"${formData.get("straße")}"` + "," + `"postleitzahl"` + ":" + `"${formData.get("postleitzahl")}"` + ",";
|
||||||
contentString = contentString.slice(0, contentString.length - 1) + "}";
|
contentString = contentString.slice(0, contentString.length - 1) + "}";
|
||||||
div.innerHTML += `<button class="removeButton" arrayIndex="${orderArray.length}" localName="${key}">Kombination Nr. ${orderArray.length + 1} entfernen</button>`;
|
div.innerHTML += `<button class="removeButton" arrayIndex="${orderArray.length}" localName="${key}">Kombination Nr. ${orderArray.length + 1} entfernen</button>`;
|
||||||
orderArray.push(contentString);
|
orderArray.push(contentString);
|
||||||
(<HTMLDivElement>document.querySelector("#check")).append(div);
|
(<HTMLDivElement>document.querySelector("#check")).append(div);
|
||||||
//(<HTMLDivElement>document.querySelector("#check")).innerHTML += contentString + "<br><br>";
|
//(<HTMLDivElement>document.querySelector("#check")).innerHTML += contentString + "<br><br>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*async function saveForm(): Promise<void> {
|
/*async function saveForm(): Promise<void> {
|
||||||
let formData: FormData = new FormData(document.forms[0]);
|
let formData: FormData = new FormData(document.forms[0]);
|
||||||
let url: string = "";
|
let url: string = "";
|
||||||
//tslint:disable-next-line: no-any
|
//tslint:disable-next-line: no-any
|
||||||
let query: URLSearchParams = new URLSearchParams(<any>formData);
|
let query: URLSearchParams = new URLSearchParams(<any>formData);
|
||||||
url = "http://localhost:8100" + "/" + "mongo" + "/" + "orders" + "/" + "insertEntry" + "/" + "?" + query.toString();
|
url = "http://localhost:8100" + "/" + "mongo" + "/" + "orders" + "/" + "insertEntry" + "/" + "?" + query.toString();
|
||||||
await fetch(url);
|
await fetch(url);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
async function confirmOrder(): Promise<void> {
|
async function confirmOrder(): Promise<void> {
|
||||||
let formData: FormData = new FormData(document.forms[0]);
|
let formData: FormData = new FormData(document.forms[0]);
|
||||||
let url: string = "";
|
let url: string = "";
|
||||||
//tslint:disable-next-line: no-any
|
//tslint:disable-next-line: no-any
|
||||||
let query: URLSearchParams = new URLSearchParams(<any>formData);
|
let query: URLSearchParams = new URLSearchParams(<any>formData);
|
||||||
url = serverUrl + "/" + "mongo" + "/" + "orders" + "/" + "insertEntry" + "/" + "?" + query.toString() + `&Nr=${orderNumber}` + `&orderPrice=${orderPrice.toFixed(2)}`;
|
url = serverUrl + "/" + "mongo" + "/" + "orders" + "/" + "insertEntry" + "/" + "?" + query.toString() + `&Nr=${orderNumber}` + `&orderPrice=${orderPrice.toFixed(2)}`;
|
||||||
await fetch(url);
|
await fetch(url);
|
||||||
|
|
||||||
for (const iterator of orderArray) {
|
for (const iterator of orderArray) {
|
||||||
await fetch(serverUrl, {
|
console.log("{" + `"area":"mongo","collection":"orders","action":"insertEntry",` + iterator.slice(1, iterator.length - 1) );
|
||||||
method: "POST",
|
await fetch(serverUrl, {
|
||||||
headers: {
|
method: "POST",
|
||||||
"Content-Type": "text/plain"
|
headers: {
|
||||||
},
|
"Content-Type": "text/plain"
|
||||||
body: iterator
|
},
|
||||||
});
|
body: "{" + `"area":"mongo","collection":"orders","action":"insertEntry",` + iterator.slice(1, iterator.length - 1) + "}"
|
||||||
}
|
});
|
||||||
|
}
|
||||||
orderNumber++;
|
|
||||||
await fetch( serverUrl + "/mongo/orders/updateEntry" + "?_id=5f1a48d7a8f957baaa07cfeb&orderCount=" + orderNumber.toString());
|
orderNumber++;
|
||||||
|
await fetch(serverUrl + "/mongo/orders/updateEntry" + "?_id=5f34646911221b807b8df54c&orderCount=" + orderNumber.toString());
|
||||||
localStorage.clear();
|
|
||||||
location.reload();
|
localStorage.clear();
|
||||||
alert("Ihre Bestellung wurde eingereicht. Bitte melden Sie sich am Tresen, sobald Ihre Nummer aufgerufen wird! ♥");
|
location.reload();
|
||||||
}
|
alert("Ihre Bestellung wurde eingereicht. Bitte melden Sie sich am Tresen, sobald Ihre Nummer aufgerufen wird! ♥");
|
||||||
|
}
|
||||||
async function getNumber(): Promise<number> {
|
|
||||||
let response: Response = await fetch(serverUrl + "/mongo/orders/findEntry?_id=5f1a48d7a8f957baaa07cfeb");
|
async function getNumber(): Promise<number> {
|
||||||
let orderObj: Products = await response.json();
|
let response: Response = await fetch(serverUrl + "/mongo/orders/findEntry?_id=5f34646911221b807b8df54c");
|
||||||
let orderObjNumber: number = parseFloat(<string>orderObj.orderCount);
|
let orderObj: Products = await response.json();
|
||||||
return orderObjNumber;
|
let orderObjNumber: number = parseFloat(<string>orderObj.orderCount);
|
||||||
}
|
return orderObjNumber;
|
||||||
|
}
|
||||||
async function addButtonListener(): Promise<void> {
|
|
||||||
//(<HTMLElement>document.querySelector("#printOrder")).addEventListener("click", setOrder);
|
async function addButtonListener(): Promise<void> {
|
||||||
(<HTMLElement>document.querySelector("#sendOrder")).addEventListener("click", confirmOrder);
|
//(<HTMLElement>document.querySelector("#printOrder")).addEventListener("click", setOrder);
|
||||||
//(<HTMLElement>document.querySelector("#formButton")).addEventListener("click", saveForm);
|
(<HTMLElement>document.querySelector("#sendOrder")).addEventListener("click", confirmOrder);
|
||||||
let elementList: NodeListOf<Element> = document.querySelectorAll(".removeButton");
|
//(<HTMLElement>document.querySelector("#formButton")).addEventListener("click", saveForm);
|
||||||
for (const iterator of elementList)
|
let elementList: NodeListOf<Element> = document.querySelectorAll(".removeButton");
|
||||||
iterator.addEventListener("click", removeCombination);
|
for (const iterator of elementList)
|
||||||
}
|
iterator.addEventListener("click", removeCombination);
|
||||||
|
}
|
||||||
function removeCombination(_event: Event): void {
|
|
||||||
localStorage.setItem("CartCount", `${parseFloat(localStorage.getItem("CartCount")!) - 1}`);
|
function removeCombination(_event: Event): void {
|
||||||
let target: HTMLElement = (<HTMLElement>_event.target);
|
localStorage.setItem("CartCount", `${parseFloat(localStorage.getItem("CartCount")!) - 1}`);
|
||||||
delete orderArray[parseFloat(target.getAttribute("arrayindex")!)];
|
let target: HTMLElement = (<HTMLElement>_event.target);
|
||||||
localStorage.removeItem(target.getAttribute("localname")!) ;
|
delete orderArray[parseFloat(target.getAttribute("arrayindex")!)];
|
||||||
location.reload();
|
localStorage.removeItem(target.getAttribute("localname")!) ;
|
||||||
}
|
location.reload();
|
||||||
|
}
|
||||||
function fixCartCount(): void {
|
|
||||||
if (localStorage["CartCount"] != undefined)
|
function fixCartCount(): void {
|
||||||
localStorage.removeItem("CartCount");
|
if (localStorage["CartCount"] != undefined)
|
||||||
let count: number = 0;
|
localStorage.removeItem("CartCount");
|
||||||
for (const key in localStorage) {
|
let count: number = 0;
|
||||||
if (key.includes("Combination")) {
|
for (const key in localStorage) {
|
||||||
count++;
|
if (key.includes("Combination")) {
|
||||||
}
|
count++;
|
||||||
}
|
}
|
||||||
localStorage.setItem("CartCount", `${count}`);
|
}
|
||||||
(<HTMLElement>document.querySelector("#warenkorb span")).innerHTML = `${localStorage.CartCount}`;
|
localStorage.setItem("CartCount", `${count}`);
|
||||||
}
|
(<HTMLElement>document.querySelector("#warenkorb span")).innerHTML = `${localStorage.CartCount}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue