261 lines
17 KiB
PHP
261 lines
17 KiB
PHP
<div>
|
|
<!-- Hero Section with Contact Form -->
|
|
<section class="py-10 flex items-center relative overflow-hidden">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-20 bg-[hsl(var(--hero-container))] rounded-[20px] w-[95%]">
|
|
<div class="grid lg:grid-cols-2 gap-12 items-center">
|
|
<!-- Left Side - Hero Text -->
|
|
<div class="">
|
|
<h1 class="text-hero mb-6 tracking-wide">
|
|
{!! $content['hero']['title'] ?? 'Send us a<br /><span class="text-secondary font-medium">message.</span>' !!}
|
|
</h1>
|
|
<p class="text-large text-muted-foreground mb-8 max-w-md">
|
|
{{ $content['hero']['subtitle'] ?? 'Wir freuen uns auf Ihre Nachricht und werden uns schnellstmöglich bei Ihnen melden.' }}
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Right Side - Contact Form -->
|
|
<div class="card-elevated p-8 ">
|
|
@if ($success)
|
|
<div class="flex flex-col items-center text-center py-8 gap-5">
|
|
<div class="flex items-center justify-center w-20 h-20 rounded-full bg-green-100">
|
|
<svg class="w-10 h-10 text-green-600" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
|
|
</svg>
|
|
</div>
|
|
<div>
|
|
<p class="text-2xl font-semibold text-foreground">{{ __('ui.contact_form.success_title') }}</p>
|
|
<p class="text-muted-foreground mt-2 max-w-sm mx-auto">
|
|
{{ $content['form']['success_message'] ?? __('ui.contact_form.success_message') }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
@else
|
|
<form wire:submit="submit" class="space-y-6">
|
|
<div class="grid md:grid-cols-2 gap-4">
|
|
<div>
|
|
<label for="firstName" class="text-foreground mb-2 block text-sm font-medium">
|
|
{{ $content['form']['labels']['first_name'] ?? __('ui.contact_form.first_name') }}
|
|
</label>
|
|
<input
|
|
wire:model="firstName"
|
|
id="firstName"
|
|
type="text"
|
|
class="w-full px-3 py-2 bg-gray-50 border border-border rounded-lg outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-gray-600 sm:text-sm/6"
|
|
required
|
|
/>
|
|
@error('firstName') <span class="text-red-500 text-xs">{{ $message }}</span> @enderror
|
|
</div>
|
|
<div>
|
|
<label for="lastName" class="text-foreground mb-2 block text-sm font-medium">
|
|
{{ $content['form']['labels']['last_name'] ?? __('ui.contact_form.last_name') }}
|
|
</label>
|
|
<input
|
|
wire:model="lastName"
|
|
id="lastName"
|
|
type="text"
|
|
class="w-full px-3 py-2 bg-gray-50 border border-border rounded-lg outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-gray-600 sm:text-sm/6"
|
|
required
|
|
/>
|
|
@error('lastName') <span class="text-red-500 text-xs">{{ $message }}</span> @enderror
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="company" class="text-foreground mb-2 block text-sm font-medium">
|
|
{{ $content['form']['labels']['company'] ?? __('ui.contact_form.company') }}
|
|
</label>
|
|
<input
|
|
wire:model="company"
|
|
id="company"
|
|
type="text"
|
|
class="w-full px-3 py-2 bg-gray-50 border border-border rounded-lg outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-gray-600 sm:text-sm/6"
|
|
/>
|
|
@error('company') <span class="text-red-500 text-xs">{{ $message }}</span> @enderror
|
|
</div>
|
|
|
|
<div class="grid md:grid-cols-2 gap-4">
|
|
<div>
|
|
<label for="email" class="text-foreground mb-2 block text-sm font-medium">
|
|
{{ $content['form']['labels']['email'] ?? __('ui.contact_form.email') }}
|
|
</label>
|
|
<input
|
|
wire:model="email"
|
|
id="email"
|
|
type="email"
|
|
class="w-full px-3 py-2 bg-gray-50 border border-border rounded-lg outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-gray-600 sm:text-sm/6"
|
|
required
|
|
/>
|
|
@error('email') <span class="text-red-500 text-xs">{{ $message }}</span> @enderror
|
|
</div>
|
|
<div>
|
|
<label for="phone" class="text-foreground mb-2 block text-sm font-medium">
|
|
{{ $content['form']['labels']['phone'] ?? __('ui.contact_form.phone') }}
|
|
</label>
|
|
<input
|
|
wire:model="phone"
|
|
id="phone"
|
|
type="tel"
|
|
class="w-full px-3 py-2 bg-gray-50 border border-border rounded-lg outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-gray-600 sm:text-sm/6"
|
|
/>
|
|
@error('phone') <span class="text-red-500 text-xs">{{ $message }}</span> @enderror
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="subject" class="text-foreground mb-2 block text-sm font-medium">
|
|
{{ $content['form']['labels']['subject'] ?? __('ui.contact_form.subject') }}
|
|
</label>
|
|
<div class="grid grid-cols-1">
|
|
<select
|
|
wire:model="subject"
|
|
id="subject" name="subject"
|
|
class="col-start-1 row-start-1 w-full appearance-none rounded-md bg-gray-50 py-2 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-gray-600 sm:text-sm/6">
|
|
@foreach($this->subjects as $value => $label)
|
|
<option value="{{ $value }}">{{ $label }}</option>
|
|
@endforeach
|
|
</select>
|
|
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4">
|
|
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
|
</svg>
|
|
</div>
|
|
@error('subject') <span class="text-red-500 text-xs">{{ $message }}</span> @enderror
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
<label for="message" class="text-foreground mb-2 block text-sm font-medium">
|
|
{{ $content['form']['labels']['message'] ?? __('ui.contact_form.message') }}
|
|
</label>
|
|
<textarea
|
|
wire:model="message"
|
|
id="message"
|
|
rows="5"
|
|
class="w-full px-3 py-2 bg-gray-50 border border-border rounded-lg outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-gray-600 sm:text-sm/6 resize-none"
|
|
placeholder="{{ $content['form']['placeholders']['message'] ?? __('ui.contact_form.message_placeholder') }}"
|
|
required
|
|
></textarea>
|
|
@error('message') <span class="text-red-500 text-xs">{{ $message }}</span> @enderror
|
|
</div>
|
|
|
|
{{-- Honeypot --}}
|
|
<div class="opacity-0 absolute top-0 left-0 h-0 w-0 -z-10 overflow-hidden" aria-hidden="true">
|
|
<label for="website">Website</label>
|
|
<input type="text" id="website" name="website" wire:model="website" tabindex="-1" autocomplete="off">
|
|
</div>
|
|
|
|
<div x-data="{ on: $wire.entangle('privacy') }">
|
|
<label class="flex items-start gap-3 cursor-pointer">
|
|
<input
|
|
x-model="on"
|
|
id="privacy"
|
|
type="checkbox"
|
|
class="sr-only"
|
|
/>
|
|
<span
|
|
role="switch"
|
|
:aria-checked="on.toString()"
|
|
:class="on ? 'bg-green-500' : 'bg-muted'"
|
|
class="relative mt-0.5 w-11 h-6 shrink-0 rounded-full transition-colors duration-200"
|
|
>
|
|
<span
|
|
:class="on ? 'translate-x-5' : 'translate-x-0'"
|
|
class="absolute top-0.5 left-0.5 h-5 w-5 rounded-full bg-white shadow-sm transition-transform duration-200 pointer-events-none"
|
|
></span>
|
|
</span>
|
|
<span class="text-sm text-muted-foreground">
|
|
{{ __('ui.contact_form.privacy_prefix') }}
|
|
<a href="{{ route('privacy') }}" target="_blank" class="text-secondary underline underline-offset-2 hover:no-underline">Datenschutzerklärung</a>
|
|
{{ __('ui.contact_form.privacy_suffix') }}
|
|
</span>
|
|
</label>
|
|
@error('privacy') <span class="text-red-500 text-xs mt-1 block">{{ $message }}</span> @enderror
|
|
</div>
|
|
|
|
<button
|
|
type="submit"
|
|
class="w-full btn-primary flex items-center justify-center"
|
|
wire:loading.attr="disabled"
|
|
>
|
|
<div class="flex items-center justify-center">
|
|
<span wire:loading.remove>{{ $content['form']['button_text'] ?? __('ui.contact_form.send') }}</span>
|
|
<span wire:loading>{{ $content['form']['button_loading'] ?? __('ui.contact_form.sending') }}</span>
|
|
|
|
<svg wire:loading.remove class="ml-2 w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8l4 4m0 0l-4 4m4-4H3"/>
|
|
</svg>
|
|
</div>
|
|
</button>
|
|
<p class="text-sm text-muted-foreground">{{ __('ui.required_fields') }}</p>
|
|
</form>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Contact Information Cards -->
|
|
<section class="section-padding">
|
|
<div class="container-padding">
|
|
<div class="grid md:grid-cols-3 gap-8">
|
|
@foreach($this->contactInfo as $index => $info)
|
|
<div class="card-elevated p-8 rounded-xl text-center slide-up delay-{{ $index * 200 }}">
|
|
<div class="w-12 h-12 bg-secondary/20 rounded-full flex items-center justify-center mx-auto mb-4">
|
|
@if($info['icon'] === 'map-pin')
|
|
<svg class="w-6 h-6 text-secondary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"/>
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"/>
|
|
</svg>
|
|
@elseif($info['icon'] === 'mail')
|
|
<svg class="w-6 h-6 text-secondary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/>
|
|
</svg>
|
|
@else
|
|
<svg class="w-6 h-6 text-secondary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"/>
|
|
</svg>
|
|
@endif
|
|
</div>
|
|
<h3 class="text-xl mb-2 text-foreground">{{ $info['title'] }}</h3>
|
|
<div class="text-muted-foreground text-base">
|
|
@foreach($info['info'] as $line)
|
|
<p>{{ $line }}</p>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Social Media Section -->
|
|
{{-- <section class="section-padding bg-accent">
|
|
<div class="container-padding">
|
|
<div class="grid lg:grid-cols-2 gap-12 items-center">
|
|
<div class="slide-right delay-200">
|
|
<h2 class="text-section-title mb-6">
|
|
{!! $content['social_media']['title'] ?? 'Follow for<br /><span class="text-secondary font-medium">exclusives</span>' !!}
|
|
</h2>
|
|
<p class="text-muted-foreground mb-8 max-w-md">
|
|
{{ $content['social_media']['subtitle'] ?? 'Bleiben Sie auf dem Laufenden mit exklusiven Angeboten und News.' }}
|
|
</p>
|
|
</div>
|
|
|
|
<div class="space-y-4">
|
|
@foreach($this->socialMedia as $index => $social)
|
|
<div class="flex items-center justify-between p-4 border border-border rounded-lg hover:bg-muted/50 transition-colors slide-left delay-{{ $index * 200 }} cursor-pointer">
|
|
<div>
|
|
<h3 class="text-xl text-foreground">{{ $social['name'] }}</h3>
|
|
<p class="text-sm text-muted-foreground">{{ $social['handle'] }}</p>
|
|
</div>
|
|
<svg class="w-4 h-4 text-muted-foreground" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8l4 4m0 0l-4 4m4-4H3"/>
|
|
</svg>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
--}}
|
|
</div>
|