@extends('layouts.app') @section('title', 'Template Desain Siap Pakai') @php $isImgUrl = fn($v) => $v && \Illuminate\Support\Str::startsWith($v, ['http','/','data:']); @endphp @section('content')

Template Desain Siap Pakai

Pilih template, ganti warna produk, sesuaikan di editor, lalu pesan. Cocok untuk yang ingin cepat tanpa mendesain dari nol.

@if ($designs->count())
@foreach ($designs as $design) @php $colors = collect($design->product?->colors ?: [['name' => 'Default', 'hex' => '#e5e7eb']])->values(); $basePrice = ($design->product?->priceForScale(100) ?? 0) + (int) ($design->sale_price ?? 0); $editorUrl = $design->product ? route('editor.show', ['product' => $design->product, 'template' => $design->id]) : null; $mockups = $colors->mapWithKeys(fn ($c) => [$c['name'] => $design->product?->mockupSvg($c['hex'] ?? '#e5e7eb')])->all(); @endphp
@if ($isImgUrl($design->preview_data)) @endif

{{ $design->name }}

{{ $design->product->name ?? '' }}

@rupiah($basePrice)

Warna ยท

@foreach ($colors as $c) @endforeach
@if ($editorUrl) Sesuaikan di editor @endif
@csrf
@endforeach
{{ $designs->links() }}
@else

Template segera hadir

Kreator sedang menyiapkan template terbaik untuk Anda.

@endif
@endsection