feat: extend rate card profiles with brands, terms, and custom HTML, and remove search bar from search index view

This commit is contained in:
I-Fun
2026-04-05 18:28:48 +07:00
parent d6b10f725b
commit 1c2c10d253
22 changed files with 1024 additions and 388 deletions

View File

@@ -6,137 +6,347 @@
$ab = hexdec(substr($accent, 4, 2));
$accentRgb = "{$ar},{$ag},{$ab}";
$bg = $profile->bg_color ?? '#FFFBFE';
$text = $profile->text_color ?? '#374151';
$bg = $profile->bg_color ?? '#FFFBFE';
$text = $profile->text_color ?? '#374151';
$accentHex = '#' . $accent;
@endphp
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Rate Card — {{ $profile->owner_name }}</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'DejaVu Sans', sans-serif;
background: {{ $bg }};
color: {{ $text }};
background:
{{ $bg }}
;
color:
{{ $text }}
;
padding: 36px 32px;
font-size: 12px;
}
.footer {
margin-top: 40px;
text-align: center;
font-size: 11px;
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;
}
.contact-person-page,
.terms-and-conditions-page {
width: 100%;
}
.header {
text-align: center;
margin-bottom: 32px;
padding-bottom: 20px;
border-bottom: 2px solid {{ $accentHex }};
border-bottom: 2px solid
{{ $accentHex }}
;
}
.logo-img { max-height: 72px; max-width: 140px; margin: 0 auto 10px; display: block; }
.name { font-size: 24px; font-weight: 700; color: {{ $accentHex }}; }
.tagline { color: #9CA3AF; margin-top: 4px; font-size: 11px; }
.contacts { margin-top: 10px; font-size: 10px; color: #6B7280; }
.contacts span { margin: 0 6px; }
.platform-section { margin-bottom: 22px; }
.logo-img {
max-height: 72px;
max-width: 140px;
margin: 0 auto 10px;
display: block;
}
.name {
font-size: 24px;
font-weight: 700;
color:
{{ $accentHex }}
;
}
.tagline {
color: #9CA3AF;
margin-top: 4px;
font-size: 11px;
}
.contacts {
margin-top: 10px;
font-size: 10px;
color: #6B7280;
}
.contacts span {
margin: 0 6px;
}
.platform-section {
margin-bottom: 22px;
}
.platform-title {
font-size: 13px; font-weight: 700;
color: {{ $text }};
font-size: 13px;
font-weight: 700;
color:
{{ $text }}
;
margin-bottom: 8px;
padding: 5px 10px;
background-color: rgba({{ $accentRgb }}, 0.1);
border-left: 4px solid {{ $accentHex }};
border-left: 4px solid
{{ $accentHex }}
;
}
table { width: 100%; border-collapse: collapse; }
table {
width: 100%;
border-collapse: collapse;
}
th {
text-align: left; padding: 7px 10px;
text-align: left;
padding: 7px 10px;
background-color: rgba({{ $accentRgb }}, 0.08);
color: #6B7280; font-size: 9px;
text-transform: uppercase; letter-spacing: 0.05em;
color: #6B7280;
font-size: 9px;
text-transform: uppercase;
letter-spacing: 0.05em;
border-bottom: 1px solid rgba({{ $accentRgb }}, 0.25);
}
td { padding: 8px 10px; border-bottom: 1px solid #F3F4F6; vertical-align: top; }
tr:last-child td { border-bottom: none; }
.service-name { font-weight: 600; color: {{ $text }}; }
.content-type {
display: inline-block; font-size: 9px;
background-color: rgba({{ $accentRgb }}, 0.1);
color: {{ $accentHex }};
padding: 1px 7px; border-radius: 10px; margin-top: 2px;
td {
padding: 8px 10px;
border-bottom: 1px solid #F3F4F6;
vertical-align: top;
}
tr:last-child td {
border-bottom: none;
}
.service-name {
font-weight: 600;
color:
{{ $text }}
;
}
.content-type {
display: inline-block;
font-size: 9px;
background-color: rgba({{ $accentRgb }}, 0.1);
color:
{{ $accentHex }}
;
padding: 1px 7px;
border-radius: 10px;
margin-top: 2px;
}
.desc {
color: #9CA3AF;
font-size: 10px;
margin-top: 3px;
}
.price {
font-weight: 700;
color:
{{ $accentHex }}
;
font-size: 13px;
}
.price-unit {
color: #9CA3AF;
font-size: 9px;
}
.negotiable {
color: #F59E0B;
font-size: 9px;
font-weight: 600;
}
.footer {
text-align: center;
margin-top: 36px;
color: #D1D5DB;
font-size: 9px;
border-top: 1px solid #F3F4F6;
padding-top: 14px;
}
.desc { color: #9CA3AF; font-size: 10px; margin-top: 3px; }
.price { font-weight: 700; color: {{ $accentHex }}; font-size: 13px; }
.price-unit { color: #9CA3AF; font-size: 9px; }
.negotiable { color: #F59E0B; font-size: 9px; font-weight: 600; }
.footer { text-align: center; margin-top: 36px; color: #D1D5DB; font-size: 9px; border-top: 1px solid #F3F4F6; padding-top: 14px; }
</style>
</head>
<body>
<div class="header">
@if($profile->logo_path && file_exists(storage_path('app/private/' . $profile->logo_path)))
<img src="{{ storage_path('app/private/' . $profile->logo_path) }}" class="logo-img" alt="{{ $profile->owner_name }}">
@endif
<div class="name">{{ $profile->owner_name }}</div>
@if($profile->tagline)
<div class="tagline">{{ $profile->tagline }}</div>
@endif
<div class="contacts">
@if($profile->email)<span>✉ {{ $profile->email }}</span>@endif
@if($profile->whatsapp)<span>· {{ $profile->whatsapp }}</span>@endif
@if($profile->ig_handle)<span>· @{{ $profile->ig_handle }}</span>@endif
@if($profile->tiktok_handle)<span>· @{{ $profile->tiktok_handle }}</span>@endif
@if($profile->youtube_handle)<span>· {{ $profile->youtube_handle }}</span>@endif
<div class="header">
@if($profile->logo_path && file_exists(storage_path('app/private/' . $profile->logo_path)))
<img src="{{ storage_path('app/private/' . $profile->logo_path) }}" class="logo-img"
alt="{{ $profile->owner_name }}">
@endif
<div class="name">{{ $profile->owner_name }}</div>
@if($profile->tagline)
<div class="tagline">{{ $profile->tagline }}</div>
@endif
<div class="contacts">
@if($profile->ig_handle)<span>· {{ '@' . ltrim($profile->ig_handle, '@') }}</span>@endif
@if($profile->tiktok_handle)<span>· {{ '@' . ltrim($profile->tiktok_handle, '@') }}</span>@endif
@if($profile->youtube_handle)<span>· {{ $profile->youtube_handle }}</span>@endif
</div>
</div>
</div>
@foreach($rateCards as $platform => $cards)
<div class="platform-section">
<div class="platform-title">
@php $icons = ['instagram' => 'Instagram', 'tiktok' => 'TikTok', 'youtube' => 'YouTube', 'general' => 'General']; @endphp
{{ $icons[$platform] ?? ucfirst($platform) }}
@foreach($rateCards as $platform => $cards)
<div class="platform-section">
<div class="platform-title">
@php $icons = ['instagram' => 'Instagram', 'tiktok' => 'TikTok', 'youtube' => 'YouTube', 'general' => 'General']; @endphp
{{ $icons[$platform] ?? ucfirst($platform) }}
</div>
<table>
<thead>
<tr>
<th style="width:38%">Service</th>
<th style="width:37%">Description</th>
<th style="width:25%; text-align:right">Price</th>
</tr>
</thead>
<tbody>
@foreach($cards as $card)
<tr>
<td>
<div class="service-name">{{ $card->service_name }}</div>
@if($card->content_type)
<span class="content-type">{{ $card->content_type }}</span>
@endif
</td>
<td>
@if($card->description)
<div class="desc">{{ $card->description }}</div>
@endif
</td>
<td style="text-align:right">
@if($profile->show_prices)
<div class="price">{{ $card->formatted_price }}</div>
<div class="price-unit">{{ str_replace('_', ' ', $card->price_unit) }}</div>
@else
<div class="price" style="font-size:11px">On Request</div>
@endif
@if($card->is_negotiable)
<div class="negotiable">Negotiable</div>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endforeach
@if(!empty($profile->past_brands))
@php
$logoSizesPdf = [
'small' => 'max-height:30px; max-width:60px;',
'medium' => 'max-height:45px; max-width:90px;',
'large' => 'max-height:65px; max-width:130px;',
];
$sizeStylePdf = $logoSizesPdf[$profile->brand_logo_size ?? 'medium'] ?? $logoSizesPdf['medium'];
@endphp
<div style="page-break-before: always;"></div>
<div class="platform-section" style="margin-top:20px; page-break-inside:avoid;">
<div class="platform-title" style="text-align:center;">Brand Collaborations</div>
<div style="text-align:center; padding-top:10px;">
@foreach($profile->past_brands as $brandPath)
@if(file_exists(storage_path('app/public/' . $brandPath)))
<img src="{{ storage_path('app/public/' . $brandPath) }}"
style="{{ $sizeStylePdf }} object-fit:contain; margin:0 10px; display:inline-block; vertical-align:middle;">
@endif
@endforeach
</div>
</div>
@endif
@if($profile->terms_and_conditions)
<div style="page-break-before: always;"></div>
<div class="platform-section" style="margin-top:20px; page-break-inside:avoid;">
<div class="platform-title">Terms & Conditions</div>
<div style="font-size:10px; color:#6B7280; line-height:1.5; padding:0 10px;">
{!! $profile->terms_and_conditions !!}</div>
</div>
@endif
<div style="page-break-before: always;"></div>
@if($profile->contact_person_html)
<div class="contact-person-page">
{!! $profile->contact_person_html !!}
</div>
@else
<div style="text-align: center; margin-top: 40px;">
<h1
style="font-family: 'Comic Sans MS', sans-serif; font-size: 32px; font-weight: 900; letter-spacing: 4px; color: #111827; margin-bottom: 30px; text-transform: uppercase;">
CONTACT PERSON</h1>
@if($profile->whatsapp)
<div
style="font-family: 'Comic Sans MS', sans-serif; font-size: 36px; font-weight: 900; color: #14b8a6; margin-bottom: 5px;">
{{ $profile->whatsapp }}</div>
<div
style="font-family: 'Comic Sans MS', sans-serif; font-size: 20px; font-weight: 800; color: #14b8a6; margin-bottom: 30px; letter-spacing: 2px;">
(WHATS APP)</div>
@endif
@if($profile->email)
<div
style="font-family: 'Comic Sans MS', sans-serif; font-size: 14px; font-weight: 800; color: #f97316; margin-bottom: 10px; letter-spacing: 2px;">
EMAIL</div>
<div
style="font-family: 'Comic Sans MS', sans-serif; font-size: 32px; font-weight: 900; color: #ef4444; margin-bottom: 40px; letter-spacing: 2px;">
{{ strtoupper($profile->email) }}</div>
@endif
<div
style="font-size: 11px; font-weight: 900; color: #111827; line-height: 1.5; max-width: 80%; margin: 0 auto; text-transform: uppercase;">
Kami tidak bertanggung jawab atas segala bentuk kerjasama yg timbul dengan pihak selain dari kontak diatas
</div>
</div>
@endif
<div class="footer">
{{ $profile->custom_footer ?: 'Prices may vary. Contact for custom packages.' }}
· Generated {{ now()->format('d M Y') }}
</div>
<table>
<thead>
<tr>
<th style="width:38%">Service</th>
<th style="width:37%">Description</th>
<th style="width:25%; text-align:right">Price</th>
</tr>
</thead>
<tbody>
@foreach($cards as $card)
<tr>
<td>
<div class="service-name">{{ $card->service_name }}</div>
@if($card->content_type)
<span class="content-type">{{ $card->content_type }}</span>
@endif
</td>
<td>
@if($card->description)
<div class="desc">{{ $card->description }}</div>
@endif
</td>
<td style="text-align:right">
@if($profile->show_prices)
<div class="price">{{ $card->formatted_price }}</div>
<div class="price-unit">{{ str_replace('_', ' ', $card->price_unit) }}</div>
@else
<div class="price" style="font-size:11px">On Request</div>
@endif
@if($card->is_negotiable)
<div class="negotiable">Negotiable</div>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endforeach
<div class="footer">
{{ $profile->custom_footer ?: 'Prices may vary. Contact for custom packages.' }}
· Generated {{ now()->format('d M Y') }}
</div>
</body>
</html>
</html>

View File

@@ -4,6 +4,8 @@
@section('page-subtitle', 'Customise your public rate card page')
@section('content')
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
<script src="https://cdn.quilljs.com/1.3.6/quill.min.js"></script>
<div class="max-w-3xl mx-auto space-y-5">
@if(session('success'))
@@ -81,20 +83,79 @@
<h2 class="font-bold text-gray-700">Appearance</h2>
</div>
<div class="p-5 grid grid-cols-1 sm:grid-cols-2 gap-4">
<div class="sm:col-span-2">
<div class="sm:col-span-2" x-data="{
uploading: false,
errorMsg: '',
logoUrl: '{{ $profile->logo_path ? route('files.serve-profile-logo') : '' }}',
async pickFile(input) {
if (!input.files.length) return;
this.uploading = true;
this.errorMsg = '';
const fd = new FormData();
fd.append('logo', input.files[0]);
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
try {
const res = await fetch('{{ route('rate-cards.profile.upload-logo', [], false) }}', {
method: 'POST',
body: fd,
headers: {
'Accept': 'application/json'
}
});
const data = await res.json();
if (res.ok) {
this.logoUrl = data.url + '?t=' + Date.now();
} else {
this.errorMsg = data.message ?? 'Upload failed.';
}
} catch (err) {
console.error(err);
this.errorMsg = 'Network error. Please try again.';
}
this.uploading = false;
input.value = '';
},
async removeLogo() {
if (!confirm('Remove this logo?')) return;
const fd = new FormData();
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
fd.append('_method', 'DELETE');
await fetch('{{ route('rate-cards.profile.delete-logo', [], false) }}', {
method: 'POST',
body: fd,
headers: { 'Accept': 'application/json' }
});
this.logoUrl = '';
}
}">
<label class="block text-xs font-semibold text-gray-600 mb-1">Logo / Profile Image</label>
@if($profile->logo_path)
<div class="flex items-center gap-3 mb-2">
<img src="{{ route('files.serve-profile-logo') }}" alt="Logo"
class="w-16 h-16 object-cover rounded-2xl border border-pink-100">
<span class="text-xs text-gray-400">Current logo</span>
<template x-if="logoUrl">
<div class="flex items-center gap-3 mb-3">
<img :src="logoUrl" alt="Logo"
class="w-16 h-16 object-cover rounded-2xl border border-pink-100 shrink-0">
<div class="flex-1 min-w-0">
<p class="text-xs font-semibold text-gray-600">Current Logo</p>
<p class="text-xs text-gray-400 mt-0.5">Choose a new file to replace it</p>
</div>
<button type="button" @click="removeLogo()"
class="text-xs px-3 py-1.5 rounded-full border border-red-200 text-red-400 hover:bg-red-50 shrink-0">
🗑️ Remove
</button>
</div>
@endif
<input type="file" name="logo" accept="image/*" class="w-full text-sm text-gray-600
file:mr-3 file:py-2 file:px-4 file:rounded-full file:border-0
file:text-xs file:font-semibold file:bg-pink-50 file:text-pink-600
hover:file:bg-pink-100 cursor-pointer">
<p class="text-xs text-gray-400 mt-1">Max 2MB. PNG/JPG/WebP.</p>
</template>
<div class="relative">
<input type="file" accept="image/*" @change="pickFile($event.target)" class="w-full text-sm text-gray-600
file:mr-3 file:py-2 file:px-4 file:rounded-full file:border-0
file:text-xs file:font-semibold file:bg-pink-50 file:text-pink-600
hover:file:bg-pink-100 cursor-pointer" :disabled="uploading">
<span x-show="uploading" class="text-xs text-pink-500 mt-1 block">Uploading…</span>
<span x-show="errorMsg" x-text="errorMsg" class="text-xs text-red-500 mt-1 block"></span>
</div>
<p class="text-xs text-gray-400 mt-1">Max 2MB. Uploads immediately on file selection.</p>
</div>
<div>
@@ -128,7 +189,82 @@
class="input-soft text-sm flex-1" readonly>
</div>
</div>
<div>
<div class="sm:col-span-2" x-data="{
init() {
var quill = new Quill(this.$refs.editor, {
theme: 'snow',
placeholder: 'e.g. 1. 50% down payment required. 2. Rates valid for 30 days.',
modules: {
toolbar: [
[{ 'size': ['small', false, 'large', 'huge'] }],
['bold', 'italic', 'underline', 'strike'],
[{ 'color': [] }, { 'background': [] }],
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
['clean']
]
}
});
quill.on('text-change', () => {
this.$refs.input.value = quill.root.innerHTML;
});
}
}">
<label class="block text-xs font-semibold text-gray-600 mb-1">Terms & Conditions</label>
<input type="hidden" name="terms_and_conditions" x-ref="input"
value="{{ old('terms_and_conditions', $profile->terms_and_conditions) }}">
<div class="bg-white rounded-lg border border-pink-200">
<div x-ref="editor" style="min-height: 120px;">
{!! old('terms_and_conditions', $profile->terms_and_conditions) !!}
</div>
</div>
</div>
<div class="sm:col-span-2" x-data="{
init() {
var quill = new Quill(this.$refs.editor, {
theme: 'snow',
placeholder: 'Customize your Contact Person Page formatting...',
modules: {
toolbar: [
[{ 'size': ['small', false, 'large', 'huge'] }],
['bold', 'italic', 'underline', 'strike'],
[{ 'color': [] }, { 'background': [] }],
[{ 'align': [] }],
['clean']
]
}
});
quill.on('text-change', () => {
this.$refs.input.value = quill.root.innerHTML;
});
}
}">
<label class="block text-xs font-semibold text-gray-600 mb-1">Contact Person Page (PDF)</label>
@php
$defaultContactHtml = '<div style="text-align: center; margin-top: 40px;">
<h1 style="font-family: \'Comic Sans MS\', sans-serif; font-size: 32px; font-weight: 900; letter-spacing: 4px; color: #111827; margin-bottom: 30px; text-transform: uppercase;">CONTACT PERSON</h1>';
if ($profile->whatsapp) {
$defaultContactHtml .= '<div style="font-family: \'Comic Sans MS\', sans-serif; font-size: 36px; font-weight: 900; color: #14b8a6; margin-bottom: 5px;">' . $profile->whatsapp . '</div>
<div style="font-family: \'Comic Sans MS\', sans-serif; font-size: 20px; font-weight: 800; color: #14b8a6; margin-bottom: 30px; letter-spacing: 2px;">(WHATS APP)</div>';
}
if ($profile->email) {
$defaultContactHtml .= '<div style="font-family: \'Comic Sans MS\', sans-serif; font-size: 14px; font-weight: 800; color: #f97316; margin-bottom: 10px; letter-spacing: 2px;">EMAIL</div>
<div style="font-family: \'Comic Sans MS\', sans-serif; font-size: 32px; font-weight: 900; color: #ef4444; margin-bottom: 40px; letter-spacing: 2px;">' . strtoupper($profile->email) . '</div>';
}
$defaultContactHtml .= '<div style="font-size: 11px; font-weight: 900; color: #111827; line-height: 1.5; max-width: 80%; margin: 0 auto; text-transform: uppercase;">
Kami tidak bertanggung jawab atas segala bentuk kerjasama yg timbul dengan pihak selain dari kontak diatas
</div>
</div>';
@endphp
<input type="hidden" name="contact_person_html" x-ref="input"
value="{{ old('contact_person_html', $profile->contact_person_html) }}">
<div class="bg-white rounded-lg border border-pink-200">
<div x-ref="editor" style="min-height: 120px;">
{!! old('contact_person_html', $profile->contact_person_html ?: $defaultContactHtml) !!}
</div>
</div>
</div>
<div class="sm:col-span-2">
<label class="block text-xs font-semibold text-gray-600 mb-1">Custom Footer</label>
<input type="text" name="custom_footer" value="{{ old('custom_footer', $profile->custom_footer) }}"
class="input-soft" placeholder="e.g. Prices valid until Dec 2025 · DM for bundles">
@@ -146,22 +282,95 @@
</div>
</div>
{{-- Actions --}}
<div class="flex flex-wrap items-center gap-3">
<button type="submit" class="btn-sakura px-6 py-2.5">💾 Save Profile</button>
<a href="{{ route('rate-cards.public') }}" target="_blank"
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-pink-200 text-pink-500 hover:bg-pink-50">
👁️ Preview
</a>
<a href="{{ route('rate-cards.pdf') }}"
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-blue-200 text-blue-500 hover:bg-blue-50">
📄 Download PDF
</a>
<a href="{{ route('rate-cards.index') }}"
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
← Back
</a>
</div>
{{-- Past Brands --}}
<div class="cat-card overflow-hidden">
<div class="flex items-center gap-3 px-5 py-4 border-b border-pink-50">
<span class="text-xl"></span>
<h2 class="font-bold text-gray-700">Brand Collaborations Logo</h2>
</div>
<div class="p-5" x-data="{
uploading: false,
brands: {{ Illuminate\Support\Js::from($profile->past_brands ?? []) }},
async pickBrand(input) {
if (!input.files.length) return;
this.uploading = true;
const fd = new FormData();
for (let i = 0; i < input.files.length; i++) {
fd.set('logo', input.files[i]);
fd.set('_token', document.querySelector('meta[name=csrf-token]').content);
try {
const res = await fetch('{{ route('rate-cards.profile.upload-brand-logo', [], false) }}', { method: 'POST', body: fd, headers: { 'Accept': 'application/json' } });
const data = await res.json();
if (res.ok) this.brands.push(data.path);
} catch (e) { console.error(e); }
}
this.uploading = false;
input.value = '';
},
async removeBrand(path, index) {
if(!confirm('Remove this brand?')) return;
const fd = new FormData();
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
fd.append('_method', 'DELETE');
fd.append('path', path);
await fetch('{{ route('rate-cards.profile.delete-brand-logo', [], false) }}', { method: 'POST', body: fd, headers: {'Accept': 'application/json'} });
this.brands.splice(index, 1);
}
}">
<div class="flex items-center justify-between mb-2">
<label class="block text-xs font-semibold text-gray-600">Brand Logos</label>
<div class="flex items-center gap-2">
<span class="text-[10px] text-gray-500 uppercase tracking-widest font-semibold">Display Size on PDF:</span>
<select name="brand_logo_size" class="text-xs border-pink-200 rounded-md py-1 pr-8 pl-2 focus:ring-pink-500 focus:border-pink-500 bg-white">
<option value="small" {{ old('brand_logo_size', $profile->brand_logo_size ?? 'medium') == 'small' ? 'selected' : '' }}>Small</option>
<option value="medium" {{ old('brand_logo_size', $profile->brand_logo_size ?? 'medium') == 'medium' ? 'selected' : '' }}>Medium</option>
<option value="large" {{ old('brand_logo_size', $profile->brand_logo_size ?? 'medium') == 'large' ? 'selected' : '' }}>Large</option>
</select>
</div>
</div>
</form>
<div class="flex flex-wrap gap-4 mb-3">
<template x-for="(path, index) in brands" :key="index">
<div
class="relative rounded-2xl border border-pink-100 p-2 flex items-center justify-center bg-white group shrink-0"
style="width: 100px; height: 100px;">
<img :src="'/storage/' + path" class="max-w-full max-h-full object-contain">
<button type="button" @click="removeBrand(path, index)"
class="absolute -bottom-2 -right-2 bg-red-100 text-red-500 rounded-full w-6 h-6 flex items-center justify-center hover:bg-red-200 shadow text-[10px] z-10 transition-colors">🗑️</button>
</div>
</template>
<label
class="rounded-2xl border-2 border-dashed border-pink-200 flex items-center justify-center text-pink-300 hover:bg-pink-50 hover:text-pink-400 cursor-pointer transition-colors shrink-0"
style="width: 100px; height: 100px;"
:class="{'opacity-50 pointer-events-none': uploading}">
<span x-show="!uploading" class="text-2xl">+</span>
<span x-show="uploading" class="text-xs">...</span>
<input type="file" multiple accept="image/*" class="hidden" @change="pickBrand($event.target)">
</label>
</div>
<p class="text-xs text-gray-400 mt-1">Upload brand logos you've worked with. They will be displayed on your rate
cards.</p>
</div>
</div>
{{-- Actions --}}
<div class="flex flex-wrap items-center gap-3">
<button type="submit" class="btn-sakura px-6 py-2.5">💾 Save Profile</button>
<a href="{{ route('rate-cards.public') }}" target="_blank"
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-pink-200 text-pink-500 hover:bg-pink-50">
👁️ Preview
</a>
<a href="{{ route('rate-cards.pdf') }}"
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-blue-200 text-blue-500 hover:bg-blue-50">
📄 Download PDF
</a>
<a href="{{ route('rate-cards.index') }}"
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
← Back
</a>
</div>
</form>
</div>
@endsection

View File

@@ -171,10 +171,35 @@
}
.footer {
margin-top: 40px;
text-align: center;
margin-top: 60px;
color: #D1D5DB;
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 {
@@ -283,6 +308,34 @@
<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
@if($profile->terms_and_conditions)
<div class="platform-section" style="margin-top:40px;">
<div class="platform-title">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') }}-->