@extends('layouts.app') @section('title', $page['label'].' — Kelola Halaman') @section('content')

Kelola Halaman — {{ $page['label'] }}

← Kembali
{{-- {{ dd($data) }} --}} @if(session('success'))
{{ session('success') }}
@endif @if($errors->any())

Perubahan belum tersimpan:

@endif
@csrf @method('PUT') @if($slug === 'home') {{-- Hero Slider --}}

Hero Slider

@php $defaultSlides = [ ['eyebrow'=>'FASHION FOR YOUR STORY','title'=>'Look Elegant
In Every
Occasion','desc'=>'Quality garments with modern designs and all-day comfort, made to accompany every step you take.','btn'=>'Shop Now','image'=>null], ['eyebrow'=>'NEW COLLECTION 2025','title'=>'This Season\'s
Collection Is Full
Of Inspiration','desc'=>'Discover the latest styles that blend comfort and elegance for every special moment of yours.','btn'=>'Discover Now','image'=>null] ]; $slides = (isset($data['hero_slides']) && is_array($data['hero_slides']) && count($data['hero_slides'])>0) ? $data['hero_slides'] : $defaultSlides; // Pertahankan perubahan slide dari input sebelumnya jika validasi gagal $oldSlidesJson = old('slides_json'); $oldSlides = $oldSlidesJson ? json_decode($oldSlidesJson, true) : null; if (is_array($oldSlides) && count($oldSlides) > 0) { $oldPaths = old('slide_image_path', []); foreach ($oldSlides as $i => $os) { $oldSlides[$i]['image'] = (is_array($oldPaths) && !empty($oldPaths[$i])) ? $oldPaths[$i] : ($data['hero_slides'][$i]['image'] ?? null); } $slides = $oldSlides; } @endphp @foreach($slides as $i => $s)

Slide {{ $i+1 }}

Rekomendasi ukuran: 1920 x 800 px, rasio ~ 2.47:1, maksimal 10 MB dan otomatis dikompresi ke WEBP. Format JPG/PNG/WEBP.

preview
@endforeach
{{-- Featured --}}

Featured Products

@foreach(['featured_label','featured_title'] as $k)
@endforeach
{{-- Promo --}}

Promo Cards

New Collection

@foreach(['promo_new_label','promo_new_title','promo_new_desc'] as $k)
@if($k==='promo_new_desc') @else @endif
@endforeach
preview

Rekomendasi ukuran: 1920 x 800 px, rasio ~ 2.47:1, maksimal 10 MB dan otomatis dikompresi. Format JPG/PNG/WEBP.

Best Seller

@foreach(['promo_best_label','promo_best_title','promo_best_desc'] as $k)
@if($k==='promo_best_desc') @else @endif
@endforeach
preview

Rekomendasi ukuran: 1920 x 800 px, rasio ~ 2.47:1, maksimal 10 MB dan otomatis dikompresi. Format JPG/PNG/WEBP.

@else
@foreach($fields as $f)
@if(str_contains($f['name'],'image')) @if(!empty($data[$f['name']]))
preview
@else
@endif

@if($f['name'] === 'visual_image') Format JPG, PNG, atau WEBP, maksimal 2 MB. Preview akan tampil setelah gambar dipilih. @else Rekomendasi ukuran sama seperti slider: 1920x800 px @endif

@elseif(($slug === 'login' || $slug === 'register') && $f['name'] === 'visual_title') @elseif(str_contains($f['name'],'text') || str_contains($f['name'],'desc') || str_contains($f['name'],'subtitle')) @else @endif
@endforeach
@endif {{-- Sosial Media Footer (dinamis) --}} @if($slug === 'footer')

Sosial Media Footer

@php $socialRows = (isset($data['footer_social_media']) && is_array($data['footer_social_media'])) ? $data['footer_social_media'] : []; @endphp @foreach($socialRows as $i => $row) @endforeach
Nama Platform URL Icon Aksi

Pilih icon FontAwesome yang tersedia dari dropdown di atas.

@endif {{-- E-commerce Footer (dinamis) --}} @if($slug === 'footer')

E-commerce Footer

@php $shopRows = (isset($data['footer_ecommerce']) && is_array($data['footer_ecommerce'])) ? $data['footer_ecommerce'] : []; @endphp @foreach($shopRows as $i => $row) @endforeach
Logo Nama Marketplace URL Aksi
@if(!empty($row['image'])) Preview logo @else @endif

Logo ditampilkan sebagai satu baris di bagian bawah footer dan otomatis dikonversi ke WebP. Rekomendasi: logo transparan, maksimal 10 MB.

@endif
@if($slug === 'home') @endif @if($slug === 'footer') @endif @endsection