Skip to content

Build your personal knowledge base with Trilium Notes

feat(mobile/nav): improve handling of empty notes

Elian Doranac49c9729c9c
diff --git a/apps/client/src/services/content_renderer.css b/apps/client/src/services/content_renderer.css
index 80764486d4..9c0d45ff13 100644
--- a/apps/client/src/services/content_renderer.css
+++ b/apps/client/src/services/content_renderer.css
@@ -7,3 +7,9 @@
font-size: 500%;
flex-grow: 1;
}
+
+.rendered-content .ck-content {
+ p:last-child {
+ margin-bottom: 0;
+ }
+}
diff --git a/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.css b/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.css
index 834406a534..4aaad1c5c4 100644
--- a/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.css
+++ b/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.css
@@ -137,7 +137,7 @@
.mobile-navigator-current-preview {
position: relative;
- height: 140px;
+ max-height: 140px;
overflow: hidden;
font-size: 0.92em;
line-height: 1.35;
@@ -166,6 +166,12 @@
display: none;
}
+/* Collapse the whole preview (and its flex gap) when the rendered content is empty,
+ so pure folders don't show a blank row beneath the title. */
+.mobile-navigator-current-tile:has(.note-book-content-ready:empty) .mobile-navigator-current-preview {
+ display: none;
+}
+
.mobile-navigator-current-preview .note-book-content {
max-width: 100%;
}