feat: add visibility toggles for content showcase items on public and PDF views
This commit is contained in:
@@ -299,12 +299,17 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($profile->content_showcase))
|
||||
@php
|
||||
$pdfShowcase = array_filter($profile->content_showcase ?? [], function($item) {
|
||||
return !isset($item['show_on_pdf']) || $item['show_on_pdf'];
|
||||
});
|
||||
@endphp
|
||||
@if(!empty($pdfShowcase))
|
||||
<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)
|
||||
@foreach($pdfShowcase as $item)
|
||||
@php
|
||||
$isUrl = ($item['file_id'] === 'url');
|
||||
$file = !$isUrl ? \App\Models\MediaFile::find($item['file_id']) : null;
|
||||
|
||||
Reference in New Issue
Block a user