html Kontakt spalte hinzugefügt
This commit is contained in:
parent
40e5db6551
commit
4ee49a70fd
115
public/kontaktformular/kontaktformular.html
Normal file
115
public/kontaktformular/kontaktformular.html
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Modellauto - Startseite</title>
|
||||||
|
<link rel="stylesheet" href="./Styles/styles-main.css">
|
||||||
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
|
<script src="/header_footer"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="wrapper">
|
||||||
|
<!-- Header -->
|
||||||
|
<div id="header-placeholder"></div>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<!-- Infobereich -->
|
||||||
|
<section style="padding: 40px 20px; text-align: center; background: #fff;">
|
||||||
|
<h2>Willkommen beim Modellauto-Shop</h2>
|
||||||
|
<p>Bei uns finden Sie hochwertige Modellautos – ob Oldtimer, Sportwagen, Lkw's oder Motorräder.
|
||||||
|
Perfekt für Sammler, Bastler und Fans.
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Hauptinhalt -->
|
||||||
|
<h1>Unsere Neusten Produkte: </h1>
|
||||||
|
<section class="card-grid" id="latest-products">
|
||||||
|
<!-- Dynamische Produkte (5 aktuelle Produkte) -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- JavaScript zum Abrufen und Anzeigen der neuesten Produkte -->
|
||||||
|
<script>
|
||||||
|
// API-Aufruf
|
||||||
|
fetch('/api/products/new')
|
||||||
|
// Antwort als JSON parsen
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(products => {
|
||||||
|
const container = document.getElementById('latest-products');
|
||||||
|
container.innerHTML = ''; // sicherheitshalber leeren
|
||||||
|
|
||||||
|
// Für jedes Produkt eine Karte erzeugen
|
||||||
|
products.forEach(product => {
|
||||||
|
const card = document.createElement('div');
|
||||||
|
card.classList.add('card');
|
||||||
|
// HTML-Inhalt der Karte mit Produktdaten füllen
|
||||||
|
card.innerHTML = `
|
||||||
|
<img src="${product.image_url}" alt="${product.name}">
|
||||||
|
<h3>${product.name}</h3>
|
||||||
|
<p>Preis: ${product.price}€</p>
|
||||||
|
<p>${product.description}</p>
|
||||||
|
<button class="add-to-cart" data-id="${product.id}">Zum Warenkorb hinzufügen</button>
|
||||||
|
`;
|
||||||
|
// Karte in Container einfügen
|
||||||
|
container.appendChild(card);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error('Fehler beim Laden der neuesten Produkte:', err);
|
||||||
|
|
||||||
|
const container = document.getElementById('latest-products');
|
||||||
|
container.innerHTML =
|
||||||
|
`<div class="error-message">
|
||||||
|
<h3>Fehler beim Laden der Produkte</h3>
|
||||||
|
<p>Es gab ein Problem beim Abrufen der Produktdaten.<br>Wir arbeiten bereits daran – bitte versuchen Sie es später erneut.</p>
|
||||||
|
</div>`;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Info-Sektion -->
|
||||||
|
<section class="info-cards-section">
|
||||||
|
<div class="info-card">
|
||||||
|
<i class='bx bx-package'></i>
|
||||||
|
<h3>Versandkostenfrei ab 50€</h3>
|
||||||
|
<p>Schneller & sicherer Versand mit Sendungsverfolgung.</p>
|
||||||
|
</div>
|
||||||
|
<div class="info-card">
|
||||||
|
<i class='bx bx-credit-card'></i>
|
||||||
|
<h3>Flexible Zahlungsmethoden</h3>
|
||||||
|
<p>PayPal, Kreditkarte, Klarna, Vorkasse – Sie haben die Wahl.</p>
|
||||||
|
</div>
|
||||||
|
<div class="info-card">
|
||||||
|
<i class='bx bx-undo'></i>
|
||||||
|
<h3>14 Tage Rückgaberecht</h3>
|
||||||
|
<p>Unzufrieden? Kein Problem – Rückgabe einfach & unkompliziert.</p>
|
||||||
|
</div>
|
||||||
|
<div class="info-card">
|
||||||
|
<i class='bx bx-star'></i>
|
||||||
|
<h3>Top-Bewertungen</h3>
|
||||||
|
<p>Unsere Kunden lieben uns – überzeugen Sie sich selbst!</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Kontakt-Button -->
|
||||||
|
<section style="text-align: center; margin: 40px 0;">
|
||||||
|
<button onclick="zeigeKontaktinfo()" style="padding: 10px 20px; font-size: 16px; background-color: #007BFF; color: white; border: none; border-radius: 5px; cursor: pointer;">
|
||||||
|
Kontakt
|
||||||
|
</button>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- Fußzeiele -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Scripts -->
|
||||||
|
<script src="startseite.js"></script>
|
||||||
|
<script>
|
||||||
|
function zeigeKontaktinfo() {
|
||||||
|
alert("Kontaktieren Sie uns unter folgendem:\n\nMail: jhdjfh@gmail.com\nPhone: +49 62348768\n\nIhr Webshop-Team");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -9,7 +9,7 @@
|
|||||||
<script src="/header_footer"></script>
|
<script src="/header_footer"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div id="header-placeholder"></div>
|
<div id="header-placeholder"></div>
|
||||||
|
|
||||||
@ -95,7 +95,7 @@
|
|||||||
<!-- Fußzeiele -->
|
<!-- Fußzeiele -->
|
||||||
<div id="footer"></div>
|
<div id="footer"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- Scripts -->
|
<!-- Scripts -->
|
||||||
<script src="startseite.js"></script>
|
<script src="startseite.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user