@extends('layouts.admin') @section('title', 'Frontend Content') @section('page-title', 'Frontend Content') @section('page-subtitle', 'Manage your website content') @section('content')
@if(session('success'))

Success!

{{ session('success') }}

View Website
@endif

Frontend Content Management

Update homepage, about page, and other frontend content

Branch Contents

{{ $stats['branch'] }}

Active Contents

{{ $stats['active'] }}

Global Templates

{{ $stats['global'] }}

Available to Copy

{{ max(0, $stats['global'] - $stats['branch']) }}

@if($stats['branch'] == 0)

Get Started with Frontend Content

Copy default content templates to your branch, then customize them.

@csrf
@endif

Branch Content

@if(request('search')) Clear @endif
@forelse($contents as $content) @empty @endforelse
Key Section Type Preview Status Actions

{{ $content->key }}

{{ Str::limit($content->value, 50) }}

{{ $sections[$content->section] ?? $content->section }} @if($content->type === 'image') Image @elseif($content->type === 'url') URL @else Text @endif @if($content->type === 'image' && $content->value) @elseif($content->type === 'url') {{ Str::limit(parse_url($content->value, PHP_URL_HOST), 20) }} @else {{ Str::limit(strip_tags($content->value), 30) }} @endif @if($content->is_active) Active @else Inactive @endif
@csrf
@csrf @method('DELETE')
@if(request('search'))

No content found matching "{{ request('search') }}"

Clear search @else

No content found for this branch.

View available templates to copy @endif
{{ $contents->withQueryString()->links() }}
@endsection