Skip to content

Build your personal knowledge base with Trilium Notes

fix(presentation): lay out columns and fit images on slides

Elian Doran768f6f911cb3
diff --git a/apps/client/src/widgets/collections/presentation/index.tsx b/apps/client/src/widgets/collections/presentation/index.tsx
index 9d7da2fadc..441cfe0f58 100644
--- a/apps/client/src/widgets/collections/presentation/index.tsx
+++ b/apps/client/src/widgets/collections/presentation/index.tsx
@@ -1,5 +1,6 @@
import "./index.css";
+import multicolumnStylesheet from "@triliumnext/ckeditor5/src/theme/multicolumn.css?raw";
import { RefObject } from "preact";
import { useEffect, useLayoutEffect, useRef, useState } from "preact/hooks";
import Reveal, { RevealApi } from "reveal.js";
@@ -92,6 +93,7 @@ function usePresentationStylesheets(note: FNote, media: ViewModeMedia) {
slideBaseStylesheet,
themeStylesheet,
katexStylesheet,
+ multicolumnStylesheet,
slideCustomStylesheet
];
if (media === "screen") {
diff --git a/apps/client/src/widgets/collections/presentation/slidejs.css b/apps/client/src/widgets/collections/presentation/slidejs.css
index c4b517f89e..eefb0bedd7 100644
--- a/apps/client/src/widgets/collections/presentation/slidejs.css
+++ b/apps/client/src/widgets/collections/presentation/slidejs.css
@@ -10,9 +10,23 @@
box-shadow: none;
}
-figure img {
- aspect-ratio: unset !important;
+:host .reveal .slides {
+ container-type: size;
+}
+
+.reveal figure.image {
+ margin: 0 auto;
+}
+
+.reveal figure img {
+ width: auto !important;
height: auto !important;
+ aspect-ratio: unset !important;
+ max-height: 50cqh;
+}
+
+.reveal figcaption {
+ font-size: 0.6em;
}
p:has(span.text-tiny),