Skip to content

Commit

Permalink
Update Pdf.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsaffar committed Jun 30, 2024
1 parent ab95fdc commit e1fb730
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions src/components/previews/Pdf.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,35 @@
<template>
<h3 class="mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400" id="modal-title"
:title="app.modal.data.item.path">{{ app.modal.data.item.basename }}</h3>
<div>
<object class="h-[60vh]" :data="getPDFUrl()" type="application/pdf" width="100%" height="100%">
<iframe
class="border-0"
:src="getPDFUrl()"
width="100%"
height="100%"
>
<div class="vuefinder__pdf-preview">
<h3 class="vuefinder__pdf-preview__title" id="modal-title" :title="app.modal.data.item.path">
{{ app.modal.data.item.basename }}
</h3>
<div>
<object class="vuefinder__pdf-preview__object" :data="getPDFUrl()" type="application/pdf" width="100%" height="100%">
<iframe class="vuefinder__pdf-preview__iframe" :src="getPDFUrl()" width="100%" height="100%">
<p>
Your browser does not support PDFs.
<a href="https://example.com/test.pdf">Download the PDF</a>
.
<a href="https://example.com/test.pdf">Download the PDF</a>.
</p>
</iframe>
</object>
</object>
</div>
</div>
</template>

<style>
.vuefinder__pdf-preview__title {
@apply mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400;
}
.vuefinder .vuefinder__pdf-preview__object {
@apply h-[60vh];
}
.vuefinder .vuefinder__pdf-preview__iframe {
@apply border-0;
}
</style>

<script setup>
import {inject,onMounted} from 'vue';
Expand Down

0 comments on commit e1fb730

Please sign in to comment.