Compare commits
2 Commits
f31e8081a5
...
15ab8a999d
| Author | SHA1 | Date | |
|---|---|---|---|
| 15ab8a999d | |||
| 009f796c0f |
1
package-lock.json
generated
1
package-lock.json
generated
@ -523,6 +523,7 @@
|
||||
"version": "2.18.1",
|
||||
"resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz",
|
||||
"integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bignumber.js": "9.0.0",
|
||||
"readable-stream": "2.3.7",
|
||||
|
||||
38
public/header_footer/header_footer.html
Normal file
38
public/header_footer/header_footer.html
Normal file
@ -0,0 +1,38 @@
|
||||
<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,9 +5,21 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="./Styles/login/login.css">
|
||||
<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>
|
||||
</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>
|
||||
|
||||
<div class="wrapper">
|
||||
<form action="login.php" method="POST">
|
||||
<h1>Login</h1>
|
||||
|
||||
@ -8,6 +8,18 @@
|
||||
<title>Registrieren</title>
|
||||
</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>
|
||||
|
||||
<!-- Regestrierungsformular -->
|
||||
<div class="wrapper">
|
||||
<form action="register.php" method="POST">
|
||||
<h1>Registrieren</h1>
|
||||
|
||||
86
public/shop/shop.html
Normal file
86
public/shop/shop.html
Normal file
@ -0,0 +1,86 @@
|
||||
<!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>
|
||||
19
public/shop/shop_lkw.html
Normal file
19
public/shop/shop_lkw.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!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>
|
||||
17
public/shop/shop_motorrad.html
Normal file
17
public/shop/shop_motorrad.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!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>
|
||||
17
public/shop/shop_oldtimer.html
Normal file
17
public/shop/shop_oldtimer.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!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>
|
||||
16
public/shop/shop_sportwagen.html
Normal file
16
public/shop/shop_sportwagen.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!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,73 +3,98 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Autohändler Webshop</title>
|
||||
<title>Modellauto</title>
|
||||
<link rel="stylesheet" href="./Styles/startseite/startseite.css">
|
||||
<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>
|
||||
<body>
|
||||
<!-- Wrapper für die gesamte Seite -->
|
||||
<div class="wrapper">
|
||||
<!-- Header -->
|
||||
<header>
|
||||
<h1>Autohändler Webshop</h1>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<!-- Navigationsleiste -->
|
||||
<nav class="menu">
|
||||
<ul class="menu-list">
|
||||
<li class="menu-item">
|
||||
<a href="/">Startseite</a>
|
||||
</li>
|
||||
<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>
|
||||
<!-- Infobereich -->
|
||||
<section style="padding: 40px 20px; text-align: center; background: #fff;">
|
||||
<h2>Willkommen bei deinem Modellauto-Shop</h2>
|
||||
<p>Bei uns findest du hochwertige Modellautos – ob Oldtimer, Sportwagen oder Nutzfahrzeuge.
|
||||
Perfekt für Sammler, Bastler und Fans.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="startseite.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -17,4 +17,12 @@ router.get('/registrieren', (req, res) => {
|
||||
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;
|
||||
51
server.js
51
server.js
@ -6,6 +6,24 @@ const path = require('path');
|
||||
require('dotenv').config({path:'process.env'});
|
||||
|
||||
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({
|
||||
secret: 'secret',
|
||||
@ -18,10 +36,41 @@ app.use(express.urlencoded({ extended: true }));
|
||||
app.use(express.static(path.join(__dirname, '/scripts')));
|
||||
app.use(express.static(path.join(__dirname, '/static')));
|
||||
|
||||
const getIndexRoute = require('./scripts/routes/other/route-index');
|
||||
// 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');
|
||||
app.use('/', getIndexRoute);
|
||||
|
||||
// Sever starten
|
||||
app.listen(process.env.APP_PORT, () => {
|
||||
console.log("\x1b[32m");
|
||||
console.log(`Server is running on http://localhost:${process.env.APP_PORT}`);
|
||||
|
||||
245
static/Styles/header_footer/header_footer.css
Normal file
245
static/Styles/header_footer/header_footer.css
Normal file
@ -0,0 +1,245 @@
|
||||
/* 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;
|
||||
}
|
||||
@ -106,4 +106,239 @@ h1 {
|
||||
|
||||
.register-link a:hover {
|
||||
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;
|
||||
}
|
||||
|
||||
245
static/Styles/shop/shop.css
Normal file
245
static/Styles/shop/shop.css
Normal file
@ -0,0 +1,245 @@
|
||||
/* 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,6 +28,17 @@ header {
|
||||
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;
|
||||
|
||||
BIN
static/images/Logo.png
Normal file
BIN
static/images/Logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
Loading…
x
Reference in New Issue
Block a user