mirror of
				https://github.com/ZetaKebab/quartz.git
				synced 2025-11-03 22:49:47 +00:00 
			
		
		
		
	fix: responsive youtube embed (closes #1167)
This commit is contained in:
		@@ -616,11 +616,10 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
 | 
			
		||||
                  // YouTube video (with optional playlist)
 | 
			
		||||
                  node.tagName = "iframe"
 | 
			
		||||
                  node.properties = {
 | 
			
		||||
                    class: "external-embed",
 | 
			
		||||
                    class: "external-embed youtube",
 | 
			
		||||
                    allow: "fullscreen",
 | 
			
		||||
                    frameborder: 0,
 | 
			
		||||
                    width: "600px",
 | 
			
		||||
                    height: "350px",
 | 
			
		||||
                    src: playlistId
 | 
			
		||||
                      ? `https://www.youtube.com/embed/${videoId}?list=${playlistId}`
 | 
			
		||||
                      : `https://www.youtube.com/embed/${videoId}`,
 | 
			
		||||
@@ -629,11 +628,10 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
 | 
			
		||||
                  // YouTube playlist only.
 | 
			
		||||
                  node.tagName = "iframe"
 | 
			
		||||
                  node.properties = {
 | 
			
		||||
                    class: "external-embed",
 | 
			
		||||
                    class: "external-embed youtube",
 | 
			
		||||
                    allow: "fullscreen",
 | 
			
		||||
                    frameborder: 0,
 | 
			
		||||
                    width: "600px",
 | 
			
		||||
                    height: "350px",
 | 
			
		||||
                    src: `https://www.youtube.com/embed/videoseries?list=${playlistId}`,
 | 
			
		||||
                  }
 | 
			
		||||
                }
 | 
			
		||||
 
 | 
			
		||||
@@ -541,3 +541,10 @@ ol.overflow {
 | 
			
		||||
  overflow-x: auto;
 | 
			
		||||
  overflow-y: hidden;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.external-embed.youtube {
 | 
			
		||||
  aspect-ratio: 16 / 9;
 | 
			
		||||
  height: 100%;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  border-radius: 5px;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user