Skip to content

Build your personal knowledge base with Trilium Notes

feat(note_list): improve file footer

Elian Doranfa60295ab25a
diff --git a/src/public/app/services/content_renderer.ts b/src/public/app/services/content_renderer.ts
index 7064829fc8..ec81ef3bca 100644
--- a/src/public/app/services/content_renderer.ts
+++ b/src/public/app/services/content_renderer.ts
@@ -203,7 +203,7 @@ function renderFile(entity: FNote | FAttachment, type: string, $renderedContent:
// open doesn't work for protected notes since it works through a browser which isn't in protected session
$openButton.toggle(!entity.isProtected);
- $content.append($('<div style="display: flex; justify-content: space-evenly; margin-top: 5px;">').append($downloadButton).append($openButton));
+ $content.append($('<footer class="file-footer">').append($downloadButton).append($openButton));
}
$renderedContent.append($content);
@@ -239,7 +239,7 @@ async function renderMermaid(note: FNote | FAttachment, $renderedContent: JQuery
* @param {FNote} note
* @returns {Promise<void>}
*/
-async function renderChildrenList($renderedContent: JQuery<HTMLElement>, note: FNote) {
+async function renderChildrenList($renderedContent: JQuery<HTMLElement>, note: FNote) {
let childNoteIds = note.getChildNoteIds();
if (!childNoteIds.length) {
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css
index 7d6a6501c3..e4e54b0f12 100644
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@ -1684,4 +1684,15 @@ body.zen .note-title-widget,
body.zen .note-title-widget input {
font-size: 1rem !important;
background: transparent !important;
+}
+
+/* Content renderer */
+
+footer.file-footer {
+ display: flex;
+ justify-content: center;
+}
+
+footer.file-footer button {
+ margin: 5px;
}
\ No newline at end of file
diff --git a/src/public/stylesheets/theme-next/shell.css b/src/public/stylesheets/theme-next/shell.css
index 377a3f484c..8caae26859 100644
--- a/src/public/stylesheets/theme-next/shell.css
+++ b/src/public/stylesheets/theme-next/shell.css
@@ -1560,6 +1560,10 @@ div.bookmark-folder-widget .note-link .bx {
border-bottom-color: var(--card-border-color);
}
+.note-list-wrapper .note-book-card footer.file-footer {
+ border: 1px solid var(--card-border-color);
+}
+
.note-list-wrapper .note-book-card .note-book-header .note-icon {
font-size: 17px;
vertical-align: text-bottom;