Compare commits

..

No commits in common. "cee9220f6a1ef5a935099cba7d9a3bdc1cbba3e9" and "4e243976dbcd4821f21842b1b9196992a5d6f303" have entirely different histories.

4 changed files with 112 additions and 213 deletions

View File

@ -1,103 +1,104 @@
/* === Grundlayout === */
body { body {
margin: 0; margin: 0;
font-family: var(--font-family-main); font-family: var(--font-family-main);
background-color: var(--brand-background); background-color: var(--brand-background);
color: var(--brand-white); color: var(--brand-white);
} }
/* === Header-Bereich === */
.welcome-header { .welcome-header {
text-align: center; text-align: center;
margin: 60px 20px 40px 20px; margin: 60px 20px 40px 20px;
} }
.welcome-heading { .welcome-heading {
font-size: 50px; font-size: 50px;
font-weight: 500; font-weight: 500;
color: var(--brand-primary); color: var(--brand-primary);
margin-bottom: 20px; margin-bottom: 20px;
} }
.welcome-subheading { .welcome-subheading {
font-size: 28px; font-size: 28px;
font-weight: bold; font-weight: bold;
color: white; color: white;
text-align: left; text-align: left;
max-width: 1000px; max-width: 1000px;
margin: 0 auto; margin: 0 auto;
padding-left: 230px; padding-left: 230px;
margin-bottom: 30px;
} }
.course-grid { /* === Kurs-Grid === */
display: flex; .courses-view {
flex-wrap: wrap; display: flex;
gap: 30px; flex-direction: row;
margin: 0 auto; flex-wrap: wrap;
gap: 30px;
justify-content: center;
padding: 30px 0 30px 0;
} }
/* === Kurs-Karte === */
.course-card { .course-card {
background: var(--brand-white); background: var(--brand-white);
border-radius: 12px; border-radius: 12px;
overflow: hidden; overflow: hidden;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
min-height: 300px; min-height: 300px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%;
max-width: 600px;
} }
/* Optional: Kurs-Bildbereich */
.course-image { .course-image {
background-color: #ddd; background-color: #ddd; /* Platzhalter kannst du durch echte Bilder ersetzen */
height: 180px; height: 180px;
width: 100%; width: 100%;
} }
/* === Kurs-Inhalt === */
.course-content { .course-content {
background-color: var(--brand-primary); background-color: var(--brand-primary); /* Orange */
color: var(--brand-white); color: var(--brand-white);
padding: 20px; padding: 20px;
font-size: 16px; font-size: 16px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: flex-start; align-items: flex-start;
gap: 10px; gap: 10px;
} }
.course-left, .course-left,
.course-right { .course-right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
font-size: 14px; font-size: 14px;
line-height: 1.4; line-height: 1.4;
} }
.course-left div:first-child, .course-left div:first-child,
.course-right div:first-child { .course-right div:first-child {
font-weight: bold; font-weight: bold;
font-size: 16px; font-size: 16px;
} }
.course-right { .course-right {
text-align: right; text-align: right;
} }
@media screen and (max-width: 1024px) { @media screen and (max-width: 1024px) {
.course-card {
flex: 0 0 calc(50% - 20px);
}
} }
@media screen and (max-width: 640px) { @media screen and (max-width: 640px) {
.course-card { .welcome-heading {
flex: 0 0 100%; font-size: 36px;
} }
.welcome-heading { .welcome-subheading {
font-size: 36px; font-size: 20px;
} text-align: center;
}
.welcome-subheading {
font-size: 20px;
text-align: center;
}
} }

View File

@ -1,33 +0,0 @@
.filter-box {
background: #EB8202;
color: #fff;
padding: 1em;
max-width: 300px;
border-radius: 8px;
font-family: sans-serif;
margin-bottom: 1em;
}
.filter-box label {
display: block;
margin-top: 0.5em;
}
.filter-box select,
.filter-box input[type="text"],
.filter-box input[type="range"] {
width: 100%;
margin-top: 0.25em;
}
.filter-box button {
margin-top: 1em;
width: 100%;
background: white;
color: #000;
border: none;
padding: 0.5em;
font-weight: bold;
cursor: pointer;
border-radius: 4px;
}

View File

@ -7,7 +7,6 @@
@import url(Element/button.css); @import url(Element/button.css);
@import url(Element/card.css); @import url(Element/card.css);
@import url(Element/sidebar.css); @import url(Element/sidebar.css);
@import url(Element/filter_box.css);
*, *,
*:before, *:before,

View File

