mirror of
https://github.com/PrivSec-dev/privsec.dev.git
synced 2024-12-27 08:19:23 -05:00
improve youtube shortcode (#21)
This commit is contained in:
parent
e71be60e17
commit
912096e167
15
assets/css/extended/youtube.css
Normal file
15
assets/css/extended/youtube.css
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
.youtube-embed-div {
|
||||||
|
position: relative;
|
||||||
|
padding-bottom: 56.25%;
|
||||||
|
height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.youtube-embed-frame {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border: 0;
|
||||||
|
}
|
4
layouts/shortcodes/youtube.html
Normal file
4
layouts/shortcodes/youtube.html
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{{- $id := .Get "id" | default (.Get 0) -}}
|
||||||
|
<div class="youtube-embed-div">
|
||||||
|
<iframe src="https://www.youtube-nocookie.com/embed/{{ $id }}" class="youtube-embed-frame" allowfullscreen title="YouTube Video"></iframe>
|
||||||
|
</div>
|
@ -2,11 +2,10 @@
|
|||||||
for = "/*"
|
for = "/*"
|
||||||
[headers.values]
|
[headers.values]
|
||||||
Strict-Transport-Security = "max-age=63072000; includeSubDomains; preload"
|
Strict-Transport-Security = "max-age=63072000; includeSubDomains; preload"
|
||||||
Content-Security-Policy = "default-src 'none'; connect-src 'self'; img-src 'self'; script-src-elem 'self'; style-src 'self' 'unsafe-inline'; style-src-elem 'self'; frame-src www.youtube-nocookie.com; form-action 'none'; frame-ancestors 'none'; block-all-mixed-content; base-uri 'none'"
|
Content-Security-Policy = "default-src 'none'; connect-src 'self'; img-src 'self'; script-src-elem 'self'; style-src-elem 'self'; frame-src www.youtube-nocookie.com; form-action 'none'; frame-ancestors 'none'; block-all-mixed-content; base-uri 'none'"
|
||||||
X-Content-Type-Options = "nosniff"
|
X-Content-Type-Options = "nosniff"
|
||||||
Referrer-Policy = "no-referrer"
|
Referrer-Policy = "no-referrer"
|
||||||
Cross-Origin-Opener-Policy = "same-origin"
|
Cross-Origin-Opener-Policy = "same-origin"
|
||||||
Cross-Origin-Embedder-Policy = "require-corp"
|
|
||||||
X-Frame-Options = "DENY"
|
X-Frame-Options = "DENY"
|
||||||
X-XSS-Protection = "0"
|
X-XSS-Protection = "0"
|
||||||
Permissions-Policy = "accelerometer=(), autoplay=(), camera=(), clipboard-read=(), display-capture=(), document-domain=(), encrypted-media=(), fullscreen=(), geolocation=(), gyroscope=(), hid=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=(), usb=(), xr-spatial-tracking=()"
|
Permissions-Policy = "accelerometer=(), autoplay=(), camera=(), clipboard-read=(), display-capture=(), document-domain=(), encrypted-media=(), fullscreen=(), geolocation=(), gyroscope=(), hid=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=(), usb=(), xr-spatial-tracking=()"
|
||||||
|
Loading…
Reference in New Issue
Block a user