aboutsummaryrefslogtreecommitdiffhomepage
path: root/static/note.css
diff options
context:
space:
mode:
authorwinter2025-01-28 20:34:49 +0000
committerwinter2025-01-28 20:34:49 +0000
commite591374bb4b7d231fadf99d2e278806e53971919 (patch)
tree146bc3eeca58fb298dc204341734f55680509c00 /static/note.css
parent09a42d23cd067dc5c2a7d4f03e8f074a9317f6c8 (diff)
display attachments on notes
Diffstat (limited to 'static/note.css')
-rw-r--r--static/note.css63
1 files changed, 63 insertions, 0 deletions
diff --git a/static/note.css b/static/note.css
index 9b9eb65..0400b21 100644
--- a/static/note.css
+++ b/static/note.css
@@ -128,6 +128,69 @@ article.note {
}
}
+ .attachments {
+ padding: var(--spacing-single) 0;
+ display: grid;
+ grid-template-columns: auto;
+ grid-template-rows: auto;
+ grid-auto-flow: row;
+ width: 100%;
+ box-sizing: border-box;
+ gap: var(--spacing-single);
+
+ &:has(:nth-child(2)) {
+ grid-template-columns: auto auto;
+ }
+ &:has(:nth-child(3)) {
+ grid-template-columns: auto auto auto;
+ }
+ &:has(:nth-child(4)) {
+ grid-template-columns: auto auto;
+ grid-template-rows: auto auto;
+ }
+ &:has(:nth-child(5)) {
+ grid-template-columns: unset;
+ grid-template-rows: auto;
+ grid-auto-flow: column;
+ }
+
+ > * {
+ border-radius: var(--border-radius);
+ overflow: hidden;
+ display: flex;
+ &:has(img) {
+ background: black;
+ }
+ }
+
+ img {
+ width: 100%;
+ max-height: 16lh;
+ object-fit: contain;
+ object-position: center;
+ }
+
+ a.file {
+ border: var(--border);
+ border-radius: var(--border-radius);
+ background: var(--clr-panel-background);
+ color: var(--clr-foreground);
+ text-decoration: none;
+ padding: var(--spacing-single);
+ display: grid;
+ width: 100%;
+ box-sizing: border-box;
+ grid-auto-flow: column;
+ align-items: center;
+ justify-content: start;
+ gap: var(--spacing-half);
+ span {
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
+ }
+ }
+
.buttons {
margin-top: var(--spacing-single);
padding: 0;