include note styling changes

This commit is contained in:
zadam 2020-04-13 10:13:03 +02:00
parent 339f212e4c
commit 87510fd72b
2 changed files with 22 additions and 14 deletions

View File

@ -27,13 +27,21 @@ export default class AbstractTextTypeWidget extends TypeWidget {
const note = await treeCache.getNote(noteId);
if (note) {
$el.empty().append($("<h3>").append(await linkService.createNoteLink(note.noteId, {
const $link = await linkService.createNoteLink(note.noteId, {
showTooltip: false
})));
});
$el.empty().append(
$('<h4 class="include-note-title">')
.append($link)
);
const {renderedContent} = await noteContentRenderer.getRenderedContent(note);
$el.append(renderedContent);
$el.append(
$('<div class="include-note-content">')
.append(renderedContent)
);
}
}

View File

@ -744,7 +744,7 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href
.include-note {
margin-bottom: 10px;
padding: 20px;
padding: 10px;
border-radius: 10px;
background-color: var(--accented-background-color);
}
@ -753,6 +753,16 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href
content: '' !important;
}
.include-note.box-size-small .include-note-content {
max-height: 10em;
overflow: auto;
}
.include-note.box-size-medium .include-note-content {
max-height: 20em;
overflow: auto;
}
.alert-warning {
color: var(--main-text-color) !important;
background-color: var(--accented-background-color) !important;
@ -863,14 +873,4 @@ body {
.hidden-int, .hidden-ext {
display: none !important;
}
.include-note.box-size-small {
max-height: 12em;
overflow: auto;
}
.include-note.box-size-medium {
max-height: 25em;
overflow: auto;
}