]> git.bts.cx Git - cx.git/blobdiff - cx/lib/markdown.php
Fix CSS for images
[cx.git] / cx / lib / markdown.php
index 771b9476370ed2546633eabdf9aea85454e87d8d..b79fb85a35f11874aa340118e42c621f022a1904 100644 (file)
@@ -20,14 +20,12 @@ class ExtendedParsedown extends Parsedown {
                                return;
                        }
 
-                       $permalink = '/data/images/' . $image->url;
-
                        return array(
                                'extent' => strlen($matches[0]) + 1, 
                                'element' => array(
                                        'name' => 'img',
                                        'attributes' => array(
-                                               'src' => cx_url_site($permalink),
+                                               'src' => cx_url_site($image->get_permalink_path()),
                                                'alt' => $image->alt_text,
                                        ),
                                ),
@@ -49,10 +47,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",