Skip to content

Commit 33e0de8

Browse files
jackyzha0MasssiveJuice08
authored andcommitted
fix: embed pdf aspect ratio (closes #1310)
1 parent 6e8252a commit 33e0de8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

quartz/plugins/transformers/ofm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
264264
} else if ([".pdf"].includes(ext)) {
265265
return {
266266
type: "html",
267-
value: `<iframe src="${url}"></iframe>`,
267+
value: `<iframe src="${url}" class="pdf"></iframe>`,
268268
}
269269
// MMW - assign custom styling to .zip embed download link
270270
} else if ([".zip", ".7z"].includes(ext)) {

quartz/styles/base.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,8 @@ ol.overflow {
542542
overflow-y: hidden;
543543
}
544544

545-
.external-embed.youtube {
545+
.external-embed.youtube,
546+
iframe.pdf {
546547
aspect-ratio: 16 / 9;
547548
height: 100%;
548549
width: 100%;

0 commit comments

Comments
 (0)