@ -1,128 +1,60 @@
<?php <?php
include dirname(__DIR__) . '/header.phtml'; include dirname(__DIR__) . '/header.phtml';
// Filter auslesen
$rating = $_GET['rating'] ?? '';
$price = $_GET['price'] ?? '';
$location = $_GET['location'] ?? '';
?> ?>
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<h1 class="welcome-heading">KURSE & ERLEBNISSE JEDER ART</h1> <h1 class="welcome-heading">KURSE & ERLEBNISSE JEDER ART</h1>
<p class="welcome-subheading">Alle Kurse in deiner Nähe auf einen Blick</p> <p class="welcome-subheading">Alle Kurse in deiner Nähe auf einen Blick</p>
<div class="courses-view">
<?php
// Beispiel-Kurse
$kurse = [
[
'bewertung' => 5,
'titel' => 'Marketing Pro',
'adresse' => 'Bulu ulu Straße 17',
'preis' => '59,99€',
'ort' => '33333 Frankfurt',
'leiter' => 'Max Mustermann'
],
[
'bewertung' => 4,
'titel' => 'Design Basics',
'adresse' => 'Musterstraße 10',
'preis' => '39,99€',
'ort' => '10115 Berlin',
'leiter' => 'Lisa Beispiel'
],
[
'bewertung' => 5,
'titel' => 'Excel Masterclass',
'adresse' => 'Tabellenweg 5',
'preis' => '49,99€',
'ort' => '20457 Hamburg',
'leiter' => 'Thomas Tabelle'
]
];
<div class="row"> foreach ($kurse as $kurs): ?>
<div class="col-4"> <div class="course-card col-4">
<div class="filter-box"> <div class="course-image"></div>
<form method="get"> <div class="course-content">
<label for="rating">Bewertung:</label> <div class="course-left">
<select name="rating" id="rating"> <div><?= $kurs['bewertung'] ?></div>
<option value="">Alle</option> <div><?= $kurs['titel'] ?></div>
<option value="5" <?= $rating == '5' ? 'selected' : '' ?>>5 Sterne</option> <div>Kursleiter: <?= $kurs['leiter'] ?></div>
<option value="4" <?= $rating == '4' ? 'selected' : '' ?>>4 Sterne+</option> <div><?= $kurs['adresse'] ?></div>
<option value="3" <?= $rating == '3' ? 'selected' : '' ?>>3 Sterne+</option> </div>
</select> <div class="course-right">
<div><?= $kurs['preis'] ?></div>
<label for="price">Preis:</label> <div><?= $kurs['ort'] ?></div>
<select name="price" id="price"> </div>
<option value="">Alle</option>
<option value="asc" <?= $price == 'asc' ? 'selected' : '' ?>>Aufsteigend</option>
<option value="desc" <?= $price == 'desc' ? 'selected' : '' ?>>Absteigend</option>
</select>
<button type="submit">Anwenden</button>
</form>
</div> </div>
</div> </div>
<?php endforeach; ?>
<div class="col-8"> </div>
<!-- KURSLISTE -->
<div class="course-grid row">
<?php
$kurse = [
[
'bewertung' => 5,
'titel' => 'Marketing Pro',
'adresse' => 'Bulu ulu Straße 17',
'preis' => '59,99€',
'ort' => '33333 Frankfurt',
'leiter' => 'Max Mustermann'
],
[
'bewertung' => 4,
'titel' => 'Design Basics',
'adresse' => 'Musterstraße 10',
'preis' => '39,99€',
'ort' => '10115 Berlin',
'leiter' => 'Lisa Beispiel'
],
[
'bewertung' => 5,
'titel' => 'Excel Masterclass',
'adresse' => 'Tabellenweg 5',
'preis' => '49,99€',
'ort' => '20457 Hamburg',
'leiter' => 'Thomas Tabelle'
],
[
'bewertung' => 5,
'titel' => 'Excel Masterclass',
'adresse' => 'Tabellenweg 5',
'preis' => '49,99€',
'ort' => '20457 Hamburg',
'leiter' => 'Thomas Tabelle'
],
[
'bewertung' => 5,
'titel' => 'Excel Masterclass',
'adresse' => 'Tabellenweg 5',
'preis' => '49,99€',
'ort' => '20457 Hamburg',
'leiter' => 'Thomas Tabelle'
],
];
// Filter anwenden
$filteredKurse = array_filter($kurse, function($kurs) use ($rating, $location) {
if ($rating && $kurs['bewertung'] < $rating) return false;
if ($location && stripos($kurs['ort'], $location) === false) return false;
return true;
});
// Preise in Float umwandeln für Sortierung
if ($price) {
usort($filteredKurse, function($a, $b) use ($price) {
$priceA = floatval(str_replace(',', '.', str_replace('€', '', $a['preis'])));
$priceB = floatval(str_replace(',', '.', str_replace('€', '', $b['preis'])));
return $price === 'asc' ? $priceA <=> $priceB : $priceB <=> $priceA;
});
}
foreach ($filteredKurse as $kurs): ?>
<div class="course-card col-4">
<div class="course-image"></div>
<div class="course-content">
<div class="course-left">
<div><?= $kurs['bewertung'] ?></div>
<div><?= $kurs['titel'] ?></div>
<div>Kursleiter: <?= $kurs['leiter'] ?></div>
<div><?= $kurs['adresse'] ?></div>
</div>
<div class="course-right">
<div><?= $kurs['preis'] ?></div>
<div><?= $kurs['ort'] ?></div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>