]> git.bts.cx Git - cx.git/commitdiff
Try to fix aspect ratio issues
authorBen Sherratt <redacted>
Sun, 17 Mar 2024 14:12:40 +0000 (14:12 +0000)
committerBen Sherratt <redacted>
Sun, 17 Mar 2024 14:12:40 +0000 (14:12 +0000)
cx/lib/markdown.php
public/design/css/style.css

index 771b9476370ed2546633eabdf9aea85454e87d8d..aab58d59e005f0d5006e7918cbc2cbb4cbd20b74 100644 (file)
@@ -49,10 +49,10 @@ class ExtendedParsedown extends Parsedown {
                                        'name' => 'iframe',
                                        'text' => '',
                                        'attributes' => array(
-                                               'id' => "ytplayer",
+                                               'class' => "video",
                                                'type' => "text/html",
-                                               'width' => "640",
-                                               'height' => "360",
+                                               //'width' => "640",
+                                               //'height' => "360",
                                                'src' => "https://www.youtube.com/embed/" . $video_id,
                                                'frameborder' => "0",
                                                'loading' => "lazy",
index a09110f5aa19d0fe155cf0d17e17a781a7fa7c0f..27e627b0db15a2fbda74e8e243ca772d0778515f 100644 (file)
@@ -145,12 +145,19 @@ article + article {
 article img {
        display: block;
        width: 100%;
-       min-height: 20rem;
-       max-height: 40vh;
+       aspect-ratio: 640 / 360;
+       /*min-height: 20rem;
+       max-height: 40vh;*/
        object-fit: cover;
        margin: 0 auto 1rem !important;
 }
 
+article iframe {
+       display: block;
+       width: 100%;
+       aspect-ratio: 640 / 360;
+}
+
 /*@supports (aspect-ratio: 1) {
        article img {
                max-height: unset;