Compare commits
No commits in common. "15ab8a999db0466bc6ce3783115d62e0ff8dfbe8" and "f31e8081a5e0f28c1b0d13430c3bef338c475ca2" have entirely different histories.
15ab8a999d
...
f31e8081a5
1
package-lock.json
generated
1
package-lock.json
generated
@ -523,7 +523,6 @@
|
|||||||
"version": "2.18.1",
|
"version": "2.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz",
|
"resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz",
|
||||||
"integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==",
|
"integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bignumber.js": "9.0.0",
|
"bignumber.js": "9.0.0",
|
||||||
"readable-stream": "2.3.7",
|
"readable-stream": "2.3.7",
|
||||||
|
|||||||
@ -1,38 +0,0 @@
|
|||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<link rel="stylesheet" href="./Styles/header/header.css">
|
|
||||||
<title>Header</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<!-- header.html -->
|
|
||||||
<header>
|
|
||||||
<div class="logo-container">
|
|
||||||
<img src="/images/Logo.png" alt="Modellauto-Shop Logo" class="logo-img">
|
|
||||||
<h1>Modellauto-Shop</h1>
|
|
||||||
</div>
|
|
||||||
<div class="header-right">
|
|
||||||
<a href="/login" class="login-btn">Login</a>
|
|
||||||
<div class="cart">
|
|
||||||
<i class='bx bx-cart'></i>
|
|
||||||
<span class="cart-count">0</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<nav class="menu">
|
|
||||||
<ul class="menu-list">
|
|
||||||
<li class="menu-item"><a href="/">Startseite</a></li>
|
|
||||||
<li class="menu-item">
|
|
||||||
<a href="/shop">Shop</a>
|
|
||||||
<ul class="submenu">
|
|
||||||
<li><a href="/shop/motorrad">Motorräder</a></li>
|
|
||||||
<li><a href="/shop/oldtimer">Oldtimer</a></li>
|
|
||||||
<li><a href="/shop/sportwagen">Sportwagen</a></li>
|
|
||||||
<li><a href="/shop/lkw">LKWs</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="menu-item"><a href="#">Über uns</a></li>
|
|
||||||
<li class="menu-item"><a href="#">Kontakt</a></li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
@ -5,21 +5,9 @@
|
|||||||
<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="./Styles/login/login.css">
|
<link rel="stylesheet" href="./Styles/login/login.css">
|
||||||
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="./Styles/header/header.css">
|
|
||||||
<title>Login</title>
|
<title>Login</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Header -->
|
|
||||||
<div id="header-placeholder"></div>
|
|
||||||
<script>
|
|
||||||
fetch(href="/header")
|
|
||||||
.then(response => response.text())
|
|
||||||
.then(data => {
|
|
||||||
document.getElementById('header-placeholder').innerHTML = data;
|
|
||||||
})
|
|
||||||
.catch(error => console.error('Fehler beim Laden des Headers:', error));
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<form action="login.php" method="POST">
|
<form action="login.php" method="POST">
|
||||||
<h1>Login</h1>
|
<h1>Login</h1>
|
||||||
|
|||||||
@ -8,18 +8,6 @@
|
|||||||
<title>Registrieren</title>
|
<title>Registrieren</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Header -->
|
|
||||||
<div id="header-placeholder"></div>
|
|
||||||
<script>
|
|
||||||
fetch(href="/header")
|
|
||||||
.then(response => response.text())
|
|
||||||
.then(data => {
|
|
||||||
document.getElementById('header-placeholder').innerHTML = data;
|
|
||||||
})
|
|
||||||
.catch(error => console.error('Fehler beim Laden des Headers:', error));
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- Regestrierungsformular -->
|
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<form action="register.php" method="POST">
|
<form action="register.php" method="POST">
|
||||||
<h1>Registrieren</h1>
|
<h1>Registrieren</h1>
|
||||||
|
|||||||
@ -1,86 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="de">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Shop</title>
|
|
||||||
<link rel="stylesheet" href="./Styles/shop/shop.css">
|
|
||||||
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="./Styles/header/header.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<!-- Header -->
|
|
||||||
<div id="header-placeholder"></div>
|
|
||||||
<script>
|
|
||||||
fetch(href="/header")
|
|
||||||
.then(response => response.text())
|
|
||||||
.then(data => {
|
|
||||||
document.getElementById('header-placeholder').innerHTML = data;
|
|
||||||
})
|
|
||||||
.catch(error => console.error('Fehler beim Laden des Headers:', error));
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<section style="padding: 20px 30px; text-align: left; background: #fff;">
|
|
||||||
<h1>Willkommen im Webshop</h1>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
<div id="product-list" class="card-grid">
|
|
||||||
<!-- Hier werden die Produkte dynamisch eingefügt -->
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
|
||||||
const apiUrl = 'http://localhost:3000/api/products';
|
|
||||||
|
|
||||||
// Hole die Produktdaten von der API
|
|
||||||
fetch(apiUrl)
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => {
|
|
||||||
const productList = document.getElementById('product-list');
|
|
||||||
|
|
||||||
// Iteriere durch die Produkte und erstelle HTML für jedes Produkt
|
|
||||||
data.forEach(product => {
|
|
||||||
const card = document.createElement('div');
|
|
||||||
card.classList.add('card');
|
|
||||||
|
|
||||||
const img = document.createElement('img');
|
|
||||||
img.src = product.imageUrl || 'https://shop.porsche.com/_next/image?url=https%3A%2F%2Fassets-prod.porsche.com%2Fassets%2Fce81555c-4f59-485e-9f9b-7a448a4d91b3.webp&w=2560&q=75';
|
|
||||||
// Bild aus DB
|
|
||||||
img.alt = product.name;
|
|
||||||
|
|
||||||
const name = document.createElement('h3');
|
|
||||||
name.textContent = product.name;
|
|
||||||
|
|
||||||
const price = document.createElement('p');
|
|
||||||
price.textContent = `Preis: ${product.price}€`;
|
|
||||||
|
|
||||||
const description = document.createElement('p');
|
|
||||||
description.textContent = product.description || '';
|
|
||||||
|
|
||||||
const button = document.createElement('button');
|
|
||||||
button.classList.add('add-to-cart');
|
|
||||||
button.textContent = 'Zum Warenkorb hinzufügen';
|
|
||||||
button.addEventListener('click', () => {
|
|
||||||
console.log(`${product.name} wurde zum Warenkorb hinzugefügt`);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Alles zur Karte hinzufügen
|
|
||||||
card.appendChild(img);
|
|
||||||
card.appendChild(name);
|
|
||||||
card.appendChild(price);
|
|
||||||
card.appendChild(description);
|
|
||||||
card.appendChild(button);
|
|
||||||
|
|
||||||
productList.appendChild(card);
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
console.error('Fehler beim Laden der Produkte:', error);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="de">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Shop</title>
|
|
||||||
<link rel="stylesheet" href="./Styles/shop/shop.css">
|
|
||||||
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="./Styles/header/header.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="de">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Shop</title>
|
|
||||||
<link rel="stylesheet" href="./Styles/shop/shop.css">
|
|
||||||
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="./Styles/header/header.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="de">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Shop</title>
|
|
||||||
<link rel="stylesheet" href="./Styles/shop/shop.css">
|
|
||||||
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="./Styles/header/header.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="de">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Shop</title>
|
|
||||||
<link rel="stylesheet" href="./Styles/shop/shop.css">
|
|
||||||
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="./Styles/header/header.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -3,98 +3,73 @@
|
|||||||
<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">
|
||||||
<title>Modellauto</title>
|
<title>Autohändler Webshop</title>
|
||||||
<link rel="stylesheet" href="./Styles/startseite/startseite.css">
|
<link rel="stylesheet" href="./Styles/startseite/startseite.css">
|
||||||
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="./Styles/header_footer/header_footer.css">
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Wrapper für die gesamte Seite -->
|
<!-- Wrapper für die gesamte Seite -->
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div id="header-placeholder"></div>
|
<header>
|
||||||
<script>
|
<h1>Autohändler Webshop</h1>
|
||||||
fetch(href="/header")
|
<div class="header-right">
|
||||||
.then(response => response.text())
|
<a href="/login" class="login-btn">Login</a>
|
||||||
.then(data => {
|
<div class="cart">
|
||||||
document.getElementById('header-placeholder').innerHTML = data;
|
<i class='bx bx-cart'></i>
|
||||||
})
|
<span class="cart-count">0</span>
|
||||||
.catch(error => console.error('Fehler beim Laden des Headers:', error));
|
</div>
|
||||||
</script>
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
<!-- Infobereich -->
|
<!-- Navigationsleiste -->
|
||||||
<section style="padding: 40px 20px; text-align: center; background: #fff;">
|
<nav class="menu">
|
||||||
<h2>Willkommen bei deinem Modellauto-Shop</h2>
|
<ul class="menu-list">
|
||||||
<p>Bei uns findest du hochwertige Modellautos – ob Oldtimer, Sportwagen oder Nutzfahrzeuge.
|
<li class="menu-item">
|
||||||
Perfekt für Sammler, Bastler und Fans.
|
<a href="/">Startseite</a>
|
||||||
</p>
|
</li>
|
||||||
</section>
|
<li class="menu-item">
|
||||||
|
<a href="#">Shop</a>
|
||||||
|
<ul class="submenu">
|
||||||
|
<li><a href="/shop/oldtimer">Oldtimer</a></li>
|
||||||
|
<li><a href="/shop/sportwagen">Sportwagen</a></li>
|
||||||
|
<li><a href="/shop/lkw">LKWs</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="menu-item">
|
||||||
|
<a href="#">Über uns</a>
|
||||||
|
</li>
|
||||||
|
<li class="menu-item">
|
||||||
|
<a href="#">Kontakt</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
<!-- Hauptinhalt -->
|
<!-- Hauptinhalt -->
|
||||||
</br>
|
|
||||||
<h1>Unsere Neusten Produkte</h1>
|
|
||||||
<section class="card-grid" id="latest-products">
|
|
||||||
<!-- Dynamische Produkte (5 aktuelle Produkte) -->
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
fetch('/api/products/latest')
|
|
||||||
.then(res => res.json())
|
|
||||||
.then(products => {
|
|
||||||
const container = document.getElementById('latest-products');
|
|
||||||
container.innerHTML = ''; // sicherheitshalber leeren
|
|
||||||
|
|
||||||
products.forEach(product => {
|
|
||||||
const card = document.createElement('div');
|
|
||||||
card.classList.add('card');
|
|
||||||
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>
|
|
||||||
`;
|
|
||||||
container.appendChild(card);
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
console.error('Fehler beim Laden der neuesten Produkte:', err);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Info-Sektion -->
|
|
||||||
<section style="background: #ffffff; padding: 40px 20px; display: flex; flex-wrap: wrap; justify-content: space-around; gap: 30px; text-align: center;">
|
|
||||||
<div style="flex: 1 1 250px;">
|
|
||||||
<i class='bx bx-package' style="font-size: 40px; color: #ff6600;"></i>
|
|
||||||
<h3>Versandkostenfrei ab 50 €</h3>
|
|
||||||
<p>Schneller & sicherer Versand mit Sendungsverfolgung.</p>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1 1 250px;">
|
|
||||||
<i class='bx bx-credit-card' style="font-size: 40px; color: #ff6600;"></i>
|
|
||||||
<h3>Flexible Zahlungsmethoden</h3>
|
|
||||||
<p>PayPal, Kreditkarte, Klarna, Vorkasse – du hast die Wahl.</p>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1 1 250px;">
|
|
||||||
<i class='bx bx-undo' style="font-size: 40px; color: #ff6600;"></i>
|
|
||||||
<h3>14 Tage Rückgaberecht</h3>
|
|
||||||
<p>Unzufrieden? Kein Problem – Rückgabe einfach & unkompliziert.</p>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1 1 250px;">
|
|
||||||
<i class='bx bx-star' style="font-size: 40px; color: #ff6600;"></i>
|
|
||||||
<h3>Top-Bewertungen</h3>
|
|
||||||
<p>Unsere Kunden lieben uns – überzeug dich selbst!</p>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- Fußzeiele -->
|
|
||||||
<footer style="background: #222; color: #fff; padding: 30px 20px; text-align: center; margin-top: 40px;">
|
|
||||||
<p>© 2025 Autohändler Webshop – Alle Rechte vorbehalten</p>
|
|
||||||
<p><a href="/impressum" style="color: #ff6600; text-decoration: none;">Impressum</a> |
|
|
||||||
<a href="/datenschutz" style="color: #ff6600; text-decoration: none;">Datenschutz</a></p>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
|
<h1>Unsere Angebote</h1>
|
||||||
|
<main>
|
||||||
|
<section class="card-grid">
|
||||||
|
<div class="card">
|
||||||
|
<img src="https://shop.porsche.com/_next/image?url=https%3A%2F%2Fassets-prod.porsche.com%2Fassets%2Fce81555c-4f59-485e-9f9b-7a448a4d91b3.webp&w=2560&q=75" alt="Porsche">
|
||||||
|
<h3>Name des Produktes</h3>
|
||||||
|
<p>Preis: 23€</p>
|
||||||
|
<p>weitere Infos</p>
|
||||||
|
<button class="add-to-cart">Zum Warenkorb hinzufügen</button>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<img src="https://www.modellautocenter.de/media/image/product/23241/md/avia-a31n-pritsche-mit-plane-blau-modellauto-143-premium-classixxs.jpg" alt="LKW">
|
||||||
|
<h3>Avia A31N Pritsche mit Plane blau Modellauto 1:43 Premium ClassiXXs</h3>
|
||||||
|
<p>Preis: 74,99€</p>
|
||||||
|
<p>Modellauto / Premium ClassiXXs 1:43
|
||||||
|
Avia A31N Pritsche mit Plane, fertiges Modellauto aus Die-Cast (Metall)</p>
|
||||||
|
<button class="add-to-cart">Zum Warenkorb hinzufügen</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Scripts -->
|
||||||
|
<script src="startseite.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -17,12 +17,4 @@ router.get('/registrieren', (req, res) => {
|
|||||||
res.sendFile(path.join(__dirname, '../../../public/registrieren/registrieren.html'));
|
res.sendFile(path.join(__dirname, '../../../public/registrieren/registrieren.html'));
|
||||||
})
|
})
|
||||||
|
|
||||||
router.get('/header', (req, res) => {
|
|
||||||
res.sendFile(path.join(__dirname, '../../../public/header_footer/header_footer.html'));
|
|
||||||
})
|
|
||||||
|
|
||||||
router.get('/shop', (req, res) => {
|
|
||||||
res.sendFile(path.join(__dirname, '../../../public/shop/shop.html'));
|
|
||||||
})
|
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
51
server.js
51
server.js
@ -6,24 +6,6 @@ const path = require('path');
|
|||||||
require('dotenv').config({path:'process.env'});
|
require('dotenv').config({path:'process.env'});
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const mysql = require('mysql');
|
|
||||||
|
|
||||||
// Datenbankverbindung
|
|
||||||
const db = mysql.createConnection({
|
|
||||||
host: 'localhost',
|
|
||||||
user: 'root',
|
|
||||||
password: '',
|
|
||||||
database: 'webshop'
|
|
||||||
});
|
|
||||||
|
|
||||||
// Verbindung zur MySQL-Datenbank herstellen
|
|
||||||
db.connect(err => {
|
|
||||||
if (err) {
|
|
||||||
console.error('Fehler beim Verbinden zur Datenbank:', err);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
console.log('Mit der Datenbank verbunden');
|
|
||||||
});
|
|
||||||
|
|
||||||
app.use(session({
|
app.use(session({
|
||||||
secret: 'secret',
|
secret: 'secret',
|
||||||
@ -36,41 +18,10 @@ app.use(express.urlencoded({ extended: true }));
|
|||||||
app.use(express.static(path.join(__dirname, '/scripts')));
|
app.use(express.static(path.join(__dirname, '/scripts')));
|
||||||
app.use(express.static(path.join(__dirname, '/static')));
|
app.use(express.static(path.join(__dirname, '/static')));
|
||||||
|
|
||||||
// API-Route für Produkte
|
|
||||||
app.get('/api/products', (req, res) => {
|
|
||||||
// SQL-Abfrage für Produktdaten
|
|
||||||
const sql = 'SELECT * FROM webshop.product';
|
|
||||||
|
|
||||||
// Abfrage ausführen
|
|
||||||
db.query(sql, (err, results) => {
|
|
||||||
if (err) {
|
|
||||||
console.error('Fehler beim Abrufen der Produkte:', err);
|
|
||||||
res.status(500).send('Fehler beim Abrufen der Produkte');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
res.json(results); // Rückgabe der Produktdaten als JSON
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
app.get('/api/products/latest', async (req, res) => {
|
|
||||||
// SQL-Abfrage für Produktdaten
|
|
||||||
const sql = 'SELECT * FROM webshop.product ORDER BY created_at DESC LIMIT 5';
|
|
||||||
|
|
||||||
// Abfrage ausführen
|
|
||||||
db.query(sql, (err, results) => {
|
|
||||||
if (err) {
|
|
||||||
console.error('Fehler beim Abrufen der Produkte:', err);
|
|
||||||
res.status(500).send('Fehler beim Abrufen der Produkte');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
res.json(results); // Rückgabe der Produktdaten als JSON
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const getIndexRoute = require('./scripts/routes/other/route-index');
|
const getIndexRoute = require('./scripts/routes/other/route-index');
|
||||||
|
|
||||||
app.use('/', getIndexRoute);
|
app.use('/', getIndexRoute);
|
||||||
|
|
||||||
// Sever starten
|
|
||||||
app.listen(process.env.APP_PORT, () => {
|
app.listen(process.env.APP_PORT, () => {
|
||||||
console.log("\x1b[32m");
|
console.log("\x1b[32m");
|
||||||
console.log(`Server is running on http://localhost:${process.env.APP_PORT}`);
|
console.log(`Server is running on http://localhost:${process.env.APP_PORT}`);
|
||||||
|
|||||||
@ -1,245 +0,0 @@
|
|||||||
/* Allgemeine Einstellungen */
|
|
||||||
* {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-family: "Poppins", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
background: #f8f9fa;
|
|
||||||
color: #333;
|
|
||||||
min-height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Header */
|
|
||||||
header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 15px 20px;
|
|
||||||
width: 100%;
|
|
||||||
background: #ffffff;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo-container {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo-img {
|
|
||||||
height: 60px;
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
header h1 {
|
|
||||||
font-size: 28px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-right {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header .login-btn {
|
|
||||||
font-size: 14px;
|
|
||||||
text-decoration: none;
|
|
||||||
color: white;
|
|
||||||
background: #ff6600;
|
|
||||||
padding: 10px 20px;
|
|
||||||
border-radius: 25px;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
header .login-btn:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cart {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: relative;
|
|
||||||
font-size: 24px;
|
|
||||||
color: #ff6600;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cart-count {
|
|
||||||
position: absolute;
|
|
||||||
top: -5px;
|
|
||||||
right: -10px;
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
font-size: 12px;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Navigation */
|
|
||||||
.menu {
|
|
||||||
background: #ffffff;
|
|
||||||
width: 100%;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-list {
|
|
||||||
list-style: none;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
padding: 15px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #333;
|
|
||||||
font-size: 18px;
|
|
||||||
padding: 10px 20px;
|
|
||||||
transition: background 0.3s ease, color 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item a:hover {
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Submenu */
|
|
||||||
.submenu {
|
|
||||||
position: absolute;
|
|
||||||
top: 100%;
|
|
||||||
left: 0;
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
display: none;
|
|
||||||
list-style: none;
|
|
||||||
min-width: 200px;
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li {
|
|
||||||
padding: 10px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li a {
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li a:hover {
|
|
||||||
color: white;
|
|
||||||
background: #ff6600;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item:hover .submenu {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Suchleiste */
|
|
||||||
.search-bar {
|
|
||||||
display: flex;
|
|
||||||
gap: 15px;
|
|
||||||
width: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
background: #ffffff;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
position: sticky;
|
|
||||||
top: 65px;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar input,
|
|
||||||
.search-bar select {
|
|
||||||
padding: 12px;
|
|
||||||
font-size: 16px;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
border-radius: 5px;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar button {
|
|
||||||
padding: 12px 20px;
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
border-radius: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar button:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Karten */
|
|
||||||
.card-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
||||||
gap: 20px;
|
|
||||||
width: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
text-align: center;
|
|
||||||
padding: 20px;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card img {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
border-radius: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card h3 {
|
|
||||||
font-size: 20px;
|
|
||||||
color: #333;
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card p {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #666;
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-to-cart {
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
padding: 12px 20px;
|
|
||||||
border-radius: 25px;
|
|
||||||
margin-top: 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-to-cart:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
@ -107,238 +107,3 @@ h1 {
|
|||||||
.register-link a:hover {
|
.register-link a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allgemeine Einstellungen */
|
|
||||||
* {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-family: "Poppins", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
background: #f8f9fa;
|
|
||||||
color: #333;
|
|
||||||
min-height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Header */
|
|
||||||
header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 15px 20px;
|
|
||||||
width: 100%;
|
|
||||||
background: #ffffff;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
header h1 {
|
|
||||||
font-size: 28px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-right {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header .login-btn {
|
|
||||||
font-size: 14px;
|
|
||||||
text-decoration: none;
|
|
||||||
color: white;
|
|
||||||
background: #ff6600;
|
|
||||||
padding: 10px 20px;
|
|
||||||
border-radius: 25px;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
header .login-btn:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cart {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: relative;
|
|
||||||
font-size: 24px;
|
|
||||||
color: #ff6600;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cart-count {
|
|
||||||
position: absolute;
|
|
||||||
top: -5px;
|
|
||||||
right: -10px;
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
font-size: 12px;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Navigation */
|
|
||||||
.menu {
|
|
||||||
background: #ffffff;
|
|
||||||
width: 100%;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-list {
|
|
||||||
list-style: none;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
padding: 15px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #333;
|
|
||||||
font-size: 18px;
|
|
||||||
padding: 10px 20px;
|
|
||||||
transition: background 0.3s ease, color 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item a:hover {
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Submenu */
|
|
||||||
.submenu {
|
|
||||||
position: absolute;
|
|
||||||
top: 100%;
|
|
||||||
left: 0;
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
display: none;
|
|
||||||
list-style: none;
|
|
||||||
min-width: 200px;
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li {
|
|
||||||
padding: 10px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li a {
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li a:hover {
|
|
||||||
color: white;
|
|
||||||
background: #ff6600;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item:hover .submenu {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Suchleiste */
|
|
||||||
.search-bar {
|
|
||||||
display: flex;
|
|
||||||
gap: 15px;
|
|
||||||
width: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
background: #ffffff;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
position: sticky;
|
|
||||||
top: 65px;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar input,
|
|
||||||
.search-bar select {
|
|
||||||
padding: 12px;
|
|
||||||
font-size: 16px;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
border-radius: 5px;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar button {
|
|
||||||
padding: 12px 20px;
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
border-radius: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar button:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Karten */
|
|
||||||
.card-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
||||||
gap: 20px;
|
|
||||||
width: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
text-align: center;
|
|
||||||
padding: 20px;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card img {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
border-radius: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card h3 {
|
|
||||||
font-size: 20px;
|
|
||||||
color: #333;
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card p {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #666;
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-to-cart {
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
padding: 12px 20px;
|
|
||||||
border-radius: 25px;
|
|
||||||
margin-top: 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-to-cart:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,245 +0,0 @@
|
|||||||
/* Allgemeine Einstellungen */
|
|
||||||
* {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-family: "Poppins", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
background: #f8f9fa;
|
|
||||||
color: #333;
|
|
||||||
min-height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Header */
|
|
||||||
header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 15px 20px;
|
|
||||||
width: 100%;
|
|
||||||
background: #ffffff;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo-container {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo-img {
|
|
||||||
height: 60px;
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
header h1 {
|
|
||||||
font-size: 28px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-right {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header .login-btn {
|
|
||||||
font-size: 14px;
|
|
||||||
text-decoration: none;
|
|
||||||
color: white;
|
|
||||||
background: #ff6600;
|
|
||||||
padding: 10px 20px;
|
|
||||||
border-radius: 25px;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
header .login-btn:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cart {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: relative;
|
|
||||||
font-size: 24px;
|
|
||||||
color: #ff6600;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cart-count {
|
|
||||||
position: absolute;
|
|
||||||
top: -5px;
|
|
||||||
right: -10px;
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
font-size: 12px;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Navigation */
|
|
||||||
.menu {
|
|
||||||
background: #ffffff;
|
|
||||||
width: 100%;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-list {
|
|
||||||
list-style: none;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
padding: 15px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #333;
|
|
||||||
font-size: 18px;
|
|
||||||
padding: 10px 20px;
|
|
||||||
transition: background 0.3s ease, color 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item a:hover {
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Submenu */
|
|
||||||
.submenu {
|
|
||||||
position: absolute;
|
|
||||||
top: 100%;
|
|
||||||
left: 0;
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
display: none;
|
|
||||||
list-style: none;
|
|
||||||
min-width: 200px;
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li {
|
|
||||||
padding: 10px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li a {
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li a:hover {
|
|
||||||
color: white;
|
|
||||||
background: #ff6600;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item:hover .submenu {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Suchleiste */
|
|
||||||
.search-bar {
|
|
||||||
display: flex;
|
|
||||||
gap: 15px;
|
|
||||||
width: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
background: #ffffff;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
position: sticky;
|
|
||||||
top: 65px;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar input,
|
|
||||||
.search-bar select {
|
|
||||||
padding: 12px;
|
|
||||||
font-size: 16px;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
border-radius: 5px;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar button {
|
|
||||||
padding: 12px 20px;
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
border-radius: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar button:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Karten */
|
|
||||||
.card-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
||||||
gap: 20px;
|
|
||||||
width: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
text-align: center;
|
|
||||||
padding: 20px;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card img {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
border-radius: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card h3 {
|
|
||||||
font-size: 20px;
|
|
||||||
color: #333;
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card p {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #666;
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-to-cart {
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
padding: 12px 20px;
|
|
||||||
border-radius: 25px;
|
|
||||||
margin-top: 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-to-cart:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
@ -28,17 +28,6 @@ header {
|
|||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo-container {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo-img {
|
|
||||||
height: 60px;
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 MiB |
Loading…
x
Reference in New Issue
Block a user