Komplette Version #3

Merged
2210892 merged 1 commits from version_header into master 2023-05-05 13:20:18 +02:00
17 changed files with 719 additions and 619 deletions

View File

@ -17,21 +17,31 @@
<header>
<nav>
<div class="navbar-mobile">
<div class="nav-container">
<div class="nav-container" >
<input class="checkbox" type="checkbox" name="" id="" />
<div class="hamburger-lines">
<span class="line line1"></span>
<span class="line line2"></span>
<span class="line line3"></span>
</div>
<nav class="navbar menu-items">
<div class="navbar menu-items">
<a href="ueber_uns.html">Über uns</a>
<a href="produkte.html">Produkte</a>
<a href="warenkorb.html">Warenkorb</a>
<a href="kontakt.html">Kontakt</a>
<a href="impressum.html">Impressum</a>
<a href="datenschutz.html">Datenschutz</a>
</nav>
</div>
</div>
<div id="header-mobile-farbe">
<span class="header-mobile-text">
<h1>Second Harvest</h1>
<p>Gib Lebensmitteln eine zweite Chance</p>
</span>
</div>
<div id="header-mobile-farbe" class="header-mobile-logo">
<a href="index.html">
<img src="pictures/logo_secondharvest_transparent.png" width="120" alt="Second Harvest Logo"></a>
</div>
</div>
</nav>
@ -57,7 +67,7 @@
<h1 id="begrueßung_bestellung_abschließen">Bestellung abschließen</h1>
<div id="fehlerbox">test</div>
<form name="Bestellformular" >
<table class="bestellung_tabelle">
<tr>
@ -108,6 +118,7 @@
</table>
</form>
<p id="tabellenbeschreibung">Die Felder mit einem * (Sternchen) sind Pflichtfelder.</p>
<p id="gesamtkosten"><strong>Die Gesamtkosten (inkl. MwSt.)</br>belaufen sich auf: 5,30€</strong>
@ -126,7 +137,7 @@
<div class="button_abschließen_position">
<p><a id="bestellbutton" class="button_abschließen" href="bestellung_erfolgreich.html" >Kostenpflichtig bestellen</a></p>
<p><a class="button_abschließen" onclick="checkform()" href="bestellung_erfolgreich.html" >Kostenpflichtig bestellen</a></p>
</div>

View File

@ -15,21 +15,31 @@
<header>
<nav>
<div class="navbar-mobile">
<div class="nav-container">
<div class="nav-container" >
<input class="checkbox" type="checkbox" name="" id="" />
<div class="hamburger-lines">
<span class="line line1"></span>
<span class="line line2"></span>
<span class="line line3"></span>
</div>
<nav class="navbar menu-items">
<div class="navbar menu-items">
<a href="ueber_uns.html">Über uns</a>
<a href="produkte.html">Produkte</a>
<a href="warenkorb.html">Warenkorb</a>
<a href="kontakt.html">Kontakt</a>
<a href="impressum.html">Impressum</a>
<a href="datenschutz.html">Datenschutz</a>
</nav>
</div>
</div>
<div id="header-mobile-farbe">
<span class="header-mobile-text">
<h1>Second Harvest</h1>
<p>Gib Lebensmitteln eine zweite Chance</p>
</span>
</div>
<div id="header-mobile-farbe" class="header-mobile-logo">
<a href="index.html">
<img src="pictures/logo_secondharvest_transparent.png" width="120" alt="Second Harvest Logo"></a>
</div>
</div>
</nav>
@ -52,7 +62,6 @@
</div>
</nav>
</header>
<div>
<br/> <br/> <br/> <br/> <br/> <br/> <br/>
<p style="font-size: 30px"> Bestellung erfolgreich abgeschlossen</p>

View File

