aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/shortcodes
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-10-10 16:48:54 -0400
committertdro <tdro@noreply.example.com>2022-10-10 16:48:54 -0400
commit87b6b35489e69af4d77ed294024f7b0b15129bf3 (patch)
tree6dd13817184fbe23fb48689ee94ec191d1c69631 /themes/default/layouts/shortcodes
parenta78c0989ee815fe04e2f949d0b9c2b22c3824d5b (diff)
downloadcanory-87b6b35489e69af4d77ed294024f7b0b15129bf3.tar.gz
canory-87b6b35489e69af4d77ed294024f7b0b15129bf3.tar.bz2
canory-87b6b35489e69af4d77ed294024f7b0b15129bf3.zip
themes/default/layouts/shortcodes/pdf: Use object for PDF
Remove external PDF viewer in demonstration.
Diffstat (limited to 'themes/default/layouts/shortcodes')
-rw-r--r--themes/default/layouts/shortcodes/pdf.html14
1 files changed, 8 insertions, 6 deletions
diff --git a/themes/default/layouts/shortcodes/pdf.html b/themes/default/layouts/shortcodes/pdf.html
index 824169b..6c627b5 100644
--- a/themes/default/layouts/shortcodes/pdf.html
+++ b/themes/default/layouts/shortcodes/pdf.html
@@ -2,10 +2,12 @@
{{- $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>
+<portable-document title="{{ $title }}">
+ <object type="application/pdf" data="{{ $url }}">
+ <p>
+ Your browser does not support a <code>PDF</code> (Portable Document Format)
+ plugin. Here's a <a href="{{ $url }}">link to the PDF file</a> instead.
+ </p>
+ </object>
<footer>{{ $caption | markdownify }}</footer>
-</pdf-container>
+</portable-document>