diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css index ee5f5e696..fa14759f8 100644 --- a/src/public/stylesheets/style.css +++ b/src/public/stylesheets/style.css @@ -166,11 +166,27 @@ 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; +} + /* * .electron-in-page-search-window is a class specified to default * element for search window. @@ -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 2951ad09c..687376260 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 49a187975..1830ae650 100644 --- a/src/views/index.ejs +++ b/src/views/index.ejs @@ -81,7 +81,7 @@ -