diff --git a/assets/sass/_theme/blocks/video.sass b/assets/sass/_theme/blocks/video.sass index f7b9fddcfdf405b4a386e8a19e2b5faaa9a9ad6c..8d698116f2713e268738d92c5531b39421055d20 100644 --- a/assets/sass/_theme/blocks/video.sass +++ b/assets/sass/_theme/blocks/video.sass @@ -2,7 +2,8 @@ .video @include aspect-ratio(16/9, 'iframe') @supports not (aspect-ratio: 1) - iframe + iframe, + img min-height: 400px position: relative &-player @@ -22,6 +23,7 @@ width: 100% height: 100% img + object-fit: cover z-index: 1 &::after content: '' diff --git a/layouts/partials/blocks/templates/video.html b/layouts/partials/blocks/templates/video.html index 072a837a1f374f9146633868b97fccd9dafaaa10..6a33257b08a80b4a8debbff4684c654e263db6df 100644 --- a/layouts/partials/blocks/templates/video.html +++ b/layouts/partials/blocks/templates/video.html @@ -16,7 +16,10 @@ <div class="video"> <div class="video-player"> <button class="video-player__play" title ="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button> - <img src="https://img.youtube.com/vi/XEEUOiTgJL0/hqdefault.jpg" alt=""> + <picture> + <source srcset="https://osuny-1b4da.kxcdn.com/g1qn3b0yvdg2t0wosq059xocpyq1?format=webp&width=1800&height=0&&fit=inside&quality=50" type="image/jpg" /> + <img src="https://osuny-1b4da.kxcdn.com/g1qn3b0yvdg2t0wosq059xocpyq1?format=webp&width=1800&height=0&&fit=inside&quality=50" alt="" /> + </picture> </div> {{ $url := .url}} {{ if strings.Contains $url "vimeo" }} diff --git a/layouts/partials/head/csp.html b/layouts/partials/head/csp.html index 8f7ac79c9f28fb5ef65aac2beb2f90b4e93e0092..de1b2d9420f69d64cc252834bb4d1a716339b2f9 100644 --- a/layouts/partials/head/csp.html +++ b/layouts/partials/head/csp.html @@ -1,5 +1,5 @@ {{- with site.Data.website.external_domains -}} -<meta http-equiv="-Content-Security-Policy" +<meta http-equiv="Content-Security-Policy" content=" default-src 'self' {{ delimit . " " }} {{ if not hugo.IsProduction }}'unsafe-inline'{{ end }}