mirror of
https://github.com/zadam/trilium.git
synced 2026-03-04 11:56:09 +01:00
client/list view: add an alternate style for search results
This commit is contained in:
parent
9c13f36ca0
commit
a6cbde88bb
@ -209,6 +209,48 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nested-note-list.search-results {
|
||||||
|
span.tn-icon + span > span {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column-reverse;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
small {
|
||||||
|
line-height: .85em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-path {
|
||||||
|
margin-left: 0;
|
||||||
|
font-size: .85em;
|
||||||
|
line-height: .85em;
|
||||||
|
font-weight: 500;
|
||||||
|
letter-spacing: .5pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tn-icon {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-inline-end: 12px;
|
||||||
|
background: rgb(88, 88, 88);
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 1.75em;
|
||||||
|
height: 1.75em;
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-book-title {
|
||||||
|
--link-hover-background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ck-find-result {
|
||||||
|
background: transparent;
|
||||||
|
color: var(--quick-search-result-highlight-color);
|
||||||
|
font-weight: 600;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.note-content-preview:has(.note-book-content:empty) {
|
.note-content-preview:has(.note-book-content:empty) {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@ -36,7 +36,7 @@ export function ListView({ note, noteIds: unfilteredNoteIds, highlightedTokens }
|
|||||||
{ noteIds.length > 0 && <div class="note-list-wrapper">
|
{ noteIds.length > 0 && <div class="note-list-wrapper">
|
||||||
{!hasCollectionProperties && <Pager {...pagination} />}
|
{!hasCollectionProperties && <Pager {...pagination} />}
|
||||||
|
|
||||||
<Card className="nested-note-list">
|
<Card className={clsx("nested-note-list", {"search-results": (noteType === "search")})}>
|
||||||
{pageNotes?.map(childNote => (
|
{pageNotes?.map(childNote => (
|
||||||
<ListNoteCard
|
<ListNoteCard
|
||||||
key={childNote.noteId}
|
key={childNote.noteId}
|
||||||
@ -121,11 +121,11 @@ function ListNoteCard({ note, parentNote, highlightedTokens, currentLevel, expan
|
|||||||
subSections={subSections}
|
subSections={subSections}
|
||||||
childrenVisible={isExpanded}
|
childrenVisible={isExpanded}
|
||||||
hasAction
|
hasAction
|
||||||
onAction={() => setExpanded(!isExpanded)}
|
|
||||||
data-note-id={note.noteId}
|
data-note-id={note.noteId}
|
||||||
>
|
>
|
||||||
<h5 className="">
|
<h5 className="">
|
||||||
<span className={`note-expander ${isExpanded ? "bx bx-chevron-down" : "bx bx-chevron-right"}`} />
|
<span className={`note-expander ${isExpanded ? "bx bx-chevron-down" : "bx bx-chevron-right"}`}
|
||||||
|
onClick={() => setExpanded(!isExpanded)}/>
|
||||||
<Icon className="note-icon" icon={note.getIcon()} />
|
<Icon className="note-icon" icon={note.getIcon()} />
|
||||||
<NoteLink className="note-book-title"
|
<NoteLink className="note-book-title"
|
||||||
notePath={notePath}
|
notePath={notePath}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user