Skip to content

Build your personal knowledge base with Trilium Notes

better sizing of search pane

azivner5a1938c078d2
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css
index ee5f5e6968..fa14759f8b 100644
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@ -166,9 +166,25 @@ div.ui-tooltip {
#tree {
overflow: auto;
- flex-grow: 100;
- flex-shrink: 100;
+ flex-grow: 1;
+ flex-shrink: 1;
+ flex-basis: 60%;
+ margin-top: 10px;
+}
+
+#search-results {
+ padding: 0 5px 5px 15px;
+ flex-basis: 40%;
+ flex-grow: 1;
+ flex-shrink: 1;
margin-top: 10px;
+ display: none;
+ overflow: auto;
+ border-bottom: 2px solid #ddd;
+}
+
+#search-results ul {
+ padding: 5px 5px 5px 15px;
}
/*
@@ -366,12 +382,4 @@ div.ui-tooltip {
#note-path-list .current a {
font-weight: bold;
-}
-
-#search-results {
- padding: 0 5px 5px 15px;
-}
-
-#search-results ul {
- padding: 5px 5px 5px 15px;
}
\ No newline at end of file
diff --git a/src/services/note_cache.js b/src/services/note_cache.js
index 2951ad09c1..6873762601 100644
--- a/src/services/note_cache.js
+++ b/src/services/note_cache.js
@@ -63,7 +63,7 @@ function findNotes(query) {
continue;
}
- const title = getNoteTitleForParent(noteId, parentNoteId).toLowerCase();
+ const title = getNoteTitle(noteId, parentNoteId).toLowerCase();
const foundTokens = [];
for (const token of tokens) {
@@ -116,7 +116,7 @@ function search(noteId, tokens, path, results) {
continue;
}
- const title = getNoteTitleForParent(noteId, parentNoteId);
+ const title = getNoteTitle(noteId, parentNoteId);
const foundTokens = [];
for (const token of tokens) {
@@ -136,7 +136,7 @@ function search(noteId, tokens, path, results) {
}
}
-function getNoteTitleForParent(noteId, parentNoteId) {
+function getNoteTitle(noteId, parentNoteId) {
const prefix = prefixes[noteId + '-' + parentNoteId];
let title = noteTitles[noteId];
@@ -159,7 +159,7 @@ function getNoteTitleForPath(path) {
let parentNoteId = 'root';
for (const noteId of path) {
- const title = getNoteTitleForParent(noteId, parentNoteId);
+ const title = getNoteTitle(noteId, parentNoteId);
titles.push(title);
parentNoteId = noteId;
diff --git a/src/views/index.ejs b/src/views/index.ejs
index 49a1879754..1830ae6508 100644
--- a/src/views/index.ejs
+++ b/src/views/index.ejs
@@ -81,7 +81,7 @@
</div>
</div>
- <div id="search-results" style="flex-shrink: 10; flex-grow: 10; margin-top: 10px; display: none; overflow: auto; border-bottom: 2px solid #ddd">
+ <div id="search-results">
<strong>Search results:</strong>
<ul id="search-results-inner">
@@ -91,7 +91,7 @@
</ul>
</div>
- <div id="tree" style="flex-shrink: 10; flex-grow: 10;"></div>
+ <div id="tree"></div>
</div>
<div style="grid-area: title;">