blob: f7661905582619a04fa1f3439c4815e84a98c59e (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
{{- $url := default "https://www.gutenberg.org/files/98/old/2city12p.pdf" (.Get "url" | default (.Get 0)) -}}
{{- $title := default "PDF Document" (.Get "title" | default (.Get 1)) -}}
{{- $caption := default (print $title ": [Download](" $url ")") (.Get "caption" | default (.Get 2)) -}}
<pdf-container title="{{ $title }}">
<iframe loading="lazy"
sandbox="allow-scripts allow-presentation allow-same-origin"
src="https://docs.google.com/gview?url={{ $url }}&embedded=true">
</iframe>
<figcaption>{{ $caption | markdownify }}</figcaption>
</pdf-container>
|