Skip to content

Build your personal knowledge base with Trilium Notes

feat(share): cross-fade between the pages of a shared site

Elian Doran1e1f358e5903
diff --git a/packages/share-theme/src/page/layout.css b/packages/share-theme/src/page/layout.css
index 21600f2071..a8373c92ff 100644
--- a/packages/share-theme/src/page/layout.css
+++ b/packages/share-theme/src/page/layout.css
@@ -2,6 +2,25 @@ html {
--page-top-spacing: 2rem;
}
+/* Going to another page of the site cross-fades the content and keeps the panes in place. */
+@view-transition {
+ navigation: auto;
+}
+
+#header {
+ view-transition-name: site-header;
+}
+
+#left-pane {
+ view-transition-name: site-navigation;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ @view-transition {
+ navigation: none;
+ }
+}
+
/* Past 90rem the navigation pane widens into the space beside the layout, up to 24rem; the padding
keeps the content where the 90rem layout puts it. */
#split-pane {