aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/style.css
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/style.css')
-rw-r--r--frontend/src/style.css137
1 files changed, 136 insertions, 1 deletions
diff --git a/frontend/src/style.css b/frontend/src/style.css
index 8e1d095..50836d8 100644
--- a/frontend/src/style.css
+++ b/frontend/src/style.css
@@ -161,6 +161,141 @@ h1 {
white-space: pre-wrap;
}
+.note-media {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(45%, 1fr));
+ grid-auto-rows: 200px;
+ gap: 0.5rem;
+ margin-top: 0.5rem;
+}
+
+.note-media:has(> :only-child) {
+ grid-auto-rows: auto;
+ justify-content: start;
+}
+
+.note-media:has(> :only-child) img {
+ width: auto;
+ max-width: 100%;
+ height: auto;
+ max-height: 400px;
+ object-fit: contain;
+}
+
+.note-media img,
+.note-media-error {
+ width: 100%;
+ height: 100%;
+ box-sizing: border-box;
+ overflow: hidden;
+ border-radius: 8px;
+}
+
+.note-media img {
+ object-fit: cover;
+}
+
+.note-media img.has-alt {
+ border: 2px solid var(--accent);
+}
+
+.note-media img.no-alt {
+ border: 2px solid var(--error);
+}
+
+.note-media-error {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ gap: 0.25rem;
+ padding: 1rem;
+ background: var(--bg-secondary);
+ border: 2px solid var(--error);
+ text-align: center;
+ font-size: 0.85rem;
+}
+
+.note-media-error img {
+ width: 48px;
+ height: 48px;
+ border: none !important;
+ object-fit: contain;
+ height: auto;
+ max-height: unset;
+ grid-auto-rows: unset;
+}
+
+#lightbox {
+ position: fixed;
+ inset: 0;
+ background: rgba(0, 0, 0, 0.85);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ z-index: 1000;
+ flex-direction: column;
+ gap: 1rem;
+ padding: 2rem;
+}
+
+#lightbox-img {
+ max-width: 90vw;
+ max-height: 80vh;
+ object-fit: contain;
+ border-radius: 8px;
+ border: none !important;
+}
+
+#lightbox-alt {
+ color: white;
+ background: rgba(0, 0, 0, 0.6);
+ padding: 0.5rem 1rem;
+ border-radius: 8px;
+ max-width: 60ch;
+ text-align: center;
+ font-size: 0.9rem;
+}
+
+#lightbox-prev,
+#lightbox-next {
+ position: fixed;
+ top: 50%;
+ transform: translateY(-50%);
+ background: rgba(0, 0, 0, 0.5);
+ color: white;
+ border: none;
+ font-size: 2rem;
+ padding: 0.5rem 1rem;
+ cursor: pointer;
+ border-radius: 4px;
+}
+
+#lightbox-prev { left: 1rem; }
+#lightbox-next { right: 1rem; }
+
+#lightbox-prev:hover,
+#lightbox-next:hover {
+ background: rgba(0, 0, 0, 0.8);
+}
+
+#lightbox-close {
+ position: fixed;
+ top: 1rem;
+ right: 1rem;
+ background: rgba(0, 0, 0, 0.5);
+ color: white;
+ border: none;
+ font-size: 1.5rem;
+ width: 2rem;
+ height: 2rem;
+ cursor: pointer;
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
.muted {
color: var(--text-muted);
font-size: 12px;
@@ -173,7 +308,7 @@ h1 {
}
.spinner {
- border: 8px solid #f3f3f3;
+ border: 8px solid var(--border);
border-top: 8px solid var(--accent);
border-radius: 50%;
width: 64px;