From a4a3d6a82c238c9d9a644ef5e6c163cd6f825220 Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Mon, 23 Feb 2026 09:08:54 +0200 Subject: [PATCH] ui/grid view card: restyle the button bar --- apps/client/src/services/content_renderer.ts | 2 +- .../collections/legacy/ListOrGridView.css | 41 ++++++++++++++++--- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/apps/client/src/services/content_renderer.ts b/apps/client/src/services/content_renderer.ts index aca5d3efe3..d5e6025fbd 100644 --- a/apps/client/src/services/content_renderer.ts +++ b/apps/client/src/services/content_renderer.ts @@ -189,7 +189,7 @@ function renderFile(entity: FNote | FAttachment, type: string, $renderedContent: throw new Error(`Can't recognize entity type of '${entity}'`); } - const $content = $('
'); + const $content = $('
'); if (type === "pdf") { const $pdfPreview = $(''); diff --git a/apps/client/src/widgets/collections/legacy/ListOrGridView.css b/apps/client/src/widgets/collections/legacy/ListOrGridView.css index c71ad07423..a239f87a17 100644 --- a/apps/client/src/widgets/collections/legacy/ListOrGridView.css +++ b/apps/client/src/widgets/collections/legacy/ListOrGridView.css @@ -290,13 +290,42 @@ } } - &.type-image .note-book-content img, - &.type-text .note-book-content img, - &.type-canvas .note-book-content img { - max-width: 100%; - max-height: 100%; -} + & .note-book-content { + &.type-image .note-book-content img, + &.type-text .note-book-content img, + &.type-canvas .note-book-content img { + max-width: 100%; + max-height: 100%; + } + .rendered-content { + height: 100%; + } + + .rendered-content:has(.file-footer) { + padding: 0; + } + + .file-footer { + display: flex; + gap: 8px; + justify-content: space-between; + padding: 0; + + .btn.btn-primary { + flex: 1; + margin: 0; + box-shadow: unset; + background: transparent; + border-radius: 0; + padding: 8px; + + &:hover { + background: var(--more-accented-background-color); + } + } + } + } } .note-list.grid-view .note-list-container {