/* ========================================= Special Views for Todos and Notes ========================================= */ /* --- Layout Wrapper (injected by JS) --- */ .special-view-wrapper { display: flex; flex-direction: row; width: 100%; min-height: calc(100vh - 60px); /* Adjust for header */ } /* --- TODO VIEW --- */ body.view-todo .content-container { max-width: 100%; padding: 0; margin: 0; } body.view-todo #linklist { display: none; /* Hide default list when wrapper is active */ } /* Sidebar */ .todo-sidebar { width: 280px; background-color: var(--bg-sidebar); border-right: 1px solid var(--border); padding: 1rem; display: flex; flex-direction: column; flex-shrink: 0; } [data-theme="dark"] .todo-sidebar { background-color: #1e293b; border-color: #334155; } .create-task-btn { width: 100%; padding: 0.75rem 1rem; background-color: var(--primary-color, #2563eb); color: white; border: none; border-radius: 2rem; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 0.5rem; cursor: pointer; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); transition: transform 0.2s, background-color 0.2s; margin-bottom: 1.5rem; } .create-task-btn:hover { background-color: var(--primary-dark, #1d4ed8); transform: translateY(-1px); } .todo-list-item { padding: 0.75rem 1rem; margin-bottom: 0.25rem; border-radius: 0.5rem; cursor: pointer; color: var(--text-color, #334155); display: flex; align-items: center; gap: 0.75rem; transition: background-color 0.2s; } [data-theme="dark"] .todo-list-item { color: #cbd5e1; } .todo-list-item:hover { background-color: rgba(0, 0, 0, 0.05); } [data-theme="dark"] .todo-list-item:hover { background-color: rgba(255, 255, 255, 0.05); } .todo-list-item.active { background-color: rgba(37, 99, 235, 0.1); color: var(--primary-color, #2563eb); font-weight: 600; } /* Main Task Area */ .todo-main { flex: 1; padding: 2rem; overflow-y: auto; background-color: var(--bg-body); } [data-theme="dark"] .todo-main { background-color: #0f172a; } .todo-main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; } .todo-main-header h2 { font-size: 1.5rem; font-weight: 600; margin: 0; } /* Todo Item */ .todo-item { padding: 1rem; border-bottom: 1px solid var(--border-color, #e2e8f0); display: flex; align-items: center; /* keep aligned */ gap: 1rem; transition: background-color 0.2s; } [data-theme="dark"] .todo-item { border-bottom-color: #334155; } .todo-item:hover { background-color: rgba(0, 0, 0, 0.02); } .todo-checkbox { width: 20px; height: 20px; border: 2px solid var(--text-light, #94a3b8); border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .todo-checkbox.checked { background-color: var(--primary-color, #2563eb); border-color: var(--primary-color, #2563eb); color: white; } .todo-content { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; } .todo-title { font-size: 1rem; color: var(--text-color, #0f172a); font-weight: 400; } [data-theme="dark"] .todo-title { color: #f1f5f9; } .todo-item.completed .todo-title { text-decoration: line-through; color: var(--text-light, #94a3b8); } .todo-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--text-light, #64748b); } .todo-badge { padding: 0.125rem 0.5rem; border-radius: 1rem; background-color: rgba(0, 0, 0, 0.05); font-size: 0.7rem; } [data-theme="dark"] .todo-badge { background-color: rgba(255, 255, 255, 0.1); } .due-date { display: flex; align-items: center; gap: 0.25rem; } .due-date.overdue { color: var(--danger-color, #ef4444); } /* --- NOTES VIEW --- */ /* Wrapper */ body.view-notes .content-container { padding: 2rem; background-color: var(--bg-body); min-height: 100vh; } [data-theme="dark"] body.view-notes .content-container { background-color: var(--bg-body); } /* Tool Bar / Input Area */ .notes-top-bar { display: flex; justify-content: center; align-items: flex-start; margin-bottom: 2rem; position: relative; padding-right: 60px; /* Space for toggle */ } .note-input-container { width: 600px; max-width: 100%; background-color: var(--background-secondary, #ffffff); border-radius: 8px; box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15); transition: box-shadow 0.2s; overflow: hidden; } [data-theme="dark"] .note-input-container { background-color: var(--bg-sidebar); border: 1px solid var(--border); box-shadow: none; } .note-input-collapsed { display: flex; align-items: center; padding: 12px 16px; cursor: text; color: var(--text-light, #80868b); font-weight: 500; font-size: 1rem; } .note-input-placeholder { flex: 1; } .note-input-actions { display: flex; gap: 16px; } .note-input-actions button { background: none; border: none; cursor: pointer; color: var(--text-light, #80868b); padding: 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s, color 0.2s; } .note-input-actions button:hover { background-color: rgba(136, 136, 136, 0.1); color: var(--text-color); } /* Tools (View Toggle) */ .notes-tools { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: flex; gap: 0.5rem; } .icon-btn { background: none; border: none; cursor: pointer; color: var(--text-light, #5f6368); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s; } .icon-btn:hover { background-color: rgba(136, 136, 136, 0.1); } .icon-btn.active { color: var(--primary-color, #202124); /* or specific active color */ background-color: rgba(136, 136, 136, 0.1); /* Keep highlight style */ } [data-theme="dark"] .icon-btn { color: #9aa0a6; } [data-theme="dark"] .icon-btn.active { color: #e8eaed; } /* --- LOGIC: Masonry vs List --- */ /* Masonry Grid */ .notes-masonry { column-count: 4; column-gap: 16px; width: 100%; } @media (max-width: 1200px) { .notes-masonry { column-count: 3; } } @media (max-width: 800px) { .notes-masonry { column-count: 2; } } @media (max-width: 500px) { .notes-masonry { column-count: 1; } } /* List View */ .notes-list-view { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 600px; max-width: 100%; margin: 0 auto; } .notes-list-view .note-card { width: 100%; } .note-modal-overlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, 0.55); z-index: 1000; } .note-modal-overlay.open { display: flex; } .note-modal { width: min(720px, 92vw); max-height: 86vh; overflow: hidden; border-radius: 12px; background: var(--background-secondary, #ffffff); border: 1px solid rgba(0, 0, 0, 0.12); color: inherit; display: flex; flex-direction: column; } [data-theme="dark"] .note-modal { background: #202124; border-color: rgba(255, 255, 255, 0.12); } .note-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 10px; flex-shrink: 0; } .note-modal .note-title { font-size: 1.6rem; line-height: 1.35; margin: 0; color: inherit; font-weight: 500; } .note-modal-content { flex: 1; overflow-y: auto; padding: 0 20px 18px; } .note-modal .note-body { font-size: 1rem; line-height: 1.75; display: block; -webkit-line-clamp: initial; line-clamp: initial; -webkit-box-orient: initial; max-height: none; overflow: visible; color: inherit; } .note-modal .note-body * { color: inherit; } .note-modal-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 20px 12px; border-top: 1px solid rgba(0, 0, 0, 0.12); flex-shrink: 0; } [data-theme="dark"] .note-modal-tags { border-top-color: rgba(255, 255, 255, 0.12); } .note-modal-tags.is-empty { display: none; } .note-modal-tags .note-tag { background: rgba(0, 0, 0, 0.06); border: 1px solid rgba(0, 0, 0, 0.14); color: inherit; border-radius: 999px; padding: 4px 10px; font-size: 0.72rem; letter-spacing: 0.02em; } [data-theme="dark"] .note-modal-tags .note-tag { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.22); } .note-modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-top: 1px solid rgba(0, 0, 0, 0.12); background: rgba(0, 0, 0, 0.03); flex-shrink: 0; } [data-theme="dark"] .note-modal-actions { border-top-color: rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.06); } .note-modal-actions-left { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; } .note-modal-actions-left > button, .note-modal-actions-left > a, .note-modal-actions-left > .note-modal-color-picker > button { background: transparent; border: none; color: inherit; opacity: 0.9; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; } .note-modal-actions-left > button:hover, .note-modal-actions-left > a:hover, .note-modal-actions-left > .note-modal-color-picker > button:hover { opacity: 1; background: rgba(0, 0, 0, 0.08); } [data-theme="dark"] .note-modal-actions-left > button:hover, [data-theme="dark"] .note-modal-actions-left > a:hover, [data-theme="dark"] .note-modal-actions-left > .note-modal-color-picker > button:hover { background: rgba(255, 255, 255, 0.14); } .note-modal-close-btn { background: transparent; border: none; color: inherit; font-weight: 600; border-radius: 8px; padding: 6px 10px; cursor: pointer; } .note-modal-close-btn:hover { background: rgba(0, 0, 0, 0.08); } [data-theme="dark"] .note-modal-close-btn:hover { background: rgba(255, 255, 255, 0.14); } .note-modal-pin-toggle { background: transparent; border: none; color: inherit; opacity: 0.85; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; } .note-modal-pin-toggle:hover, .note-modal-pin-toggle.active { opacity: 1; background-color: rgba(0, 0, 0, 0.08); } [data-theme="dark"] .note-modal-pin-toggle:hover, [data-theme="dark"] .note-modal-pin-toggle.active { background-color: rgba(255, 255, 255, 0.14); } /* --- CARD STYLING --- */ .note-card { background-color: var(--background-secondary, #ffffff); border: 1px solid #e0e0e0; border-radius: 8px; margin-bottom: 16px; /* spacing for masonry */ break-inside: avoid; /* Prevent split */ position: relative; transition: box-shadow 0.2s, transform 0.2s, background-color 0.2s; overflow: visible; /* allow palette popup to escape card bounds */ color: var(--note-card-fg, #202124); } /* Dark Mode Card */ [data-theme="dark"] .note-card { background-color: #202124; border: 1px solid #5f6368; color: #e8eaed; } .note-card:hover { box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15); } [data-theme="dark"] .note-card:hover { background-color: #202124; /* Keep lightens on hover? usually same but controls appear */ } /* Cover Image */ .note-cover img { width: 100%; height: auto; display: block; object-fit: cover; } .note-cover { overflow: hidden; border-radius: 8px 8px 0 0; } /* Inner Content */ .note-inner { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; } /* Title */ .note-title { font-size: 1rem; font-weight: 500; margin: 0; line-height: 1.5rem; color: var(--text-color, #202124); } [data-theme="dark"] .note-title { color: #e8eaed; } /* Body (Truncated) */ .note-body { font-size: 0.875rem; line-height: 1.25rem; color: var(--text-color, #202124); word-wrap: break-word; /* Limit to ~12 lines */ display: -webkit-box; -webkit-line-clamp: 12; line-clamp: 12; -webkit-box-orient: vertical; overflow: hidden; max-height: 300px; /* Fallback */ } [data-theme="dark"] .note-body { color: #e8eaed; } /* Tags */ .note-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; } .note-tag { background: rgba(0, 0, 0, 0.06); padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; color: var(--text-light); } [data-theme="dark"] .note-tag { background: rgba(255, 255, 255, 0.1); } /* Hover Actions */ .note-hover-actions { display: flex; align-items: center; gap: 0px; /* evenly spaced */ margin-top: 8px; margin-left: -8px; /* Alignment fix */ opacity: 0; /* Hidden by default */ transition: opacity 0.2s; position: relative; /* For palette popup */ z-index: 2; } /* Show actions on hover */ .note-card:hover .note-hover-actions { opacity: 1; } /* Always show actions on touch devices? (Can't detect easily here, but opacity 1 is safer for UX if no hover) */ @media (hover: none) { .note-hover-actions { opacity: 1; } } .note-hover-actions > button, .note-hover-actions > a, .note-hover-actions > div > button { background: none; border: none; width: 34px; /* Touch target */ height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-light, #5f6368); cursor: pointer; font-size: 1.1rem; transition: background-color 0.2s, color 0.2s; text-decoration: none; } [data-theme="dark"] .note-hover-actions > button, [data-theme="dark"] .note-hover-actions > a, [data-theme="dark"] .note-hover-actions > div > button { color: #9aa0a6; } .note-hover-actions > button:hover, .note-hover-actions > a:hover, .note-hover-actions > div > button:hover { background-color: rgba(136, 136, 136, 0.2); color: var(--text-color); } [data-theme="dark"] .note-hover-actions > button:hover, [data-theme="dark"] .note-hover-actions > a:hover, [data-theme="dark"] .note-hover-actions > div > button:hover { color: #e8eaed; } .bookmark-palette { display: inline-flex; align-items: center; position: relative; } .bookmark-palette > button { background: none; border: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-light, #5f6368); cursor: pointer; font-size: 1.1rem; transition: background-color 0.2s, color 0.2s; } [data-theme="dark"] .bookmark-palette > button { color: #9aa0a6; } .palette-popup { display: none; position: absolute; left: 0; bottom: calc(100% + 8px); background: var(--background-secondary, #ffffff); border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 12px; padding: 10px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); z-index: 50; width: max-content; max-width: min(340px, calc(100vw - 32px)); } [data-theme="dark"] .palette-popup { background: #202124; border-color: rgba(255, 255, 255, 0.16); } .palette-popup.open { display: block; } .palette-row { display: flex; flex-wrap: wrap; gap: 8px; } .palette-row + .palette-row { margin-top: 10px; } .palette-btn { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.18); cursor: pointer; padding: 0; background-position: center bottom; background-size: cover; } [data-theme="dark"] .palette-btn { border-color: rgba(255, 255, 255, 0.22); } .palette-btn.is-active { outline: 2px solid var(--primary-color, #2563eb); outline-offset: 2px; } .palette-btn-bg-none { display: flex; align-items: center; justify-content: center; } .note-modal-color-picker { position: relative; } .palette-popup.note-modal-palette { bottom: auto; top: calc(100% + 8px); } .spacer { flex: 1; } /* Pushes action buttons to left/right if needed, currently all left? Keep aligns left mostly. */ .note-body img { max-width: 100%; height: auto; border-radius: 4px; margin-top: 4px; /* If we extracted cover, hide first img? */ } /* --- COLORS --- */ /* Reference: Keep Colors */ /* Default */ .note-card.note-color-default { background-color: #20293a; border-color: transparent; --note-card-fg: #dbe7ff; } [data-theme="dark"] .note-card.note-color-default { background-color: #20293a; border-color: transparent; --note-card-fg: #dbe7ff; } /* Red */ .note-card.note-color-red { background-color: #f28b82; border-color: transparent; --note-card-fg: #2f1714; } [data-theme="dark"] .note-card.note-color-red { background-color: #f28b82; border-color: transparent; --note-card-fg: #2f1714; } /* Orange */ .note-card.note-color-orange { background-color: #fbbc04; border-color: transparent; --note-card-fg: #3d2a00; } [data-theme="dark"] .note-card.note-color-orange { background-color: #fbbc04; border-color: transparent; --note-card-fg: #3d2a00; } /* Yellow */ .note-card.note-color-yellow { background-color: #fff475; border-color: transparent; --note-card-fg: #383100; } [data-theme="dark"] .note-card.note-color-yellow { background-color: #fff475; border-color: transparent; --note-card-fg: #383100; } /* Green */ .note-card.note-color-green { background-color: #ccff90; border-color: transparent; --note-card-fg: #203400; } [data-theme="dark"] .note-card.note-color-green { background-color: #ccff90; border-color: transparent; --note-card-fg: #203400; } /* Teal */ .note-card.note-color-teal { background-color: #a7ffeb; border-color: transparent; --note-card-fg: #08342d; } [data-theme="dark"] .note-card.note-color-teal { background-color: #a7ffeb; border-color: transparent; --note-card-fg: #08342d; } /* Blue */ .note-card.note-color-blue { background-color: #cbf0f8; border-color: transparent; --note-card-fg: #113541; } [data-theme="dark"] .note-card.note-color-blue { background-color: #cbf0f8; border-color: transparent; --note-card-fg: #113541; } /* Dark Blue */ .note-card.note-color-darkblue { background-color: #aecbfa; border-color: transparent; --note-card-fg: #102645; } [data-theme="dark"] .note-card.note-color-darkblue { background-color: #aecbfa; border-color: transparent; --note-card-fg: #102645; } /* Purple */ .note-card.note-color-purple { background-color: #d7aefb; border-color: transparent; --note-card-fg: #2f1845; } [data-theme="dark"] .note-card.note-color-purple { background-color: #d7aefb; border-color: transparent; --note-card-fg: #2f1845; } /* Pink */ .note-card.note-color-pink { background-color: #fdcfe8; border-color: transparent; --note-card-fg: #4a1d34; } [data-theme="dark"] .note-card.note-color-pink { background-color: #fdcfe8; border-color: transparent; --note-card-fg: #4a1d34; } /* Brown */ .note-card.note-color-brown { background-color: #e6c9a8; border-color: transparent; --note-card-fg: #3c2714; } [data-theme="dark"] .note-card.note-color-brown { background-color: #e6c9a8; border-color: transparent; --note-card-fg: #3c2714; } /* Grey */ .note-card.note-color-grey { background-color: #e8eaed; border-color: transparent; --note-card-fg: #2a2d31; } .note-card.note-has-bg, .note-modal.note-has-bg, .link-outer.note-has-bg { background-image: linear-gradient(rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.16)), var(--note-bg-image); background-size: cover; background-position: center bottom; } .note-card .note-title, .note-card .note-body, .note-card .note-tag, .note-card .note-hover-actions button, .note-card .note-hover-actions a { color: inherit; } .note-card[class*="note-color-"] { color: var(--note-card-fg, #202124); } /* --- NOTES: Vue Masonry/Grid (multi-colonnes, largeur variable) --- */ .notes-masonry .note-card.note-has-bg { /* Les cartes masonry ont des largeurs variables selon les breakpoints: - >1200px: ~25% (4 colonnes) - 800-1200px: ~33% (3 colonnes) - 500-800px: ~50% (2 colonnes) - <500px: 100% (1 colonne) On utilise 'cover' avec un focus sur le centre pour garder l'essentiel visible */ background-size: cover; background-position: center bottom; /* Pour les petites cartes en masonry, on s'assure que l'image couvre bien */ min-height: 120px; } /* --- NOTES: Vue Liste (600px max, centré) --- */ .notes-list-view .note-card.note-has-bg { /* Vue liste: largeur fixe de 600px, cards plus larges qu'en masonry On peut utiliser cover mais avec une position légèrement ajustée */ background-size: cover; background-position: center bottom; /* Les cards en liste sont souvent plus hautes, on adapte */ min-height: 100px; } /* --- NOTES: Modal (min(720px, 92vw)) --- */ .note-modal.note-has-bg { /* Modal plus large (jusqu'à 720px), on privilégie une couverture complète avec une légère obscurcissement pour la lisibilité du texte */ background-size: cover; background-position: center bottom; /* L'overlay gradient est déjà présent dans la règle de base */ } /* --- BOOKMARKS: Vue Grid (minmax(320px, 1fr)) --- */ .view-grid .link-outer.note-has-bg { /* Grid bookmarks: cards de minimum 320px, layout en grille Les cards sont généralement carrées ou rectangulaires selon le contenu */ background-size: cover; background-position: center bottom; /* S'assurer que le background couvre bien la card avec le padding existant */ background-origin: padding-box; } /* --- BOOKMARKS: Vue Liste (1 colonne, thumbnail latéral) --- */ .view-list .link-outer.note-has-bg { /* List view: cards en pleine largeur avec layout flex et thumbnail de 300px On ajuste pour que le background couvre toute la hauteur malgré le thumbnail */ background-size: cover; background-position: center bottom; /* Le thumbnail a son propre mask gradient, on s'assure que le background couvre bien toute la card derrière le contenu */ background-origin: padding-box; } /* --- BOOKMARKS: Vue Compact (liste dense, pas de thumbnail) --- */ .view-compact .link-outer.note-has-bg { /* Compact view: cards très compactes sans thumbnail, hauteur réduite (~60px) On utilise contain ou une taille spécifique pour éviter que l'image soit trop étirée sur une si petite hauteur */ background-size: 200% auto; background-position: center bottom; /* Réduire l'opacité du gradient pour plus de visibilité sur petites cards */ background-image: linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08)), var(--note-bg-image); } /* Responsive: sur petits écrans, ajuster les backgrounds */ @media (max-width: 768px) { /* En mobile, les cards sont plus étroites, on ajuste */ .notes-masonry .note-card.note-has-bg, .view-grid .link-outer.note-has-bg { background-size: cover; background-position: center bottom; } /* Vue liste en mobile: thumbnail passe en haut */ .view-list .link-outer.note-has-bg { background-size: cover; background-position: center bottom; } }