33 lines
1.2 KiB
PHP
33 lines
1.2 KiB
PHP
<div class="-m-6 space-y-3 p-2">
|
|
@php
|
|
$title = isset($title) && is_string($title) && trim($title) !== '' ? trim($title) : 'Documento PDF';
|
|
$openUrl = isset($openUrl) && is_string($openUrl) && trim($openUrl) !== '' ? trim($openUrl) : $url;
|
|
@endphp
|
|
|
|
<div class="flex items-center justify-end gap-2 px-4 pt-4">
|
|
<div class="mr-auto pr-4 text-sm font-semibold text-slate-800">{{ $title }}</div>
|
|
<a
|
|
href="{{ $openUrl }}"
|
|
target="_blank"
|
|
rel="noopener"
|
|
class="inline-flex items-center rounded-md bg-slate-800 px-3 py-1.5 text-xs font-medium text-white hover:bg-slate-700"
|
|
>
|
|
Apri in nuova scheda
|
|
</a>
|
|
</div>
|
|
|
|
<div class="h-[78vh] w-full px-4 pb-4">
|
|
<object
|
|
data="{{ $url }}#toolbar=1&navpanes=1&view=FitH"
|
|
type="application/pdf"
|
|
class="h-full w-full rounded-lg border bg-white"
|
|
>
|
|
<iframe
|
|
title="PDF"
|
|
class="h-full w-full rounded-lg border"
|
|
src="{{ $url }}#toolbar=1&navpanes=1&view=FitH"
|
|
></iframe>
|
|
</object>
|
|
</div>
|
|
</div>
|