aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/css/default.css11
-rw-r--r--config.json8
-rw-r--r--config.toml6
-rw-r--r--config.yaml6
-rw-r--r--themes/default/layouts/shortcodes/pdf.html14
5 files changed, 28 insertions, 17 deletions
diff --git a/assets/css/default.css b/assets/css/default.css
index e62e569..4770202 100644
--- a/assets/css/default.css
+++ b/assets/css/default.css
@@ -429,10 +429,17 @@ q:after {
object {
width: 100%;
- border: 1px solid #ccc;
- border: 1px solid var(--border-lighter);
+ border: 2px solid #ccc;
+ border: 2px solid var(--border-darker);
min-height: 16rem;
border-radius: 0.5rem;
+ display: flex;
+ align-items: center;
+ text-align: center;
+}
+
+object p {
+ margin: 1rem;
}
details,
diff --git a/config.json b/config.json
index 8959411..b2d2ae3 100644
--- a/config.json
+++ b/config.json
@@ -134,12 +134,13 @@
"platform.twitter.com",
"en.m.wikipedia.org",
"odysee.com",
- "docs.google.com"
+ "www.gutenberg.org"
],
"img-src": [
"'self'",
"http://preview.test",
- "imgs.xkcd.com"
+ "imgs.xkcd.com",
+ "www.gutenberg.org"
],
"manifest-src": [
"'self'"
@@ -150,7 +151,8 @@
"i.imgur.com"
],
"object-src": [
- "'none'"
+ "'self'",
+ "www.gutenberg.org"
],
"prefetch-src": [
"'self'"
diff --git a/config.toml b/config.toml
index 84b6aad..6da97ed 100644
--- a/config.toml
+++ b/config.toml
@@ -107,11 +107,11 @@ enableRobotsTXT = true
default-src = ["'self'"]
font-src = ["'self'"]
form-action = ["'self'", "lite.duckduckgo.com"]
- frame-src = ["'self'", "imgur.com", "www.youtube-nocookie.com", "platform.twitter.com", "en.m.wikipedia.org", "odysee.com", "docs.google.com"]
- img-src = ["'self'", "http://preview.test", "imgs.xkcd.com"]
+ frame-src = ["'self'", "imgur.com", "www.youtube-nocookie.com", "platform.twitter.com", "en.m.wikipedia.org", "odysee.com", "www.gutenberg.org"]
+ img-src = ["'self'", "http://preview.test", "imgs.xkcd.com", "www.gutenberg.org"]
manifest-src = ["'self'"]
media-src = ["'self'", "raw.githubusercontent.com", "i.imgur.com"]
- object-src = ["'none'"]
+ object-src = ["'self'", "www.gutenberg.org"]
prefetch-src = ["'self'"]
script-src-elem = ["'self'", "s.imgur.com", "platform.twitter.com"]
script-src = ["'self'", "s.imgur.com", "platform.twitter.com"]
diff --git a/config.yaml b/config.yaml
index 1688d90..96beeeb 100644
--- a/config.yaml
+++ b/config.yaml
@@ -96,11 +96,11 @@ params:
font-src: ["'self'"]
form-action: ["'self'", lite.duckduckgo.com]
frame-src: ["'self'", imgur.com, www.youtube-nocookie.com, platform.twitter.com,
- en.m.wikipedia.org, odysee.com, docs.google.com]
- img-src: ["'self'", http://preview.test, imgs.xkcd.com]
+ en.m.wikipedia.org, odysee.com, www.gutenberg.org]
+ img-src: ["'self'", http://preview.test, imgs.xkcd.com, www.gutenberg.org]
manifest-src: ["'self'"]
media-src: ["'self'", raw.githubusercontent.com, i.imgur.com]
- object-src: ["'none'"]
+ object-src: ["'self'", www.gutenberg.org]
prefetch-src: ["'self'"]
script-src-elem: ["'self'", s.imgur.com, platform.twitter.com]
script-src: ["'self'", s.imgur.com, platform.twitter.com]
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>