500 lines
19 KiB
PHP
500 lines
19 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Rate Card — {{ $profile->owner_name }}</title>
|
|
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap" rel="stylesheet">
|
|
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
|
<style>
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Nunito', sans-serif;
|
|
background:
|
|
{{ $profile->bg_color }}
|
|
;
|
|
color:
|
|
{{ $profile->text_color }}
|
|
;
|
|
padding: 40px 20px;
|
|
}
|
|
|
|
.container {
|
|
max-width: 820px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.header {
|
|
text-align: center;
|
|
margin-bottom: 48px;
|
|
}
|
|
|
|
.logo-img {
|
|
max-height: 100px;
|
|
max-width: 200px;
|
|
margin: 0 auto 16px;
|
|
display: block;
|
|
border-radius: 16px;
|
|
}
|
|
|
|
.title {
|
|
font-size: 32px;
|
|
font-weight: 900;
|
|
color:
|
|
{{ $profile->accent_color }}
|
|
;
|
|
}
|
|
|
|
.tagline {
|
|
color: #9CA3AF;
|
|
margin-top: 6px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.contacts {
|
|
display: flex;
|
|
justify-content: center;
|
|
flex-wrap: wrap;
|
|
gap: 12px 20px;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.contact-pill {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap-6px;
|
|
background: white;
|
|
border: 1px solid
|
|
{{ $profile->accent_color }}
|
|
44;
|
|
border-radius: 99px;
|
|
padding: 6px 14px;
|
|
font-size: 12px;
|
|
color:
|
|
{{ $profile->text_color }}
|
|
;
|
|
text-decoration: none;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.contact-pill:hover {
|
|
background:
|
|
{{ $profile->accent_color }}
|
|
18;
|
|
}
|
|
|
|
.platform-section {
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
.platform-title {
|
|
font-size: 18px;
|
|
font-weight: 800;
|
|
color:
|
|
{{ $profile->text_color }}
|
|
;
|
|
margin-bottom: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.cards {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
|
gap: 14px;
|
|
}
|
|
|
|
.carousel-wrapper {
|
|
position: relative;
|
|
}
|
|
|
|
.carousel-track {
|
|
display: flex;
|
|
overflow-x: auto;
|
|
scroll-snap-type: x mandatory;
|
|
gap: 14px;
|
|
padding-bottom: 10px;
|
|
scrollbar-width: none;
|
|
}
|
|
|
|
.carousel-track::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.carousel-slide {
|
|
flex: 0 0 220px;
|
|
scroll-snap-align: start;
|
|
}
|
|
|
|
.carousel-btn {
|
|
position: absolute;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
background: white;
|
|
border: 1px solid rgba(0,0,0,0.05);
|
|
box-shadow: 0 4px 10px rgba(0,0,0,0.1);
|
|
color:
|
|
{{ $profile->accent_color }}
|
|
;
|
|
font-size: 20px;
|
|
font-weight: 900;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
z-index: 10;
|
|
}
|
|
|
|
.carousel-btn:hover {
|
|
background: #fdfdfd;
|
|
box-shadow: 0 6px 14px rgba(0,0,0,0.15);
|
|
}
|
|
|
|
.carousel-btn.prev {
|
|
left: -20px;
|
|
}
|
|
|
|
.carousel-btn.next {
|
|
right: -20px;
|
|
}
|
|
|
|
.card {
|
|
background: white;
|
|
border-radius: 24px;
|
|
padding: 20px;
|
|
border: 1px solid
|
|
{{ $profile->accent_color }}
|
|
33;
|
|
box-shadow: 0 2px 8px
|
|
{{ $profile->accent_color }}
|
|
22;
|
|
}
|
|
|
|
.popup-modal {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.8);
|
|
z-index: 9999;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.service {
|
|
font-weight: 700;
|
|
color: #1F2937;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.type {
|
|
display: inline-block;
|
|
background:
|
|
{{ $profile->accent_color }}
|
|
18;
|
|
color:
|
|
{{ $profile->accent_color }}
|
|
;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
padding: 2px 10px;
|
|
border-radius: 20px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.desc {
|
|
font-size: 12px;
|
|
color: #9CA3AF;
|
|
margin-bottom: 12px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.price {
|
|
font-size: 22px;
|
|
font-weight: 900;
|
|
color:
|
|
{{ $profile->accent_color }}
|
|
;
|
|
}
|
|
|
|
.price-meta {
|
|
font-size: 11px;
|
|
color: #D1D5DB;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.negotiable {
|
|
font-size: 11px;
|
|
color: #F59E0B;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.footer {
|
|
margin-top: 40px;
|
|
text-align: center;
|
|
font-size: 12px;
|
|
color: #D1D5DB;
|
|
}
|
|
|
|
/* Quill WYSIWYG Compatibility */
|
|
.ql-align-center {
|
|
text-align: center !important;
|
|
}
|
|
|
|
.ql-align-right {
|
|
text-align: right !important;
|
|
}
|
|
|
|
.ql-align-justify {
|
|
text-align: justify !important;
|
|
}
|
|
|
|
.ql-size-small {
|
|
font-size: 0.75em !important;
|
|
}
|
|
|
|
.ql-size-large {
|
|
font-size: 1.5em !important;
|
|
}
|
|
|
|
.ql-size-huge {
|
|
font-size: 2.5em !important;
|
|
}
|
|
|
|
.pdf-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
background:
|
|
{{ $profile->accent_color }}
|
|
;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 99px;
|
|
padding: 10px 24px;
|
|
font-size: 14px;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
transition: opacity 0.2s;
|
|
}
|
|
|
|
.pdf-btn:hover {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
@media print {
|
|
body {
|
|
background: white;
|
|
}
|
|
|
|
.card {
|
|
break-inside: avoid;
|
|
}
|
|
|
|
.pdf-btn {
|
|
display: none;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body x-data="{ popupOpen: false, popupImage: '' }">
|
|
<div class="container">
|
|
<div class="header">
|
|
@if($profile->logo_path)
|
|
<img src="{{ route('files.serve-profile-logo') }}" alt="{{ $profile->owner_name }}" class="logo-img">
|
|
@else
|
|
<div style="font-size:56px; margin-bottom:12px;">🐱</div>
|
|
@endif
|
|
<div class="title">{{ $profile->owner_name }}</div>
|
|
@if($profile->tagline)
|
|
<div class="tagline">{{ $profile->tagline }}</div>
|
|
@endif
|
|
|
|
<div class="contacts" style="margin-top:14px">
|
|
@if($profile->whatsappUrl)
|
|
<a href="{{ $profile->whatsappUrl }}" target="_blank" class="contact-pill">📱 WhatsApp</a>
|
|
@endif
|
|
@if($profile->ig_handle)
|
|
<a href="https://instagram.com/{{ ltrim($profile->ig_handle, '@') }}" target="_blank"
|
|
class="contact-pill">📸 {{ '@' . ltrim($profile->ig_handle, '@') }}</a>
|
|
@endif
|
|
@if($profile->tiktok_handle)
|
|
<a href="https://tiktok.com/{{ ltrim($profile->tiktok_handle, '@') }}" target="_blank"
|
|
class="contact-pill">🎵 {{ '@' . ltrim($profile->tiktok_handle, '@') }}</a>
|
|
@endif
|
|
@if($profile->youtube_handle)
|
|
<a href="https://youtube.com/{{ $profile->youtube_handle }}" target="_blank" class="contact-pill">▶️
|
|
{{ $profile->youtube_handle }}</a>
|
|
@endif
|
|
@if($profile->email)
|
|
<a href="mailto:{{ $profile->email }}" class="contact-pill">✉️ {{ $profile->email }}</a>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
@forelse($rateCards as $platform => $cards)
|
|
<div class="platform-section">
|
|
<div class="platform-title">
|
|
<span>{{ $cards->first()->platform_icon }}</span>
|
|
{{ ucfirst($platform) }}
|
|
</div>
|
|
<div class="cards">
|
|
@foreach($cards as $card)
|
|
<div class="card">
|
|
@if($card->content_type)
|
|
<div class="type">{{ $card->content_type }}</div>
|
|
@endif
|
|
<div class="service">{{ $card->service_name }}</div>
|
|
@if($card->description)
|
|
<div class="desc">{{ $card->description }}</div>
|
|
@endif
|
|
@if($profile->show_prices)
|
|
<div class="price">{{ $card->formatted_price }}</div>
|
|
<div class="price-meta">{{ str_replace('_', ' ', $card->price_unit) }}</div>
|
|
@else
|
|
<div class="price" style="font-size:16px">On Request</div>
|
|
@endif
|
|
@if($card->is_negotiable)
|
|
<div class="negotiable">✦ Negotiable</div>
|
|
@endif
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
@empty
|
|
<p style="text-align:center; color:#9CA3AF; padding: 60px 0;">No rate cards published yet.</p>
|
|
@endforelse
|
|
|
|
@if(!empty($profile->past_brands))
|
|
@php
|
|
$logoSizesPublic = [
|
|
'small' => 'max-height:45px; max-width:90px;',
|
|
'medium' => 'max-height:60px; max-width:120px;',
|
|
'large' => 'max-height:80px; max-width:160px;',
|
|
];
|
|
$sizeStylePublic = $logoSizesPublic[$profile->brand_logo_size ?? 'medium'] ?? $logoSizesPublic['medium'];
|
|
@endphp
|
|
<div class="platform-section" style="margin-top:40px;">
|
|
<div class="platform-title" style="justify-content:center;">Brand Collaborations</div>
|
|
<div style="display:flex; flex-wrap:wrap; justify-content:center; gap:24px; margin-top:20px;">
|
|
@foreach($profile->past_brands as $brandPath)
|
|
<img src="{{ asset('storage/' . $brandPath) }}"
|
|
style="{{ $sizeStylePublic }} object-fit:contain; border-radius:8px;">
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
@php
|
|
$publicShowcase = array_filter($profile->content_showcase ?? [], function($item) {
|
|
return !isset($item['show_on_public']) || $item['show_on_public'];
|
|
});
|
|
@endphp
|
|
@if(!empty($publicShowcase))
|
|
<div class="platform-section" style="margin-top:40px;">
|
|
<div class="platform-title" style="justify-content:center;">Content Showcase</div>
|
|
@php $isCarousel = count($publicShowcase) >= 3; @endphp
|
|
@if($isCarousel)
|
|
<div class="carousel-wrapper" x-data="{
|
|
scrollPrev() { $refs.slider.scrollBy({left: -234, behavior: 'smooth'}); },
|
|
scrollNext() { $refs.slider.scrollBy({left: 234, behavior: 'smooth'}); }
|
|
}">
|
|
<button type="button" class="carousel-btn prev" @click="scrollPrev()">❮</button>
|
|
<div class="carousel-track" x-ref="slider">
|
|
@else
|
|
<div class="cards">
|
|
@endif
|
|
@foreach($publicShowcase as $item)
|
|
@php
|
|
$isUrl = ($item['file_id'] === 'url');
|
|
$file = !$isUrl ? \App\Models\MediaFile::find($item['file_id']) : null;
|
|
@endphp
|
|
@if($file || $isUrl)
|
|
<div class="card {{ $isCarousel ? 'carousel-slide' : '' }}" style="padding:0; overflow:hidden; display:flex; flex-direction:column;">
|
|
<div style="flex:1; background:#F9FAFB; display:flex; align-items:center; justify-content:center; position:relative;">
|
|
@if(!empty($item['thumbnail_path']))
|
|
@if(!$isUrl && $file->is_image)
|
|
<div style="width:100%; aspect-ratio:9/16; cursor:pointer; position:relative;" @click="popupImage = '{{ $file->url }}'; popupOpen = true;">
|
|
<img src="{{ asset('storage/' . $item['thumbnail_path']) }}" style="width:100%; height:100%; object-fit:cover; display:block;">
|
|
</div>
|
|
@else
|
|
<a href="{{ $isUrl ? ($item['url'] ?? '#') : $file->url }}" target="_blank" style="display:block; width:100%; aspect-ratio:9/16; position:relative;">
|
|
<img src="{{ asset('storage/' . $item['thumbnail_path']) }}" style="width:100%; height:100%; object-fit:cover; display:block;">
|
|
@if(!$isUrl && $file->is_video)
|
|
<div style="position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,0.2);">
|
|
<div style="width:48px; height:48px; background:rgba(255,255,255,0.8); border-radius:50%; display:flex; align-items:center; justify-content:center; color:{{ $profile->accent_color }}; font-size:24px;">▶</div>
|
|
</div>
|
|
@endif
|
|
</a>
|
|
@endif
|
|
@elseif($isUrl)
|
|
<div style="aspect-ratio:9/16; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:20px; text-align:center;">
|
|
<span style="font-size:48px;">🌐</span>
|
|
<a href="{{ $item['url'] ?? '#' }}" target="_blank" style="margin-top:10px; font-size:12px; color:{{ $profile->accent_color }}; text-decoration:none; font-weight:700;">Open Link</a>
|
|
</div>
|
|
@else
|
|
@if($file->is_image)
|
|
<div style="width:100%; aspect-ratio:9/16; cursor:pointer;" @click="popupImage = '{{ $file->url }}'; popupOpen = true;">
|
|
<img src="{{ $file->url }}" style="width:100%; height:100%; object-fit:cover; display:block;">
|
|
</div>
|
|
@elseif($file->is_video)
|
|
<video src="{{ $file->url }}" style="width:100%; aspect-ratio:9/16; object-fit:cover; display:block;" controls></video>
|
|
@else
|
|
<div style="aspect-ratio:9/16; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:20px; text-align:center;">
|
|
<span style="font-size:48px;">{{ $file->icon }}</span>
|
|
<a href="{{ $file->url }}" target="_blank" style="margin-top:10px; font-size:12px; color:{{ $profile->accent_color }}; text-decoration:none; font-weight:700;">View File</a>
|
|
</div>
|
|
@endif
|
|
@endif
|
|
</div>
|
|
<div style="padding:16px;">
|
|
<div class="service" style="margin-bottom:0; text-align:center; font-weight:700;">{{ $item['name'] }}</div>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
@endforeach
|
|
@if($isCarousel)
|
|
</div>
|
|
<button type="button" class="carousel-btn next" @click="scrollNext()">❯</button>
|
|
</div>
|
|
@else
|
|
</div>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
|
|
@if($profile->terms_and_conditions)
|
|
<div class="platform-section" style="margin-top:40px;">
|
|
<div class="platform-title" style="justify-content:center;">Terms & Conditions</div>
|
|
<div class="card" style="font-size:13px; color:#6B7280; line-height:1.6;">
|
|
{!! $profile->terms_and_conditions !!}</div>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="footer">
|
|
{{ $profile->custom_footer ?: 'Prices may vary. Contact for custom packages.' }}
|
|
<!--<br>Generated by Cathy's App · {{ now()->format('Y-M-D') }}-->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Image Popup Modal -->
|
|
<div x-show="popupOpen" x-transition.opacity style="display:none;" class="popup-modal">
|
|
<div style="position:absolute; inset:0; cursor:pointer;" @click="popupOpen = false"></div>
|
|
<img :src="popupImage" style="max-width:100%; max-height:100%; object-fit:contain; position:relative; z-index:10000; border-radius:12px; box-shadow:0 10px 25px rgba(0,0,0,0.5);">
|
|
<button @click="popupOpen = false" style="position:absolute; top:20px; right:20px; background:rgba(255,255,255,0.2); border:none; color:white; font-size:30px; width:40px; height:40px; border-radius:50%; cursor:pointer; z-index:10001; display:flex; align-items:center; justify-content:center;">×</button>
|
|
</div>
|
|
</body>
|
|
|
|
</html> |