{{-- resources/views/globals/index.blade.php --}} @extends('layouts.app') @section('content')

Edit Header & Footer - {{ $website->name }}

@if($website->activeTheme) @endif ← Back to Dashboard

Customize your website's header and footer. Theme components will be used by default, or you can create custom versions.

@if(session('success')) @endif @if(session('error')) @endif {{-- Theme Components (from active theme) --}} @if($themeComponents->count() > 0)
Theme Headers & Footers

These are from your active theme. Click "Customize" to create your own version.

@foreach($themeComponents as $component)
{{ $component->name }}
Theme {{ ucfirst($component->type) }} @if($component->description) - {{ $component->description }} @endif
@csrf
@endforeach
@endif {{-- Custom Sections (user customized) --}} @if($customSections->count() > 0)
Your Custom Headers & Footers

These are your customized versions. They override the theme defaults.

@foreach($customSections as $section)
{{ $section->name }} @if($section->is_default) Default @endif
Custom {{ ucfirst($section->type) }} - Created {{ $section->created_at->diffForHumans() }}
Edit @if(!$section->is_default)
@csrf
@endif
@csrf @method('DELETE')
@endforeach
@endif @php $hasHeader = $customSections->where('type', 'header')->count() > 0; $hasFooter = $customSections->where('type', 'footer')->count() > 0; @endphp @if(!$hasHeader || !$hasFooter)
Missing Sections

Your website is missing the following sections:

@if($website->activeTheme)

Tip: Use "Restore from Theme" to quickly add headers/footers from your active theme.

@endif
@endif @if($themeComponents->count() === 0 && $customSections->count() === 0)
No headers or footers found. Click "Create New" above to get started, or activate a theme first.
@endif
How it works:
@csrf
@push('scripts') @endpush @endsection