diff --git a/src/public/app/services/note_list_renderer.js b/src/public/app/services/note_list_renderer.js index eb5d71eff..96ff2031a 100644 --- a/src/public/app/services/note_list_renderer.js +++ b/src/public/app/services/note_list_renderer.js @@ -220,7 +220,9 @@ class NoteListRenderer { const $container = this.$noteList.find('.note-list-container').empty(); - const imageLinks = this.parentNote ? this.parentNote.getRelations('imageLink') : []; + const includedLinks = this.parentNote + ? this.parentNote.getRelations().filter(rel => rel.name === 'imageLink' || rel.name === 'includeNoteLink') + : []; const startIdx = (this.page - 1) * this.pageSize; const endIdx = startIdx + this.pageSize; @@ -229,8 +231,9 @@ class NoteListRenderer { const pageNotes = await treeCache.getNotes(pageNoteIds); for (const note of pageNotes) { - // image is already visible in the parent note so no need to display it separately in the book - if (imageLinks.find(rel => rel.value === note.noteId)) { + // note is already visible (either as image or included note) in the parent note + // so no need to display it separately in the book + if (includedLinks.find(rel => rel.value === note.noteId)) { continue; } diff --git a/src/public/app/widgets/type_widgets/editable_text.js b/src/public/app/widgets/type_widgets/editable_text.js index 57b1cd40d..93b0f984c 100644 --- a/src/public/app/widgets/type_widgets/editable_text.js +++ b/src/public/app/widgets/type_widgets/editable_text.js @@ -43,15 +43,15 @@ const TPL = ` } .note-detail-editable-text h2 { font-size: 1.8em; } - .note-detail-editable-text h2::before { content: "##\\00a0\\00a0"; color: var(--muted-text-color); } + .note-detail-editable-text h2::before { content: "##\\2004"; color: var(--muted-text-color); } .note-detail-editable-text h3 { font-size: 1.6em; } - .note-detail-editable-text h3::before { content: "###\\00a0\\00a0"; color: var(--muted-text-color); } + .note-detail-editable-text h3::before { content: "###\\2004"; color: var(--muted-text-color); } .note-detail-editable-text h4 { font-size: 1.4em; } - .note-detail-editable-text h4::before { content: "####\\00a0\\00a0"; color: var(--muted-text-color); } + .note-detail-editable-text h4:not(.include-note-title)::before { content: "####\\2004"; color: var(--muted-text-color); } .note-detail-editable-text h5 { font-size: 1.2em; } - .note-detail-editable-text h5::before { content: "#####\\00a0\\00a0"; color: var(--muted-text-color); } + .note-detail-editable-text h5::before { content: "#####\\2004"; color: var(--muted-text-color); } .note-detail-editable-text h6 { font-size: 1.1em; } - .note-detail-editable-text h6::before { content: "######\\00a0\\00a0"; color: var(--muted-text-color); } + .note-detail-editable-text h6::before { content: "######\\2004"; color: var(--muted-text-color); } .note-detail-editable-text { font-family: var(--detail-text-font-family); diff --git a/src/public/app/widgets/type_widgets/read_only_text.js b/src/public/app/widgets/type_widgets/read_only_text.js index aecc83267..c16715ea7 100644 --- a/src/public/app/widgets/type_widgets/read_only_text.js +++ b/src/public/app/widgets/type_widgets/read_only_text.js @@ -14,13 +14,24 @@ const TPL = ` .note-detail-readonly-text h5 { font-size: 1.2em; } .note-detail-readonly-text h6 { font-size: 1.1em; } + .note-detail-readonly-text h2 { font-size: 1.8em; } + .note-detail-readonly-text h2::before { content: "##\\2004"; color: var(--muted-text-color); } + .note-detail-readonly-text h3 { font-size: 1.6em; } + .note-detail-readonly-text h3::before { content: "###\\2004"; color: var(--muted-text-color); } + .note-detail-readonly-text h4 { font-size: 1.4em; } + .note-detail-readonly-text h4:not(.include-note-title)::before { content: "####\\2004"; color: var(--muted-text-color); } + .note-detail-readonly-text h5 { font-size: 1.2em; } + .note-detail-readonly-text h5::before { content: "#####\\2004"; color: var(--muted-text-color); } + .note-detail-readonly-text h6 { font-size: 1.1em; } + .note-detail-readonly-text h6::before { content: "######\\2004"; color: var(--muted-text-color); } + .note-detail-readonly-text { padding: 10px; font-family: var(--detail-text-font-family); position: relative; } - .note-detail-readonly-text p:first-child, .note-detail-editable-text::before { + .note-detail-readonly-text p:first-child, .note-detail-readonly-text::before { margin-top: 0; }