@ -15,21 +15,31 @@
<header>
<nav>
<div class="navbar-mobile">
<div class="nav-container">
<div class="nav-container" >
<input class="checkbox" type="checkbox" name="" id="" />
<div class="hamburger-lines">
<span class="line line1"></span>
<span class="line line2"></span>
<span class="line line3"></span>
</div>
<nav class="navbar menu-items">
<div class="navbar menu-items">
<a href="ueber_uns.html">Über uns</a>
<a href="produkte.html">Produkte</a>
<a href="warenkorb.html">Warenkorb</a>
<a href="kontakt.html">Kontakt</a>
<a href="impressum.html">Impressum</a>
<a href="datenschutz.html">Datenschutz</a>
</nav>
</div>
</div>
<div id="header-mobile-farbe">
<span class="header-mobile-text">
<h1>Second Harvest</h1>
<p>Gib Lebensmitteln eine zweite Chance</p>
</span>
</div>
<div id="header-mobile-farbe" class="header-mobile-logo">
<a href="index.html">
<img src="pictures/logo_secondharvest_transparent.png" width="120" alt="Second Harvest Logo"></a>
</div>
</div>
</nav>

View File

@ -1,37 +1,40 @@
/* DESKTOP Version T4Web 0.1 */
/* NONE FROM MOBILE */
/* DESKTOP Version T4Web 0.1 */
.header_mobile {
display: none;
}
/* NONE FROM MOBILE */
.header_mobilelogo {
display: none;
}
.header_mobile {
display:none;
}
.header_mobilelogo {
display:none;
}
.navbar-mobile{
display:none;
}
.navbar-mobile {
display: none;
}
#greeting-mobile {
display:none;
}
/* ALL-FORMAT */
/* ALL-FORMAT */
* {
* {
box-sizing: border-box;
font-family: Helvetica, Arial, sans-serif;
}
}
#hinweis {
#hinweis {
color: red;
}
}
/* BACKGROUND-IMAGE-FORMAT-DESKTOP */
/* BACKGROUND-IMAGE-FORMAT-DESKTOP */
html body.index .content::before,
html body.datenschutz .content::before,
html body.ueberuns .content::before,
html body.kontakt .content::before,
html body.impressum .content::before {
html body.index .content::before,
html body.datenschutz .content::before,
html body.ueberuns .content::before,
html body.kontakt .content::before,
html body.impressum .content::before {
content: "";
background-image: url('../pictures/gemuese_transparent.png');
background-repeat: no-repeat;
@ -45,128 +48,128 @@ html body.impressum .content::before {
left: 0px;
opacity: 0.2;
pointer-events: none;
}
}
/* NAV-DESKTOP-FORMAT */
/* NAV-DESKTOP-FORMAT */
.navbar-desktop {
.navbar-desktop {
background-color: #476B1C;
display: grid;
grid-template-columns: repeat(var(--items), 1fr);
width: 100%;
}
}
.navbar-desktop a {
.navbar-desktop a {
text-align: center;
text-decoration: none;
color: white;
padding: 0.5em 0 0.5em 0;
}
}
.navbar-desktop a:hover {
.navbar-desktop a:hover {
color: #f4eb49;
}
}
/* BODY-FORMAT */
/* BODY-FORMAT */
body {
body {
min-height: 100vh;
padding: 0;
}
}
body::-webkit-scrollbar {
body::-webkit-scrollbar {
width: 10px
}
}
body::-webkit-scrollbar-track {
body::-webkit-scrollbar-track {
background-color: white;
}
}
body::-webkit-scrollbar-thumb {
body::-webkit-scrollbar-thumb {
background: #476B1C;
}
}
/* HEADER-FORMAT */
/* HEADER-FORMAT */
header {
header {
background-color: #9BB558;
}
}
.header_desktop>h1 {
.header_desktop > h1 {
padding-top: 0.1em;
padding-left: 7em;
margin: 0;
font-size: 1.875em;
}
}
.header_desktop>p {
.header_desktop > p {
padding-left: 17.6em;
margin-top: 0em;
margin-bottom: 0.5em;
font-size: 0.75em;
}
}
.header_logo {
.header_logo {
float: left;
margin-top: -18px;
margin-bottom: -20px;
margin-left: -20px;
transform: scale(0.8);
}
}
/* CONTENT-FORMAT */
/* CONTENT-FORMAT */
.content {
.content {
position: relative;
color: black;
}
}
.content p {
.content p {
margin-top: 0.1em;
margin-bottom: 0.1em;
}
}
.content :not(h1, strong, a) {
.content :not(h1, strong, a) {
margin-left: 3.5em;
color: #606060;
}
}
.content h1 {
.content h1 {
text-align: center;
font-size: 1.875em;
font-weight: normal;
margin-top: 0;
}
}
.content h2 {
.content h2 {
font-size: 1em;
text-align: center;
}
}
.content a {
.content a {
margin-left: 0em;
}
}
/* PRODUKTE-FORMAT */
/* PRODUKTE-FORMAT */
#aktuelle_auswahl {
#aktuelle_auswahl {
margin-left: 2.7em;
margin-bottom: -0.5em;
font-size: 1em;
}
}
.beispiel_produkte img {
.beispiel_produkte img {
border: #606060 1px solid;
height: 160px;
width: 150px;
margin-top: 1em;
margin-left: 2em;
}
}
.button_produkte {
.button_produkte {
background-color: #476B1C;
color: #fff;
padding: 5px 20px;
@ -177,51 +180,51 @@ header {
font-size: 1em;
cursor: pointer;
margin-left: -1em;
}
}
a:hover {
color: #f4eb49;
}
a:hover {
color:#f4eb49;
}
/* FOOTER-FORMAT */
/* FOOTER-FORMAT */
#balken {
#balken {
background-color: #9BB558;
height: 20px;
position: relative;
left: 0;
bottom: 0;
width: 100%;
}
}
/* BESTELLUNG-FORMAT */
/* BESTELLUNG-FORMAT */
input {
input {
font-family: Arial, Helvetica, sans-serif;
color: #606060
}
}
label {
label {
font-weight: normal;
border: none;
}
}
#anrede,
#titel,
#vorname,
#name,
#straße,
#hausnummer,
#plz,
#wohnort,
#email {
#anrede,
#titel,
#vorname,
#name,
#straße,
#hausnummer,
#plz,
#wohnort,
#email {
border: none;
width: 600px;
}
}
.bestellung_tabelle {
.bestellung_tabelle {
font-family: Arial, Helvetica, sans-serif;
font-size: 0.8em;
color: #606060;
@ -230,62 +233,62 @@ label {
margin-left: 50px;
border: thin solid #606060;
border-collapse: collapse;
}
}
.bestellung_tabelle th {
.bestellung_tabelle th {
border: thin solid #606060;
}
}
.bestellung_tabelle td {
.bestellung_tabelle td {
border: thin solid #606060;
width: 600px;
}
}
.bestellung_tabelle tr {
.bestellung_tabelle tr {
height: 25px;
}
}
.stern {
.stern {
width: 30px;
text-align: center;
}
}
.feld_vorn {
.feld_vorn {
width: 115px;
}
}
#tabellenbeschreibung {
#tabellenbeschreibung {
font-size: 0.8em;
margin-top: 6px;
margin-left: 60px;
}
}
#gesamtkosten {
#gesamtkosten {
font-size: 1em;
color: black;
margin-top: 40px;
margin-left: 50px;
}
}
.checkboxen {
.checkboxen {
display: inline-block;
font-size: 0.8em;
text-align: justify;
}
}
.checkbox_ausrichtung {
.checkbox_ausrichtung {
margin-left: 50px;
}
}
#begrueßung_bestellung_abschließen {
#begrueßung_bestellung_abschließen {
font-size: 2em;
font-family: Arial, Helvetica, sans-serif;
color: black;
text-align: center;
margin-top: 0.5px;
}
}
.button_abschließen {
.button_abschließen {
background-color: #476B1C;
color: white;
padding: 3px 10px;
@ -297,42 +300,42 @@ label {
margin: 4px 2px;
cursor: pointer;
font-weight: normal;
}
}
.button_abschließen_position {
.button_abschließen_position {
margin-left: 100px;
}
}
.produktueberschrift {
.produktueberschrift {
text-align: center;
margin: 50px;
}
}
.parent {
.parent {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
align-content: center;
}
}
.produkte {
.produkte {
display: flex;
border: #606060 3px solid;
display: inline-block;
margin: 25px;
}
}
.produktbottom {
.produktbottom {
justify-content: space-between;
display: flex;
margin: 10px;
}
}
.produktbottom a {
.produktbottom a {
position: relative;
}
}
.produkte_warenkorb {
.produkte_warenkorb {
position: relative;
max-width: 88%;
height: 165px;
@ -341,33 +344,33 @@ label {
margin-bottom: 22.5px;
display: flex;
align-items: center;
}
}
.produkte_warenkorb img {
.produkte_warenkorb img {
margin-right: 0px;
height: 60%;
}
}
.content .produkte_details {
.content .produkte_details {
color: black;
font-weight: bold;
width: 150px;
display: block;
font-size: 0.8em;
margin-top: -40px;
}
}
.button_mit_menue {
.button_mit_menue {
display: flex;
align-items: center;
position: absolute;
bottom: 50px;
right: 30px;
}
}
.button_entfernen {
.button_entfernen {
background-color: #ebebeb;
border: thin solid black;
color: black;
@ -383,31 +386,31 @@ label {
cursor: pointer;
font-weight: normal;
}
}
#menue {
#menue {
width: 35px;
height: 25px;
margin-left: 10px;
}
}
.content .gesamtbetrag {
.content .gesamtbetrag {
font-weight: bold;
color: black;
position: absolute;
font-size: 1em;
bottom: 15px;
right: 15px;
}
}
.gesamtbetrag {
.gesamtbetrag {
position: absolute;
font-size: 1em;
bottom: 15px;
right: 15px;
}
}
.button_hinzufuegen {
.button_hinzufuegen {
background-color: #9BB558;
color: white;
padding: 10px;
@ -422,17 +425,17 @@ label {
position: relative;
box-shadow: 0px 4px 3px rgba(0, 0, 0, 0.3);
margin-top: 0.5em;
}
}
.button_hinzufuegen::before {
.button_hinzufuegen::before {
content: "+";
position: absolute;
transform: translate(-50%, -40%);
font-size: 3em;
font-weight: normal;
}
}
#notification {
#notification {
display: none;
position: fixed;
top: 0;
@ -443,9 +446,9 @@ label {
text-align: center;
padding: 10px;
z-index: 999;
}
}
.content .äußererContainer {
.content .äußererContainer {
position: relative;
bottom: 0;
width: 400px;
@ -455,9 +458,9 @@ label {
margin-bottom: 22.5px;
display: grid;
grid-template-rows: auto auto;
}
}
.content .kostenContainer {
.content .kostenContainer {
position: relative;
width: 300px;
@ -466,37 +469,37 @@ label {
font-size: 0.9em;
display: inline-block;
margin-left: 0px;
}
}
.content .lieferkosten_text {
.content .lieferkosten_text {
color: black;
display: inline-block;
margin-left: 0px;
margin-right: 110px;
text-align: right;
}
}
.content .lieferkosten_preis {
.content .lieferkosten_preis {
color: black;
display: inline-block;
}
}
.content .gesamtkosten_text {
.content .gesamtkosten_text{
color: black;
display: inline-block;
text-align: left;
margin-left: 0;
margin-right: 63px;
}
}
.content .gesamtpreis {
.content .gesamtpreis{
color: black;
display: inline-block;
margin-left: 0;
}
}
.content .button_bestellung_abschließen {
.content .button_bestellung_abschließen {
background-color: #476B1C;
color: white;
padding: 3px 10px;
@ -508,10 +511,4 @@ label {
margin: 4px 2px;
cursor: pointer;
font-weight: normal;
}
#fehlerbox {
text-align: center;
display: none;
color: red;
}
}

View File

@ -19,6 +19,22 @@
display:none;
}
#aktuelle_auswahl {
display:none;
}
.beispiel_produkte {
display:none;
}
.button_produkte {
display:none;
}
#greeting-desktop {
display:none;
}
/* ALL-FORMAT */
* {
@ -63,14 +79,9 @@
/* NAV-MOBILE-FORMAT */
.navbar-mobile {
display: grid;
grid-template-columns: 380px auto;
background-image: url('../pictures/mobile_header.png');
background-repeat: no-repeat;
background-position: center;
background-size: cover;
position: sticky;
height: 60px;
display:grid;
grid-template-columns: 60px auto auto;
grid-template-rows: 60px;
}
.navbar-mobile .nav-container a {
@ -86,16 +97,15 @@
color: #f4eb49;
}
/*.nav-container {
}*/
.nav-container {
background-color: #476B1C;
}
.nav-container .checkbox {
position: absolute;
display: flex;
height: 60px;
width: 60px;
background: #476B1C;
top: 0px;
left: 0px;
z-index: 3;
@ -104,10 +114,10 @@
}
.nav-container .hamburger-lines {
height: 26px;
width: 32px;
height: 30px;
width: 36px;
position: absolute;
top: 17px;
top: 20px;
left: 20px;
z-index: 0;
display: flex;
@ -117,7 +127,7 @@
.nav-container .hamburger-lines .line {
display: block;
height: 6px;
height: 7px;
width: 100%;
border-radius: 0px;
background: #fff;
@ -142,7 +152,7 @@
padding-top: 15px;
background-color: #476B1C;
height: 35vh;
width: 80%;
width: 380%;
transform: translate(-150%);
display: flex;
flex-direction: column;
@ -189,10 +199,27 @@
/* HEADER-FORMAT */
header {
#header-mobile-farbe {
background-color: #9BB558;
}
.header-mobile-text h1 {
margin-left: 2%;
font-size:1.0em;
margin-top:0.5em;
}
.header-mobile-text p {
margin-left: 2%;
font-size:0.8em;
margin-top:-0.5em;
}
.header-mobile-logo {
background-position: center;
}
/* CONTENT-FORMAT */
.content {
@ -247,19 +274,6 @@
}
.button_produkte {
background-color: #476B1C;
color: white;
padding: 5px 20px;
border-radius: 15px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 1em;
cursor: pointer;
margin-left: -1em;
}
a:hover {
color:#f4eb49;
}

View File

@ -15,21 +15,31 @@
<header>
<nav>
<div class="navbar-mobile">
<div class="nav-container">
<div class="nav-container" >
<input class="checkbox" type="checkbox" name="" id="" />
<div class="hamburger-lines">
<span class="line line1"></span>
<span class="line line2"></span>
<span class="line line3"></span>
</div>
<nav class="navbar menu-items">
<div class="navbar menu-items">
<a href="ueber_uns.html">Über uns</a>
<a href="produkte.html">Produkte</a>
<a href="warenkorb.html">Warenkorb</a>
<a href="kontakt.html">Kontakt</a>
<a href="impressum.html">Impressum</a>
<a href="datenschutz.html">Datenschutz</a>
</nav>
</div>
</div>
<div id="header-mobile-farbe">
<span class="header-mobile-text">
<h1>Second Harvest</h1>
<p>Gib Lebensmitteln eine zweite Chance</p>
</span>
</div>
<div id="header-mobile-farbe" class="header-mobile-logo">
<a href="index.html">
<img src="pictures/logo_secondharvest_transparent.png" width="120" alt="Second Harvest Logo"></a>
</div>
</div>
</nav>

View File

@ -15,21 +15,31 @@
<header>
<nav>
<div class="navbar-mobile">
<div class="nav-container">
<div class="nav-container" >
<input class="checkbox" type="checkbox" name="" id="" />
<div class="hamburger-lines">
<span class="line line1"></span>
<span class="line line2"></span>
<span class="line line3"></span>
</div>
<nav class="navbar menu-items">
<div class="navbar menu-items">
<a href="ueber_uns.html">Über uns</a>
<a href="produkte.html">Produkte</a>
<a href="warenkorb.html">Warenkorb</a>
<a href="kontakt.html">Kontakt</a>
<a href="impressum.html">Impressum</a>
<a href="datenschutz.html">Datenschutz</a>
</nav>
</div>
</div>
<div id="header-mobile-farbe">
<span class="header-mobile-text">
<h1>Second Harvest</h1>
<p>Gib Lebensmitteln eine zweite Chance</p>
</span>
</div>
<div id="header-mobile-farbe" class="header-mobile-logo">
<a href="index.html">
<img src="pictures/logo_secondharvest_transparent.png" width="120" alt="Second Harvest Logo"></a>
</div>
</div>
</nav>

View File

@ -14,21 +14,31 @@
<header>
<nav>
<div class="navbar-mobile">
<div class="nav-container">
<div class="nav-container" >
<input class="checkbox" type="checkbox" name="" id="" />
<div class="hamburger-lines">
<span class="line line1"></span>
<span class="line line2"></span>
<span class="line line3"></span>
</div>
<nav class="navbar menu-items">
<div class="navbar menu-items">
<a href="ueber_uns.html">Über uns</a>
<a href="produkte.html">Produkte</a>
<a href="warenkorb.html">Warenkorb</a>
<a href="kontakt.html">Kontakt</a>
<a href="impressum.html">Impressum</a>
<a href="datenschutz.html">Datenschutz</a>
</nav>
</div>
</div>
<div id="header-mobile-farbe">
<span class="header-mobile-text">
<h1>Second Harvest</h1>
<p>Gib Lebensmitteln eine zweite Chance</p>
</span>
</div>
<div id="header-mobile-farbe" class="header-mobile-logo">
<a href="index.html">
<img src="pictures/logo_secondharvest_transparent.png" width="120" alt="Second Harvest Logo"></a>
</div>
</div>
</nav>
@ -62,15 +72,15 @@
<table>
<tr>
<td><img src="pictures/FoodAmpel_rot.png"></td>
<td><img src="pictures/foodampel_rot.png"></td>
<td>muss sofort verarbeitet werden</td>
</tr>
<tr>
<td><img src="pictures/FoodAmpel_gelb.png"></td>
<td><img src="pictures/foodampel_gelb.png"></td>
<td>kann ein paar Tage liegen</td>
</tr>
<tr>
<td><img src="pictures/FoodAmpel_gruen.png"></td>
<td><img src="pictures/foodampel_gruen.png"></td>
<td>lange Haltbarkeit</td>
</tr>
</table>
@ -90,7 +100,8 @@
<p>
<a class= "button_produkte" href="produkte.html">zu den Produkten</a>
</p>
<h2>Viel Spaß bei Deinem Einkauf. Dein Second Harvest Team.</h2>
<h2 id="greeting-desktop">Viel Spaß bei Deinem Einkauf. Dein Second Harvest Team.</h2>
<h2 id="greeting-mobile">Viel Spaß bei Deinem Einkauf.</h2>
</div>
<footer>

View File

@ -3,7 +3,7 @@ let x = Number(localStorage.getItem("gesamtpreis")).toFixed(2);
let y = document.getElementById("gesamtkosten");
y.innerHTML = "Die Gesamtkosten (inkl. MwSt.) belaufen sich auf: " + x + "€";
function checkform(event) {
function checkform() {
let vorname = document.getElementById('vorname').value;
let name = document.getElementById('name').value;
let straße = document.getElementById('straße').value;
@ -12,23 +12,11 @@ function checkform(event) {
let wohnort = document.getElementById('wohnort').value;
let email = document.getElementById('email').value;
fehlerbox.innerHTML = 'Fehler: <br>';
if (/[a-zA-Z]{2,}/.test(vorname) === false) fehlerbox.innerHTML += 'Vorname: mindestens zwei Buchstaben <br>';
if (/[a-zA-Z]{2,}/.test(name) === false) fehlerbox.innerHTML += 'Name: mindestens zwei Buchstaben <br>';
if (/[a-zA-Z0-9]{2,}/.test(straße) === false) fehlerbox.innerHTML += 'Straße: mindestens zwei Zeichen <br>';
if (/[0-9]{1,}/.test(hausnummer) === false) fehlerbox.innerHTML += 'Hausnummer: mindestens eine Zahl <br>';
if (/[0-9]{4,5}/.test(plz) === false) fehlerbox.innerHTML += 'Postleitzahl: mindestens vier Zahlen <br>';
if (/[a-zA-Z]{2,}/.test(wohnort) === false) fehlerbox.innerHTML += 'Wohnort: mindestens zwei Buchstaben <br>';
if (/^([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])+@[a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])+\.[a-z]{2,4}){0,}$/.test(email) === false) fehlerbox.innerHTML += 'EMail: bitte nach dem Muster "email@beispiel.de" <br>';
if(fehlerbox.innerHTML.length > 12) {
event.preventDefault();
let fehlerboxstyle = document.getElementById('fehlerbox');
fehlerbox.style = 'display: block;'
}
if (/[a-zA-Z]{2,}/.test(vorname) === false) alert('vorname falsch');
if (/[a-zA-Z]{2,}/.test(name) === false) alert('name falsch');
if (/[a-zA-Z]{2,}/.test(straße) === false) alert('straße falsch');
if (/[0-9]{1,}/.test(hausnummer) === false) alert('hausnummer falsch');
if (/[0-9]{4,5}/.test(plz) === false) alert('plz falsch');
if (/[a-zA-Z]{2,}/.test(wohnort) === false) alert('wohnort falsch');
if (/^([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])+@[a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])+\.[a-z]{2,4}){0,}$/.test(email) === false) alert('email falsch');
}
const fehlerbox = document.getElementById('fehlerbox');
const bestellbutton = document.getElementById('bestellbutton');
bestellbutton.addEventListener('click', checkform, false);

View File

@ -9,7 +9,7 @@ if (window.location.pathname.includes("/produkte.html")) {
"birnen": 0.50, // Preis für Birnen
"kiwi": 0.95, // Preis für Kiwi
"orangen": 2.0, //Preis für Orangen
"aepfel": 2.0 //Preis für Aepfel
"äpfel": 2.0 //Preis für Äpfel
};
// Hole button1 - button6
for (let i = 1; i <= 6; i++) {
@ -396,12 +396,12 @@ function createWarenkorbDiv(warenkorb) {
}
location.reload(true);
});
} else if (produkt.id === "aepfel") {
} else if (produkt.id === "äpfel") {
const warenkorbDiv = document.createElement("div");
warenkorbDiv.setAttribute("data-id", "aepfel");
warenkorbDiv.setAttribute("data-id", "äpfel");
warenkorbDiv.classList.add("produkte_warenkorb");
const produktBild = document.createElement("img");
produktBild.src = "pictures/aepfel_ohne_preis.png.avif"
produktBild.src = "pictures/äpfel_ohne_preis.png.avif"
produktBild.alt = produkt.id;
warenkorbDiv.appendChild(produktBild);
@ -454,10 +454,10 @@ function createWarenkorbDiv(warenkorb) {
produkt.anzahl--;
localStorage.setItem("warenkorb", JSON.stringify(warenkorb));
} else {
entferneProdukt("aepfel");
entferneProdukt("äpfel");
console.log("Hier ausgabe vom Warenkorb:");
console.log(warenkorb);
const apfelContainer = document.querySelector('[data-id="aepfel"]');
const apfelContainer = document.querySelector('[data-id="äpfel"]');
//Löschen vom warenkorbDiv
warenkorbContainer.removeChild(apfelContainer);
}

View File

@ -15,21 +15,31 @@
<header>
<nav>
<div class="navbar-mobile">
<div class="nav-container">
<div class="nav-container" >
<input class="checkbox" type="checkbox" name="" id="" />
<div class="hamburger-lines">
<span class="line line1"></span>
<span class="line line2"></span>
<span class="line line3"></span>
</div>
<nav class="navbar menu-items">
<div class="navbar menu-items">
<a href="ueber_uns.html">Über uns</a>
<a href="produkte.html">Produkte</a>
<a href="warenkorb.html">Warenkorb</a>
<a href="kontakt.html">Kontakt</a>
<a href="impressum.html">Impressum</a>
<a href="datenschutz.html">Datenschutz</a>
</nav>
</div>
</div>
<div id="header-mobile-farbe">
<span class="header-mobile-text">
<h1>Second Harvest</h1>
<p>Gib Lebensmitteln eine zweite Chance</p>
</span>
</div>
<div id="header-mobile-farbe" class="header-mobile-logo">
<a href="index.html">
<img src="pictures/logo_secondharvest_transparent.png" width="120" alt="Second Harvest Logo"></a>
</div>
</div>
</nav>

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

View File

@ -16,21 +16,31 @@
<header>
<nav>
<div class="navbar-mobile">
<div class="nav-container">
<div class="nav-container" >
<input class="checkbox" type="checkbox" name="" id="" />
<div class="hamburger-lines">
<span class="line line1"></span>
<span class="line line2"></span>
<span class="line line3"></span>
</div>
<nav class="navbar menu-items">
<div class="navbar menu-items">
<a href="ueber_uns.html">Über uns</a>
<a href="produkte.html">Produkte</a>
<a href="warenkorb.html">Warenkorb</a>
<a href="kontakt.html">Kontakt</a>
<a href="impressum.html">Impressum</a>
<a href="datenschutz.html">Datenschutz</a>
</nav>
</div>
</div>
<div id="header-mobile-farbe">
<span class="header-mobile-text">
<h1>Second Harvest</h1>
<p>Gib Lebensmitteln eine zweite Chance</p>
</span>
</div>
<div id="header-mobile-farbe" class="header-mobile-logo">
<a href="index.html">
<img src="pictures/logo_secondharvest_transparent.png" width="120" alt="Second Harvest Logo"></a>
</div>
</div>
</nav>
@ -125,7 +135,7 @@
</div>
<div class="produkte">
<img src="pictures/aepfel.png" width = "300" height="300" alt="Äpfel" data-id="aepfel">
<img src="pictures/äpfel.png" width = "300" height="300" alt="Äpfel" data-id="äpfel">
<div class ="produktbottom">
<img src ="pictures/FoodAmpel_gelb.png" width ="50" height="50" alt="FoodAmpel gelb">
<select name="quantity">

View File

@ -15,21 +15,31 @@
<header>
<nav>
<div class="navbar-mobile">
<div class="nav-container">
<div class="nav-container" >
<input class="checkbox" type="checkbox" name="" id="" />
<div class="hamburger-lines">
<span class="line line1"></span>
<span class="line line2"></span>
<span class="line line3"></span>
</div>
<nav class="navbar menu-items">
<div class="navbar menu-items">
<a href="ueber_uns.html">Über uns</a>
<a href="produkte.html">Produkte</a>
<a href="warenkorb.html">Warenkorb</a>
<a href="kontakt.html">Kontakt</a>
<a href="impressum.html">Impressum</a>
<a href="datenschutz.html">Datenschutz</a>
</nav>
</div>
</div>
<div id="header-mobile-farbe">
<span class="header-mobile-text">
<h1>Second Harvest</h1>
<p>Gib Lebensmitteln eine zweite Chance</p>
</span>
</div>
<div id="header-mobile-farbe" class="header-mobile-logo">
<a href="index.html">
<img src="pictures/logo_secondharvest_transparent.png" width="120" alt="Second Harvest Logo"></a>
</div>
</div>
</nav>

View File

@ -16,21 +16,31 @@
<header>
<nav>
<div class="navbar-mobile">
<div class="nav-container">
<div class="nav-container" >
<input class="checkbox" type="checkbox" name="" id="" />
<div class="hamburger-lines">
<span class="line line1"></span>
<span class="line line2"></span>
<span class="line line3"></span>
</div>
<nav class="navbar menu-items">
<div class="navbar menu-items">
<a href="ueber_uns.html">Über uns</a>
<a href="produkte.html">Produkte</a>
<a href="warenkorb.html">Warenkorb</a>
<a href="kontakt.html">Kontakt</a>
<a href="impressum.html">Impressum</a>
<a href="datenschutz.html">Datenschutz</a>
</nav>
</div>
</div>
<div id="header-mobile-farbe">
<span class="header-mobile-text">
<h1>Second Harvest</h1>
<p>Gib Lebensmitteln eine zweite Chance</p>
</span>
</div>
<div id="header-mobile-farbe" class="header-mobile-logo">
<a href="index.html">
<img src="pictures/logo_secondharvest_transparent.png" width="120" alt="Second Harvest Logo"></a>
</div>
</div>
</nav>