Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
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.tsxindex 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.cssnew file mode 100644index 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