making pt-videos fit video aspect ratio

This commit is contained in:
Chris Cochrun 2023-03-21 17:27:32 -05:00
parent be049e4536
commit d3c7dc699b
2 changed files with 9 additions and 1 deletions

View file

@ -1849,6 +1849,14 @@ select {
display: none;
}
.aspect-auto {
aspect-ratio: auto;
}
.aspect-video {
aspect-ratio: 16 / 9;
}
.h-screen {
height: 100vh;
}

View file

@ -4,5 +4,5 @@
{{- $height := .Get "height" | default "315" -}}
<div style="display: flex;">
<iframe class="pt-vid" style="flex: auto;" width="{{ $width }}" height="{{ $height }}" sandbox="allow-same-origin allow-scripts allow-popups" src="{{ $vid }}?warningTitle=0" frameborder="0" allowfullscreen></iframe>
<iframe class="pt-vid flex-auto aspect-video w-full" sandbox="allow-same-origin allow-scripts allow-popups" src="{{ $vid }}?warningTitle=0" frameborder="0" allowfullscreen></iframe>
</div>