# Migration der Presswave Landingpage zu Laravel/Livewire
Dokumentation der Konvertierung der React/TypeScript Presswave-Landingpage zu Laravel Blade + Livewire für Business Portal 24.
**Datum:** 15. Oktober 2025
**Ziel-Domain:** businessportal24.test
**Theme-Farben:** Primary #cf3628 (Rot), Secondary #f0834a (Orange)
---
## 1. Analyse der Quellstruktur
### Ursprüngliche React-Struktur (dev/presswave)
```
src/
├── pages/
│ └── Index.tsx # Haupt-Landingpage
├── components/
│ ├── Header.tsx # Navigation & Suche
│ ├── FilterBar.tsx # Filter-Komponente
│ ├── PressReleaseCard.tsx # Karten-Komponente für Pressemitteilungen
│ └── BurgerMenu.tsx # Mobile Navigation
└── assets/
└── *.jpg # Bilder
```
### Hauptkomponenten identifiziert:
1. **Header** - Sticky Navigation mit Logo, Suchleiste und CTA-Buttons
2. **FilterBar** - Sticky Filter mit Zeitraum, Branche, Region und Sortierung
3. **Hero Section** - Gradient-Banner mit Überschrift
4. **Featured Section** - 3-spaltiges Grid mit hervorgehobenen Releases
5. **Main Grid** - 3-spaltiges Responsive Grid mit allen Releases
6. **Footer** - 4-spaltige Link-Struktur mit Social Media
---
## 2. Laravel Blade Struktur erstellt
### Haupt-Blade-Datei
**Pfad:** `resources/views/web/businessportal24.blade.php`
```blade
@extends('web.layouts.web-master')
@section('content')
@endsection
```
**Features:**
- Verwendet CSS-Variablen für Theme-Farben: `var(--color-primary)` und `var(--color-secondary)`
- Animationen via CSS Keyframes (`@keyframes fade-in-up`)
- Responsive Design mit Tailwind CSS
- Alpine.js für interaktive Elemente
---
## 3. Livewire-Komponenten erstellt
### 3.1 Header-Komponente
**Pfad:** `resources/views/livewire/web/header.blade.php`
**Funktionen:**
- Sticky Header mit Gradient-Border-Top
- Responsive Suchleiste (Desktop & Mobile)
- Burger-Menü für Mobile
- Logo mit dynamischem Gradient
- CTA-Buttons: "Anmelden" und "Veröffentlichen"
**Livewire Properties:**
```php
public $searchQuery = '';
public $showMobileSearch = false;
```
**Alpine.js Integration:**
- Mobile Search Toggle
- Smooth Transitions
---
### 3.2 FilterBar-Komponente
**Pfad:** `resources/views/livewire/web/filter-bar.blade.php`
**Funktionen:**
- Sticky Position unterhalb Header (top-16)
- 4 Filter-Dropdowns: Zeitraum, Branche, Region, Sortierung
- Active Filters Display mit Remove-Buttons
- "Alle zurücksetzen" Button
- Live-Wire: Real-time Filtering
**Livewire Properties:**
```php
public $timeframe = '7';
public $industry = 'all';
public $region = 'all';
public $sortBy = 'newest';
public $activeFilters = [];
```
**Events:**
```php
$this->dispatch('filters-updated', [...]);
```
---
### 3.3 PressReleaseCard-Komponente
**Pfad:** `resources/views/components/web/press-release-card.blade.php`
**Props:**
- `title`, `teaser`, `company`, `industry`, `region`, `date`
- `hasImage`, `hasPdf`, `companyLogo`, `slug`, `imageUrl`
**Features:**
- Image Preview mit Lazy Loading
- Company Logo Overlay
- Meta-Informationen (Branche, Region, Datum)
- Badges für Medien (Bild, PDF)
- Hover-Effekte: Scale & Border-Color
- Transition-Animationen (300ms)
**CSS-Klassen:**
```css
.card {
@apply hover:scale-[1.02] hover:border-primary/20;
@apply transition-all duration-300;
}
```
---
### 3.4 Featured Releases-Komponente
**Pfad:** `resources/views/livewire/web/featured-releases.blade.php`
**Layout:**
- 3-spaltiges Grid (lg:grid-cols-3)
- Linke Seite: 1 große Featured Card (lg:col-span-2)
- Rechte Seite: 2 gestapelte Cards
**Mock-Daten:**
- 3 Releases mit unterschiedlichen Bildern (Unsplash)
- Verschiedene Branchen: IT, Energie, Finanzen
---
### 3.5 Press Releases Grid-Komponente
**Pfad:** `resources/views/livewire/web/press-releases-grid.blade.php`
**Layout:**
- Responsive Grid: 1 col (mobile), 2 cols (md), 3 cols (lg)
- 6 Mock-Releases
**Features:**
- Verwendet `x-web.press-release-card` Komponente
- Loop durch `$releases` Array
---
### 3.6 Footer-Komponente
**Pfad:** `resources/views/livewire/web/footer.blade.php`
**Layout:**
- 4-spaltiges Grid (md:grid-cols-4)
- Spalten: Unternehmen, Services, Rechtliches, Social Media
- Theme-Toggle Button (Alpine.js)
**Links:**
- Interne Links: `/ueber-uns`, `/kontakt`, `/preise`, etc.
- Externe Links: LinkedIn, Twitter (target="_blank")
---
## 4. Theme & Styling
### 4.1 CSS-Theme-Datei
**Pfad:** `resources/css/web/theme-businessportal24.css`
**Farb-Variablen (HSL):**
```css
--primary: 4 61% 49%; /* #cf3628 */
--secondary: 22 84% 61%; /* #f0834a */
```
**Dark Mode Support:**
```css
.dark {
--background: 4 20% 10%;
--primary: 4 61% 49%;
/* ... */
}
```
---
### 4.2 Animationen
**Keyframes definiert:**
```css
@keyframes fade-in-up {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in-down { /* ... */ }
@keyframes slide-in-right { /* ... */ }
@keyframes scale-in { /* ... */ }
```
**Utility-Klassen:**
```css
.animate-fade-in-up { animation: fade-in-up 0.6s ease-out forwards; }
.animation-delay-200 { animation-delay: 0.2s; opacity: 0; }
```
**Verwendung in Blade:**
```html
Titel
Text
```
---
### 4.3 Component Styles
**Buttons:**
```css
.btn-primary {
@apply bg-gradient-to-r from-primary to-secondary;
@apply shadow-md hover:shadow-lg;
@apply transition-all duration-300;
}
```
**Cards:**
```css
.card {
@apply rounded-xl border shadow-sm hover:shadow-lg;
@apply transition-all duration-300;
}
```
**Badges:**
```css
.badge-primary {
@apply bg-primary/10 text-primary border border-primary/20;
}
```
---
## 5. React → Blade/Livewire Konvertierung
### Mapping-Tabelle
| React-Konzept | Laravel-Äquivalent | Beispiel |
|---------------|-------------------|----------|
| `useState()` | `public $property` | `public $searchQuery = '';` |
| `props` | `@props([...])` | `@props(['title', 'teaser'])` |
| `onClick` | `wire:click` | `wire:click="search"` |
| `onChange` | `wire:model.live` | `wire:model.live="timeframe"` |
| `map()` | `@foreach` | `@foreach($releases as $release)` |
| `x-show` (React) | `x-show` (Alpine) | `x-show="showMobileSearch"` |
| `dispatch()` | `$this->dispatch()` | `$this->dispatch('event')` |
| CSS-in-JS | Tailwind Classes | `class="bg-primary text-white"` |
---
### Spezifische Konvertierungen:
#### React Search Component:
```tsx
const [searchQuery, setSearchQuery] = useState('');
setSearchQuery(e.target.value)}
/>
```
#### Livewire Äquivalent:
```php
public $searchQuery = '';
```
---
#### React Filter Update:
```tsx
const [timeframe, setTimeframe] = useState('7');