feat: add content showcase feature to rate card profiles with PDF rendering support
This commit is contained in:
@@ -299,6 +299,52 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($profile->content_showcase))
|
||||
<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;">Content Showcase</div>
|
||||
<div style="text-align:center; padding-top:10px;">
|
||||
@foreach($profile->content_showcase as $item)
|
||||
@php
|
||||
$isUrl = ($item['file_id'] === 'url');
|
||||
$file = !$isUrl ? \App\Models\MediaFile::find($item['file_id']) : null;
|
||||
@endphp
|
||||
@if($file || $isUrl)
|
||||
<div style="display:inline-block; width:180px; margin:10px; border:1px solid rgba(0,0,0,0.1); border-radius:8px; overflow:hidden; vertical-align:top; background:#ffffff;">
|
||||
<div style="height:120px; background:#F9FAFB; border-bottom:1px solid rgba(0,0,0,0.05); position:relative; text-align:center;">
|
||||
@if(!empty($item['thumbnail_path']) && file_exists(storage_path('app/public/' . $item['thumbnail_path'])))
|
||||
<a href="{{ $isUrl ? $item['url'] : $file->url }}" target="_blank" style="display:block; text-decoration:none; position:relative;">
|
||||
<img src="{{ storage_path('app/public/' . $item['thumbnail_path']) }}" style="width:100%; height:120px; object-fit:cover;">
|
||||
@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:30px; height:30px; background:rgba(255,255,255,0.8); border-radius:50%; display:flex; align-items:center; justify-content:center; color:{{ $accentHex }}; font-size:16px;">▶</div>
|
||||
</div>
|
||||
@endif
|
||||
</a>
|
||||
@elseif(!$isUrl && $file->is_image && file_exists(storage_path('app/private/' . $file->path)))
|
||||
<a href="{{ $file->url }}" target="_blank" style="display:block; text-decoration:none;">
|
||||
<img src="{{ storage_path('app/private/' . $file->path) }}" style="width:100%; height:120px; object-fit:cover;">
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ $isUrl ? $item['url'] : $file->url }}" target="_blank" style="display:block; text-decoration:none; color:{{ $accentHex }}; padding-top:40px; font-weight:bold;">
|
||||
<span style="font-size:30px; display:block;">{{ $isUrl ? '🌐' : ($file->is_video ? '🎬' : '📁') }}</span>
|
||||
{{ $isUrl ? 'Open Link' : 'View File' }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
<div style="padding:10px; text-align:center;">
|
||||
<div style="font-weight:700; font-size:11px;">{{ $item['name'] }}</div>
|
||||
<div style="font-size:9px; color:#9CA3AF; margin-top:4px;">
|
||||
{{ $isUrl ? 'External Link' : ($file->is_video ? 'Video' : ($file->is_image ? 'Image' : 'Document')) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@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;">
|
||||
|
||||
Reference in New Issue
Block a user