mirror of
https://github.com/imfing/hextra.git
synced 2025-08-23 17:46:38 -04:00
16 lines
380 B
HTML
16 lines
380 B
HTML
{{- /*
|
|
Shortcode to include a PDF file in a page.
|
|
|
|
@param {string} 0 The path to the PDF file.
|
|
|
|
@example {{< pdf "path/to/file.pdf" >}}
|
|
*/ -}}
|
|
|
|
{{- $path := .Get 0 -}}
|
|
{{- $url := partial "utils/file-path" (dict "page" .Page "path" $path) -}}
|
|
|
|
|
|
<div class="hextra-pdf">
|
|
<iframe src="{{ $url | safeURL }}" width="100%" style="min-height: 32rem;" frameborder="0"></iframe>
|
|
</div>
|