showWelcome neu aufgebaut, style Funktionen komplett in card.css übergeben

This commit is contained in:
Besmir Skenderi 2025-07-02 11:06:52 +02:00
parent 430d1b38c0
commit 625cf0f30e
3 changed files with 118 additions and 48 deletions

View File

@ -1,73 +1,111 @@
.welcome-container { /* === Grundlayout === */
background-color: var(--brand-background); body {
padding: 40px 20px; margin: 0;
min-height: 100vh;
font-family: var(--font-family-main); font-family: var(--font-family-main);
background-color: var(--brand-background);
color: var(--brand-white);
}
/* === Header-Bereich === */
.welcome-header {
text-align: center;
margin: 60px 20px 40px 20px;
} }
.welcome-heading { .welcome-heading {
color: var (--brand-primary); font-size: 50px;
font-size: var(--font-size-title-h2); font-weight: 500;
margin-bottom: 40px; color: var(--brand-primary); /* Orange-Ton */
margin-bottom: 20px;
} }
.welcome-subheading {
font-size: 28px;
font-weight: bold;
color: white;
text-align: left;
max-width: 1000px;
margin: 0 auto;
padding-left: 230px;
}
/* === Kurs-Grid === */
.course-grid { .course-grid {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 30px;
justify-content: space-between; justify-content: space-between;
max-width: 100%; gap: 30px;
margin: 0 auto;
} }
/* === Kurs-Karte === */
.course-card { .course-card {
flex: 0 0 calc(33.333% - 20px); flex: 0 0 calc(33.333% - 20px); /* Drei nebeneinander */
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.3); 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;
margin-top: 30px;
} }
/* Optional: Kurs-Bildbereich */
.course-image { .course-image {
background-color: var(--brand-white); /* Platzhalter, später durch Kursbild ersetzen */ background-color: #ddd; /* Platzhalter kannst du durch echte Bilder ersetzen */
height: 200px; height: 180px;
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: var(--font-size-text); font-size: 16px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: flex-start;
font-family: var(--font-family-main); gap: 10px;
} }
.course-left, .course-left,
.course-right { .course-right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
font-size: var(--font-size-small); font-size: 14px;
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: var(--font-size-text); font-size: 16px;
} }
.course-right { .course-right {
text-align: right; text-align: right;
} }
.course-card { /* === Responsive Anpassung === */
display: flex; @media screen and (max-width: 1024px) {
flex-direction: column; .course-card {
flex: 0 0 calc(50% - 20px);
}
} }
.course-image { @media screen and (max-width: 640px) {
flex: 1; .course-card {
flex: 0 0 100%;
}
.welcome-heading {
font-size: 36px;
}
.welcome-subheading {
font-size: 20px;
text-align: center;
}
} }

View File

@ -10,6 +10,7 @@
.container{ .container{
max-width: 90%; max-width: 90%;
padding: 24px 42px 24px 42px; padding: 24px 42px 24px 42px;
margin: 0 auto;
} }
.row { .row {

View File

@ -1,29 +1,60 @@
<?php include dirname(__DIR__) . '/header.phtml'; ?> <?php
include dirname(__DIR__) . '/header.phtml';
<article class="welcome-container"> ?>
<h2 class="welcome-heading">Kurse</h2>
<div class="container">
<div class="row">
<div class="col-12">
<h1 class="welcome-heading">KURSE & ERLEBNISSE JEDER ART</h1>
<p class="welcome-subheading">Alle Kurse in deiner Nähe auf einen Blick</p>
<div class="course-grid"> <div class="course-grid">
<?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'
]
];
<?php for ($i = 0; $i < 6; $i++): ?> foreach ($kurse as $kurs): ?>
<div class="course-card"> <div class="course-card col-4">
<div class="course-image"></div> <div class="course-image"></div>
<div class="course-content"> <div class="course-content">
<div class="course-left"> <div class="course-left">
<div>5 ★ &nbsp; Marketing Pro</div> <div><?= $kurs['bewertung'] ?></div>
<div>Bulu ulu Straße 17</div> <div><?= $kurs['titel'] ?></div>
<div>Kursleiter: <?= $kurs['leiter'] ?></div>
<div><?= $kurs['adresse'] ?></div>
</div> </div>
<div class="course-right"> <div class="course-right">
<div>59,99€</div> <div><?= $kurs['preis'] ?></div>
<div>33333 Frankfurt</div> <div><?= $kurs['ort'] ?></div>
</div> </div>
</div> </div>
</div> </div>
<?php endfor; ?> <?php endforeach; ?>
</div> </div>
</div>
</article> </div>
</div>
<?php include dirname(__DIR__) . '/footer.phtml'; ?>