- Manifest V3 with sidePanel, tabs, webNavigation, unlimitedStorage permissions - Background service worker: sidePanel setup + SPA navigation detection - Shared modules: URL key derivation (buildNoteKey) and IndexedDB storage - Side panel: per-tab markdown editor with debounced autosave, in-panel find - Cross-panel consistency via BroadcastChannel with focus-aware refresh - Notes-list page: day-grouped entries, click-to-focus/navigate behavior - Dark theme by default
169 lines
2.8 KiB
CSS
169 lines
2.8 KiB
CSS
/* Side Notes — Side Panel Styles (Dark Theme) */
|
|
|
|
:root {
|
|
--bg: #1e1e1e;
|
|
--bg-header: #252525;
|
|
--bg-find: #2a2a2a;
|
|
--text: #d4d4d4;
|
|
--text-muted: #888;
|
|
--border: #3c3c3c;
|
|
--accent: #569cd6;
|
|
--accent-dim: #3a6a9e;
|
|
--status-bg: #333;
|
|
--focus-ring: #569cd6;
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html, body {
|
|
height: 100%;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
font-size: 14px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ---- Header ---- */
|
|
#header {
|
|
padding: 8px 12px;
|
|
background: var(--bg-header);
|
|
border-bottom: 1px solid var(--border);
|
|
display: flex;
|
|
align-items: center;
|
|
min-height: 36px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
#page-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
min-width: 0;
|
|
flex: 1;
|
|
}
|
|
|
|
#favicon {
|
|
flex-shrink: 0;
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
|
|
#page-title {
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
font-size: 13px;
|
|
color: var(--text);
|
|
}
|
|
|
|
/* ---- Editor ---- */
|
|
#editor {
|
|
flex: 1;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
border: none;
|
|
padding: 12px;
|
|
font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
|
|
font-size: 13px;
|
|
line-height: 1.6;
|
|
resize: none;
|
|
outline: none;
|
|
tab-size: 2;
|
|
}
|
|
|
|
#editor::placeholder {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
#editor:focus {
|
|
box-shadow: inset 0 0 0 1px var(--focus-ring);
|
|
}
|
|
|
|
/* ---- Find Bar ---- */
|
|
#find-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 6px 8px;
|
|
background: var(--bg-find);
|
|
border-top: 1px solid var(--border);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
#find-bar[hidden] {
|
|
display: none;
|
|
}
|
|
|
|
#find-input {
|
|
flex: 1;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
padding: 4px 8px;
|
|
font-size: 13px;
|
|
outline: none;
|
|
}
|
|
|
|
#find-input:focus {
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
#find-count {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
min-width: 40px;
|
|
text-align: center;
|
|
}
|
|
|
|
#find-bar button {
|
|
background: none;
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
border-radius: 4px;
|
|
padding: 4px 8px;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
line-height: 1;
|
|
}
|
|
|
|
#find-bar button:hover {
|
|
background: var(--border);
|
|
}
|
|
|
|
#find-close {
|
|
font-size: 14px;
|
|
}
|
|
|
|
#open-list {
|
|
background: none;
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
border-radius: 4px;
|
|
padding: 2px 8px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
line-height: 1;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
#open-list:hover {
|
|
background: var(--border);
|
|
}
|
|
|
|
/* ---- Status bar ---- */
|
|
#status {
|
|
padding: 4px 12px;
|
|
font-size: 11px;
|
|
color: var(--text-muted);
|
|
background: var(--status-bg);
|
|
flex-shrink: 0;
|
|
min-height: 22px;
|
|
}
|