ui/grid view: add support for colored notes
Some checks are pending
Checks / main (push) Waiting to run

This commit is contained in:
Adorian Doran 2026-02-18 10:29:41 +02:00
parent 75c7d55e01
commit 419e87b0de
5 changed files with 13 additions and 15 deletions

View File

@ -314,7 +314,8 @@
*/
#left-pane .fancytree-node.tinted,
.nested-note-list-item.use-note-color {
.nested-note-list-item.use-note-color,
.note-book-card.use-note-color {
--custom-color: var(--dark-theme-custom-color);
/* The background color of the active item in the note tree.

View File

@ -308,7 +308,8 @@
}
#left-pane .fancytree-node.tinted,
.nested-note-list-item.use-note-color {
.nested-note-list-item.use-note-color,
.note-book-card.use-note-color {
--custom-color: var(--light-theme-custom-color);
/* The background color of the active item in the note tree.

View File

@ -727,10 +727,6 @@ li.dropdown-item a.dropdown-item-button:focus-visible {
margin-bottom: 0;
}
.note-list-wrapper .note-book-card .tn-icon {
color: var(--left-pane-icon-color) !important;
}
.note-list.grid-view .note-book-card:hover {
filter: contrast(105%);
}

View File

@ -124,6 +124,14 @@
margin-inline-start: 8px;
flex-shrink: 0;
}
&.use-note-color {
span.tn-icon + span,
.tn-icon,
.rendered-note-attributes {
color: var(--custom-color);
}
}
}
/* #region List view */
@ -178,14 +186,6 @@
opacity: .6;
}
}
&.use-note-color {
span.tn-icon + span,
.nested-note-list:not(.search-results) & .tn-icon,
.rendered-note-attributes {
color: var(--custom-color);
}
}
}
.nested-note-list:not(.search-results) h5 {

View File

@ -156,7 +156,7 @@ function GridNoteCard(props: GridNoteCardProps) {
const notePath = getNotePath(props.parentNote, props.note);
return (
<div className={clsx("note-book-card", "no-tooltip-preview", "block-link", {
<div className={clsx("note-book-card", "no-tooltip-preview", "block-link", props.note.getColorClass(), {
"archived": props.note.isArchived
})}
data-href={`#${notePath}`}