html kontaktformular.html erstellt.
This commit is contained in:
parent
4ee49a70fd
commit
5bea7b14dd
@ -29,7 +29,7 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li class="menu-item"><a href="/ueberuns">Über uns</a></li>
|
||||
<li class="menu-item"><a href="/kontakt">Kontakt</a></li>
|
||||
<li class="menu-item"><a href="/kontaktformular">Kontakt</a></li>
|
||||
<li class="menu-item"><a href="/bestellformular">Bestellformular</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@ -3,113 +3,53 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Modellauto - Startseite</title>
|
||||
<title>Kontaktformular</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>
|
||||
<div id="header"></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>
|
||||
<section style="padding: 40px 20px; max-width: 700px; margin: 0 auto;">
|
||||
<h1>Kontaktieren Sie uns</h1>
|
||||
<p style="margin-bottom: 30px;">Sie haben Fragen oder Anregungen? Schreiben Sie uns – wir melden uns schnellstmöglich!</p>
|
||||
|
||||
<!-- 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>
|
||||
<form id="contact-form">
|
||||
<div class="input-box">
|
||||
<input type="text" name="name" placeholder="Ihr Name" required>
|
||||
<i class='bx bx-user'></i>
|
||||
</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 class="input-box">
|
||||
<input type="email" name="email" placeholder="Ihre E-Mail-Adresse" required>
|
||||
<i class='bx bx-envelope'></i>
|
||||
</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 class="input-box">
|
||||
<input type="text" name="betreff" placeholder="Betreff" required>
|
||||
<i class='bx bx-edit-alt'></i>
|
||||
</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 class="input-box">
|
||||
<textarea name="nachricht" placeholder="Ihre Nachricht" rows="6" style="width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 5px; font-size: 16px;" required></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn">Nachricht senden</button>
|
||||
</form>
|
||||
</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 -->
|
||||
<!-- Footer -->
|
||||
<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");
|
||||
}
|
||||
document.getElementById('contact-form').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
alert('Vielen Dank für Ihre Nachricht! Wir melden uns bald bei Ihnen.');
|
||||
this.reset(); // Formular leeren
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -74,4 +74,10 @@ router.get('/bestellformular', (req, res) => {
|
||||
router.get('/bestellung', (req, res) => {
|
||||
res.sendFile(path.join(__dirname, '../../../public/bestellung/bestellung.html'));
|
||||
})
|
||||
|
||||
router.get('/kontaktformular', (req, res) => {
|
||||
res.sendFile(path.join(__dirname, '../../../public/kontaktformular/kontaktformular.html'));
|
||||
})
|
||||
|
||||
|
||||
module.exports = router;
|
||||
Loading…
x
Reference in New Issue
Block a user