mirror of
https://github.com/zadam/trilium.git
synced 2026-05-06 12:37:04 +02:00
feat(text): improve display of reference links with bookmarks
This commit is contained in:
@@ -434,6 +434,13 @@ async function loadReferenceLinkTitle($el: JQuery<HTMLElement>, href: string | n
|
||||
const title = await getReferenceLinkTitle(href);
|
||||
$el.text(title);
|
||||
|
||||
if (viewScope?.bookmark) {
|
||||
$el.append($("<small>").append(
|
||||
$("<span>").addClass("bx bx-bookmark"),
|
||||
document.createTextNode(viewScope.bookmark)
|
||||
));
|
||||
}
|
||||
|
||||
if (note) {
|
||||
const icon = await getLinkIcon(noteId, viewScope.viewMode);
|
||||
|
||||
@@ -459,8 +466,8 @@ async function getReferenceLinkTitle(href: string) {
|
||||
|
||||
return attachment ? attachment.title : "[missing attachment]";
|
||||
}
|
||||
return note.title;
|
||||
|
||||
return note.title;
|
||||
}
|
||||
|
||||
function getReferenceLinkTitleSync(href: string) {
|
||||
@@ -483,8 +490,12 @@ function getReferenceLinkTitleSync(href: string) {
|
||||
|
||||
return attachment ? attachment.title : "[missing attachment]";
|
||||
}
|
||||
return note.title;
|
||||
|
||||
if (viewScope?.bookmark) {
|
||||
return `${note.title} - ${viewScope.bookmark}`;
|
||||
}
|
||||
|
||||
return note.title;
|
||||
}
|
||||
|
||||
if (glob.device !== "print") {
|
||||
|
||||
@@ -714,6 +714,15 @@ html .note-detail-editable-text :not(figure, .include-note, hr):first-child {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.ck-content a.reference-link small {
|
||||
margin-left: 0.25em;
|
||||
opacity: 0.5;
|
||||
|
||||
>span {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Read-only text content
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user