Skip to content

Build your personal knowledge base with Trilium Notes

fix(presentation): let collection slides fill the whole slide

Elian Doranc5d89b50074f
diff --git a/apps/client/src/widgets/collections/presentation/index.css b/apps/client/src/widgets/collections/presentation/index.css
index dfcb393091..23279dbc16 100644
--- a/apps/client/src/widgets/collections/presentation/index.css
+++ b/apps/client/src/widgets/collections/presentation/index.css
@@ -22,8 +22,12 @@
.presentation-collection-slide {
display: flex;
flex-direction: column;
- width: 100%;
- height: 100%;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: var(--full-bleed-width, 100%);
+ height: var(--full-bleed-height, 100%);
+ transform: translate(-50%, -50%);
overflow: auto;
background-color: var(--main-background-color);
color: var(--main-text-color);
diff --git a/apps/client/src/widgets/collections/presentation/slidejs.css b/apps/client/src/widgets/collections/presentation/slidejs.css
index a6b5bfef2a..56faf493aa 100644
--- a/apps/client/src/widgets/collections/presentation/slidejs.css
+++ b/apps/client/src/widgets/collections/presentation/slidejs.css
@@ -143,12 +143,19 @@ footer.file-footer {
height: 100%;
}
+/* The whole viewport in slide pixels, for content that covers it as a background does; a pixel more on
+ each side covers the rounding of the viewport size. Reveal.js sets the variables on each layout. */
+.reveal {
+ --full-bleed-width: calc(var(--viewport-width, 1280px) / var(--slide-scale, 1) + 2px);
+ --full-bleed-height: calc(var(--viewport-height, 720px) / var(--slide-scale, 1) + 2px);
+}
+
.reveal webview {
display: flex;
position: absolute;
top: 50%;
left: 50%;
- width: calc(var(--viewport-width, 1280px) / var(--slide-scale, 1) + 2px);
- height: calc(var(--viewport-height, 720px) / var(--slide-scale, 1) + 2px);
+ width: var(--full-bleed-width);
+ height: var(--full-bleed-height);
transform: translate(-50%, -50%);
}
\ No newline at end of file