Files
DOSSIER/website/themes/hextra/layouts/_shortcodes/pdf.html
T
karim 5a6129bee1 Dokumentations-/Marketing-Website hinzugefügt (Hugo, Hextra-Theme)
Erstmaliger Commit des website/-Unterprojekts (bisher nie versioniert).
Enthält Inhalt/Konfiguration (content/, data/, i18n/, hugo.toml) sowie das
vendorte Hextra-Theme; Build-Output (public/) und Lock-Datei bleiben über
website/.gitignore ausgeschlossen.
2026-10-08 20:25:14 +02:00

16 lines
433 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" title="{{ (T "pdfViewer") | default "PDF viewer" }}"></iframe>
</div>