|
|
|
@@ -3,8 +3,8 @@
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
|
@include('partials.favicon')
|
|
|
|
|
<title>{{ $qrCode->label }}</title>
|
|
|
|
|
@include('partials.favicon')
|
|
|
|
|
<meta name="description" content="{{ $qrCode->typeLabel() }} — {{ $qrCode->label }}">
|
|
|
|
|
@vite(['resources/css/app.css'])
|
|
|
|
|
</head>
|
|
|
|
@@ -24,7 +24,7 @@
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"/>
|
|
|
|
|
</svg>
|
|
|
|
|
</div>
|
|
|
|
|
<a href="{{ route('qr.public.view', $qrCode->short_code) }}"
|
|
|
|
|
<a href="{{ $qrCode->publicPath('view') }}"
|
|
|
|
|
class="mt-6 flex w-full items-center justify-center gap-2 rounded-2xl bg-red-600 px-6 py-4 text-sm font-semibold text-white shadow-sm transition hover:bg-red-700">
|
|
|
|
|
<svg class="h-5 w-5" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"/>
|
|
|
|
@@ -32,7 +32,7 @@
|
|
|
|
|
</svg>
|
|
|
|
|
View document
|
|
|
|
|
</a>
|
|
|
|
|
<a href="{{ route('qr.public.file', $qrCode->short_code) }}"
|
|
|
|
|
<a href="{{ $qrCode->publicPath('file') }}"
|
|
|
|
|
class="mt-3 flex w-full items-center justify-center gap-2 rounded-2xl border border-slate-200 bg-white px-6 py-4 text-sm font-semibold text-slate-700 shadow-sm transition hover:bg-slate-50">
|
|
|
|
|
<svg class="h-5 w-5 text-slate-500" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"/>
|
|
|
|
@@ -62,7 +62,7 @@
|
|
|
|
|
{{-- ===== VCARD ===== --}}
|
|
|
|
|
@elseif($type === \App\Models\QrCode::TYPE_VCARD)
|
|
|
|
|
@php
|
|
|
|
|
$avatarUrl = !empty($content['avatar_path']) ? route('qr.public.vcard.avatar', $qrCode->short_code) : null;
|
|
|
|
|
$avatarUrl = !empty($content['avatar_path']) ? $qrCode->publicPath('avatar') : null;
|
|
|
|
|
$rawSocial = $content['social'] ?? [];
|
|
|
|
|
$social = [];
|
|
|
|
|
foreach ($rawSocial as $platform => $url) {
|
|
|
|
@@ -159,8 +159,8 @@
|
|
|
|
|
|
|
|
|
|
{{-- Save contact button --}}
|
|
|
|
|
<div class="px-6 pb-6 pt-2">
|
|
|
|
|
<a href="{{ route('qr.public.vcard', $qrCode->short_code) }}"
|
|
|
|
|
class="flex w-full items-center justify-center gap-2 rounded-2xl bg-indigo-600 py-3.5 text-sm font-semibold text-white shadow-sm transition hover:bg-indigo-700">
|
|
|
|
|
<a href="{{ $qrCode->publicPath('vcard.vcf') }}"
|
|
|
|
|
class="btn-primary w-full">
|
|
|
|
|
<svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"/></svg>
|
|
|
|
|
Save Contact
|
|
|
|
|
</a>
|
|
|
|
@@ -178,8 +178,8 @@
|
|
|
|
|
$bizColor = $content['brand_color'] ?? '#1e3a5f';
|
|
|
|
|
$bizHasLogo = !empty($content['logo_path']);
|
|
|
|
|
$bizHasCover = !empty($content['cover_path']);
|
|
|
|
|
$bizLogoUrl = $bizHasLogo ? route('qr.public.business.logo', $qrCode->short_code) : null;
|
|
|
|
|
$bizCoverUrl = $bizHasCover ? route('qr.public.business.cover', $qrCode->short_code) : null;
|
|
|
|
|
$bizLogoUrl = $bizHasLogo ? $qrCode->publicPath('business-logo') : null;
|
|
|
|
|
$bizCoverUrl = $bizHasCover ? $qrCode->publicPath('business-cover') : null;
|
|
|
|
|
$bizInitials = strtoupper(substr($bizName, 0, 1));
|
|
|
|
|
$bizRawSocial = $content['social'] ?? [];
|
|
|
|
|
$bizSocial = [];
|
|
|
|
@@ -313,8 +313,8 @@
|
|
|
|
|
$churchColor = $content['brand_color'] ?? '#1a3a5c';
|
|
|
|
|
$churchHasLogo = !empty($content['logo_path']);
|
|
|
|
|
$churchHasCover = !empty($content['cover_path']);
|
|
|
|
|
$churchLogoUrl = $churchHasLogo ? route('qr.public.church.logo', $qrCode->short_code) : null;
|
|
|
|
|
$churchCoverUrl = $churchHasCover ? route('qr.public.church.cover', $qrCode->short_code) : null;
|
|
|
|
|
$churchLogoUrl = $churchHasLogo ? $qrCode->publicPath('church-logo') : null;
|
|
|
|
|
$churchCoverUrl = $churchHasCover ? $qrCode->publicPath('church-cover') : null;
|
|
|
|
|
$churchInitials = strtoupper(substr($churchName, 0, 2));
|
|
|
|
|
$churchAcceptsPay = !empty($content['accepts_payment']);
|
|
|
|
|
$churchCurrency = $content['currency'] ?? 'GHS';
|
|
|
|
@@ -325,7 +325,7 @@
|
|
|
|
|
$churchTypes,
|
|
|
|
|
array_map(fn($t) => $legacyLabels[strtolower(trim($t))] ?? trim($t), $churchTypes)
|
|
|
|
|
);
|
|
|
|
|
$churchOrderRoute = route('qr.public.order', $qrCode->short_code);
|
|
|
|
|
$churchOrderRoute = $qrCode->publicPath('order');
|
|
|
|
|
$churchCsrf = csrf_token();
|
|
|
|
|
@endphp
|
|
|
|
|
<div x-data="{
|
|
|
|
@@ -631,8 +631,8 @@
|
|
|
|
|
$evColor = $content['brand_color'] ?? '#4f46e5';
|
|
|
|
|
$evHasLogo = !empty($content['logo_path']);
|
|
|
|
|
$evHasCover = !empty($content['cover_path']);
|
|
|
|
|
$evLogoUrl = $evHasLogo ? route('qr.public.event.logo', $qrCode->short_code) : null;
|
|
|
|
|
$evCoverUrl = $evHasCover ? route('qr.public.event.cover', $qrCode->short_code) : null;
|
|
|
|
|
$evLogoUrl = $evHasLogo ? $qrCode->publicPath('event-logo') : null;
|
|
|
|
|
$evCoverUrl = $evHasCover ? $qrCode->publicPath('event-cover') : null;
|
|
|
|
|
$evName = $content['name'] ?? $qrCode->label;
|
|
|
|
|
$evInitials = strtoupper(mb_substr($evName, 0, 2));
|
|
|
|
|
$evTiers = $content['tiers'] ?? [];
|
|
|
|
@@ -642,7 +642,7 @@
|
|
|
|
|
$evMode = in_array($content['mode'] ?? 'ticketing', ['contributions', 'free'], true) ? ($content['mode'] ?? 'ticketing') : 'ticketing';
|
|
|
|
|
$evCategories = $content['contribution_categories'] ?? ['Contribution'];
|
|
|
|
|
$evHeading = $evMode === 'contributions' ? 'Make a contribution' : 'Register';
|
|
|
|
|
$evRegRoute = route('qr.public.event.register', $qrCode->short_code);
|
|
|
|
|
$evRegRoute = $qrCode->publicPath('register');
|
|
|
|
|
$evCsrf = csrf_token();
|
|
|
|
|
@endphp
|
|
|
|
|
<div x-data="{
|
|
|
|
@@ -887,7 +887,7 @@
|
|
|
|
|
@php
|
|
|
|
|
$itinColor = $content['brand_color'] ?? '#b45309';
|
|
|
|
|
$itinHasCover = !empty($content['cover_path']);
|
|
|
|
|
$itinCoverUrl = $itinHasCover ? route('qr.public.itinerary.cover', $qrCode->short_code) : null;
|
|
|
|
|
$itinCoverUrl = $itinHasCover ? $qrCode->publicPath('itinerary-cover') : null;
|
|
|
|
|
$itinTitle = $content['title'] ?? $qrCode->label;
|
|
|
|
|
$itinDays = $content['days'] ?? [];
|
|
|
|
|
$multiDay = count($itinDays) > 1;
|
|
|
|
@@ -1029,7 +1029,7 @@
|
|
|
|
|
<h1 class="text-2xl font-bold text-slate-900">{{ $qrCode->label }}</h1>
|
|
|
|
|
<div class="mt-6 space-y-4">
|
|
|
|
|
@foreach($content['images'] ?? [] as $index => $image)
|
|
|
|
|
<img src="{{ route('qr.public.image', [$qrCode->short_code, $index]) }}"
|
|
|
|
|
<img src="{{ $qrCode->publicPath('images/'.$index) }}"
|
|
|
|
|
alt="{{ $image['title'] ?? 'Image ' . ($index + 1) }}"
|
|
|
|
|
class="w-full rounded-2xl border border-slate-200 shadow-sm"
|
|
|
|
|
loading="lazy">
|
|
|
|
@@ -1039,7 +1039,7 @@
|
|
|
|
|
|
|
|
|
|
{{-- ===== APP ===== --}}
|
|
|
|
|
@elseif($type === \App\Models\QrCode::TYPE_APP)
|
|
|
|
|
@php $appIconUrl = !empty($content['icon_path']) ? route('qr.public.app.icon', $qrCode->short_code) : null; @endphp
|
|
|
|
|
@php $appIconUrl = !empty($content['icon_path']) ? $qrCode->publicPath('app-icon') : null; @endphp
|
|
|
|
|
<div class="flex min-h-screen flex-col items-center justify-center px-4 py-12">
|
|
|
|
|
<div class="w-full max-w-sm text-center">
|
|
|
|
|
@if($appIconUrl)
|
|
|
|
@@ -1132,14 +1132,14 @@
|
|
|
|
|
$sections = $content['sections'] ?? [];
|
|
|
|
|
$title = $content['title'] ?? $qrCode->label;
|
|
|
|
|
$acceptsPayment = (bool) ($content['accepts_payment'] ?? false);
|
|
|
|
|
$orderRoute = route('qr.public.order', $qrCode->short_code);
|
|
|
|
|
$orderRoute = $qrCode->publicPath('order');
|
|
|
|
|
$csrfToken = csrf_token();
|
|
|
|
|
$paystackPublicKey = $acceptsPayment ? app(\App\Services\Billing\PaystackService::class)->publicKey() : '';
|
|
|
|
|
$brandColor = $content['brand_color'] ?? ($isShop ? '#7c3aed' : '#f97316');
|
|
|
|
|
$hasLogo = !empty($content['logo_path']);
|
|
|
|
|
$hasCover = !empty($content['cover_path']);
|
|
|
|
|
$logoUrl = $hasLogo ? route('qr.public.menu.logo', $qrCode->short_code) : null;
|
|
|
|
|
$coverUrl = $hasCover ? route('qr.public.menu.cover', $qrCode->short_code) : null;
|
|
|
|
|
$logoUrl = $hasLogo ? $qrCode->publicPath('menu-logo') : null;
|
|
|
|
|
$coverUrl = $hasCover ? $qrCode->publicPath('menu-cover') : null;
|
|
|
|
|
$shippingType = $content['shipping_type'] ?? 'none';
|
|
|
|
|
$shippingFee = (float) ($content['shipping_fee'] ?? 0);
|
|
|
|
|
$freeShippingAbove = (float) ($content['free_shipping_above'] ?? 0);
|
|
|
|
@@ -1291,7 +1291,7 @@
|
|
|
|
|
<div class="flex gap-3 overflow-hidden rounded-2xl bg-white shadow-sm ring-1 ring-slate-100">
|
|
|
|
|
{{-- Item image --}}
|
|
|
|
|
@if($hasImage)
|
|
|
|
|
<img src="{{ route('qr.public.item-image', [$qrCode->short_code, $si, $ii]) }}"
|
|
|
|
|
<img src="{{ $qrCode->publicPath('item-image/'.$si.'/'.$ii) }}"
|
|
|
|
|
alt="{{ $item['name'] }}"
|
|
|
|
|
class="h-[100px] w-[100px] flex-shrink-0 object-cover" loading="lazy">
|
|
|
|
|
@endif
|
|
|
|
|