Skip to content

Build your personal knowledge base with Trilium Notes

fix(collection/presentation): images appear stretched

Elian Doran3495ed82fbeb
diff --git a/apps/client/src/widgets/collections/presentation/index.tsx b/apps/client/src/widgets/collections/presentation/index.tsx
index 34c664247f..c6429b8d7a 100644
--- a/apps/client/src/widgets/collections/presentation/index.tsx
+++ b/apps/client/src/widgets/collections/presentation/index.tsx
@@ -3,6 +3,7 @@ import { useEffect, useLayoutEffect, useRef, useState } from "preact/hooks";
import Reveal from "reveal.js";
import slideBaseStylesheet from "reveal.js/dist/reveal.css?raw";
import slideThemeStylesheet from "reveal.js/dist/theme/black.css?raw";
+import slideCustomStylesheet from "./slidejs.css?raw";
import { buildPresentationModel, PresentationModel, PresentationSlideModel } from "./model";
import ShadowDom from "../../react/ShadowDom";
import ActionButton from "../../react/ActionButton";
@@ -11,7 +12,8 @@ import { RefObject } from "preact";
const stylesheets = [
slideBaseStylesheet,
- slideThemeStylesheet
+ slideThemeStylesheet,
+ slideCustomStylesheet
].map(stylesheet => stylesheet.replace(/:root/g, ":host"));
export default function PresentationView({ note }: ViewModeProps<{}>) {
diff --git a/apps/client/src/widgets/collections/presentation/slidejs.css b/apps/client/src/widgets/collections/presentation/slidejs.css
new file mode 100644
index 0000000000..6fd846f0b3
--- /dev/null
+++ b/apps/client/src/widgets/collections/presentation/slidejs.css
@@ -0,0 +1,4 @@
+figure img {
+ aspect-ratio: unset !important;
+ height: auto !important;
+}
\ No newline at end of file