Files
snotes/static/app.css

305 lines
13 KiB
CSS

:root {
--radius: 10px;
--shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
--code-bg: #1e293b;
--code-fg: #e2e8f0;
}
/* ── Dark (default) ──────────────────────────────────── */
html, [data-theme="dark"] {
--bg: #1a1b1e; --surface: #26272b; --border: #3a3b40;
--text: #e4e4e7; --muted: #9ca3af;
--primary: #7dd3fc; --primary-bg: #0c4a6e; --primary-dark: #075985; --on-primary: #7dd3fc;
--danger: #f87171; --input-bg: #1a1b1e; --bg-hover: #2b2c31;
}
/* ── Light ───────────────────────────────────────────── */
[data-theme="light"] {
--bg: #f5f7fb; --surface: #ffffff; --border: #e4e8f0;
--text: #1b2430; --muted: #6b7688;
--primary: #3b82f6; --primary-bg: #3b82f6; --primary-dark: #2563eb; --on-primary: #ffffff;
--danger: #ef4444; --input-bg: #ffffff; --bg-hover: #f3f5f9;
}
/* ── Summer ──────────────────────────────────────────── */
[data-theme="summer"] {
--bg: #fff8f0; --surface: #fff0e0; --border: #ffd0a0;
--text: #4a3528; --muted: #9a8070;
--primary: #f08040; --primary-bg: #e06830; --primary-dark: #c05020; --on-primary: #fff8f0;
--danger: #c04030; --input-bg: #ffffff; --bg-hover: #ffe0c0;
}
/* ── Max Summer ───────────────────────────────────────── */
[data-theme="max-summer"] {
--bg: #fffdf5; --surface: #fff9e8; --border: #ffe082;
--text: #212121; --muted: #757575;
--primary: #e53935; --primary-bg: #d32f2f; --primary-dark: #b71c1c; --on-primary: #fffdf5;
--danger: #c62828; --input-bg: #fffefa; --bg-hover: #fff3c8;
}
/* ── Autumn ──────────────────────────────────────────── */
[data-theme="autumn"] {
--bg: #f4f1ec; --surface: #eae5de; --border: #d4c8bc;
--text: #3d3228; --muted: #8a7a6a;
--primary: #d59b6a; --primary-bg: #d59b6a; --primary-dark: #c0834a; --on-primary: #f4f1ec;
--danger: #c04040; --input-bg: #ffffff; --bg-hover: #e0d8ce;
}
/* ── Dracula ─────────────────────────────────────────── */
[data-theme="dracula"] {
--bg: #0c0c1e; --surface: #12122a; --border: #222;
--text: #eee; --muted: #aaa;
--primary: #7c6af7; --primary-bg: #4a3a9a; --primary-dark: #6a5aba; --on-primary: #eee;
--danger: #f87272; --input-bg: #1a1a3a; --bg-hover: #2a2a4e;
}
/* ── Nord ────────────────────────────────────────────── */
[data-theme="nord"] {
--bg: #2e3440; --surface: #3b4252; --border: #4c566a;
--text: #eceff4; --muted: #b0b9ca;
--primary: #88c0d0; --primary-bg: #5e81ac; --primary-dark: #81a1c1; --on-primary: #eceff4;
--danger: #bf616a; --input-bg: #3b4252; --bg-hover: #434c5e;
}
/* ── Tokyo Night ─────────────────────────────────────── */
[data-theme="tokyo-night"] {
--bg: #1a1b26; --surface: #1f2335; --border: #2f3549;
--text: #c0caf5; --muted: #787c99;
--primary: #7aa2f7; --primary-bg: #3d59a1; --primary-dark: #5470b8; --on-primary: #a9b1d6;
--danger: #f7768e; --input-bg: #1f2335; --bg-hover: #292e42;
}
/* ── Catppuccin ──────────────────────────────────────── */
[data-theme="catppuccin"] {
--bg: #1e1e2e; --surface: #26263a; --border: #313150;
--text: #cdd6f4; --muted: #9399b2;
--primary: #cba6f7; --primary-bg: #7350a0; --primary-dark: #8b6bc0; --on-primary: #cdd6f4;
--danger: #f38ba8; --input-bg: #26263a; --bg-hover: #313150;
}
/* ── One Dark ────────────────────────────────────────── */
[data-theme="one-dark"] {
--bg: #21252b; --surface: #282c34; --border: #333842;
--text: #dcdfe4; --muted: #9196a0;
--primary: #61afef; --primary-bg: #2b5780; --primary-dark: #3a6ea0; --on-primary: #61afef;
--danger: #e06c75; --input-bg: #282c34; --bg-hover: #333842;
}
/* ── Sunset ──────────────────────────────────────────── */
[data-theme="sunset"] {
--bg: #1c1018; --surface: #251420; --border: #352030;
--text: #fce7f3; --muted: #b090a0;
--primary: #f472b6; --primary-bg: #831843; --primary-dark: #9d174d; --on-primary: #f9a8d4;
--danger: #f87171; --input-bg: #251420; --bg-hover: #352030;
}
* { box-sizing: border-box; }
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background: var(--bg);
color: var(--text);
font-size: 15px;
line-height: 1.5;
transition: background 0.2s, color 0.2s;
}
.muted { color: var(--muted); }
.topbar {
display: flex;
align-items: center;
gap: 16px;
padding: 12px 20px;
background: var(--surface);
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 10;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.brand-logo { height: 28px; width: 28px; border-radius: 6px; object-fit: cover; }
.search {
flex: 1;
max-width: 520px;
padding: 9px 14px;
border: 1px solid var(--border);
border-radius: 8px;
font-size: 14px;
background: var(--input-bg);
color: var(--text);
}
.search:focus { outline: 2px solid var(--primary); background: var(--input-bg); }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.user-select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--input-bg); color: var(--text); }
.btn {
padding: 8px 14px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface);
color: var(--text);
cursor: pointer;
font-size: 14px;
font-weight: 500;
}
.btn:hover { background: var(--bg-hover); }
.btn.primary { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.layout {
display: grid;
grid-template-columns: 1fr 300px;
gap: 20px;
max-width: 1080px;
margin: 20px auto;
padding: 0 20px;
}
.col-main h2 { margin-top: 0; font-size: 20px; }
.col-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; height: fit-content; }
.col-side h3 { margin-top: 0; }
.note-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.note-item {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 12px 16px;
cursor: pointer;
box-shadow: var(--shadow);
}
.note-item:hover { border-color: var(--primary); }
.note-title { font-weight: 600; }
.note-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.note-tags { color: var(--primary); font-size: 12px; margin-top: 4px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
background: color-mix(in srgb, var(--primary) 12%, transparent);
color: var(--primary);
border: none;
border-radius: 16px;
padding: 4px 12px;
font-size: 13px;
cursor: pointer;
}
.tag-chip:hover { background: color-mix(in srgb, var(--primary) 22%, transparent); }
.editor-wrap { max-width: 900px; margin: 20px auto; padding: 0 20px; }
.editor-topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.spacer { flex: 1; }
.toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0; }
.tool-btn { padding: 6px 10px; border: none; background: transparent; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text); }
.tool-btn:hover { background: var(--bg-hover); }
.sep { width: 1px; background: var(--border); margin: 4px 6px; }
.editor {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 0 0 var(--radius) var(--radius);
padding: 16px 20px;
min-height: 60vh;
}
.editor .ProseMirror { min-height: 55vh; outline: none; }
.editor h1, .editor h2, .editor h3 { margin: 0.5em 0 0.25em; }
.editor p { margin: 0.4em 0; }
.editor pre { background: var(--code-bg); color: var(--code-fg); padding: 12px; border-radius: 8px; overflow-x: auto; }
.editor code { background: color-mix(in srgb, var(--border) 55%, transparent); padding: 1px 4px; border-radius: 4px; font-size: 0.9em; }
.editor pre code { background: none; padding: 0; }
.editor blockquote { border-left: 3px solid var(--primary); margin: 0.5em 0; padding-left: 12px; color: var(--muted); }
.editor a { color: var(--primary); text-decoration: underline; cursor: pointer; }
.status { margin-top: 10px; color: var(--muted); font-size: 13px; min-height: 20px; }
.login-card {
display: flex;
flex-direction: column;
gap: 12px;
max-width: 340px;
margin: 10vh auto;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 28px;
box-shadow: var(--shadow);
text-align: center;
}
.login-logo { width: 56px; height: 56px; border-radius: 12px; margin: 0 auto; object-fit: cover; }
.login-card input { padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--input-bg); color: var(--text); }
.error { color: var(--danger); font-size: 13px; min-height: 18px; }
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 20px; width: 90%; max-width: 520px; max-height: 80vh; overflow-y: auto; }
.history-list { list-style: none; padding: 0; margin: 0 0 16px; }
.history-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
/* ── Theme selector ──────────────────────────────────── */
.theme-selector { position: relative; }
.theme-btn {
display: flex; align-items: center; gap: 6px;
padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px;
background: var(--surface); color: var(--text);
font-size: 13px; font-family: inherit; cursor: pointer;
transition: background 0.15s;
}
.theme-btn:hover { background: var(--bg-hover); }
.theme-label { color: var(--muted); }
.chevron { font-size: 9px; color: var(--muted); }
.theme-popover {
position: absolute; top: calc(100% + 6px); right: 0;
background: var(--surface); border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
padding: 10px; min-width: 200px; z-index: 60;
}
.theme-pop-header {
font-size: 11px; color: var(--muted);
text-transform: uppercase; letter-spacing: 0.6px;
margin-bottom: 8px; padding: 0 4px;
}
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.theme-option {
display: flex; align-items: center; gap: 8px;
padding: 7px 8px; border: 1px solid transparent; border-radius: 6px;
background: var(--bg); cursor: pointer; font-family: inherit;
font-size: 13px; color: var(--text);
transition: background 0.12s, border-color 0.12s;
}
.theme-option:hover { border-color: var(--border); }
.theme-option.active { border-color: var(--primary); }
.theme-swatch { display: flex; gap: 2px; flex-shrink: 0; }
.theme-dot { width: 10px; height: 10px; border-radius: 2px; }
.mode-row {
display: flex; gap: 4px; margin-bottom: 8px;
background: var(--bg); padding: 3px; border-radius: 8px;
border: 1px solid var(--border);
}
.mode-btn {
flex: 1; padding: 5px 0; border: none; border-radius: 6px;
background: transparent; color: var(--muted);
font-family: inherit; font-size: 12px; cursor: pointer;
transition: background 0.12s, color 0.12s;
}
.mode-btn.active { background: var(--primary-bg); color: var(--on-primary); font-weight: 600; }
.auto-panel { display: flex; flex-direction: column; gap: 6px; }
.auto-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.auto-panel select {
width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px;
background: var(--input-bg); color: var(--text); font-family: inherit; font-size: 13px;
}
.hidden { display: none !important; }
@media (max-width: 720px) {
.layout { grid-template-columns: 1fr; }
.topbar { flex-wrap: wrap; }
.search { max-width: none; order: 3; flex-basis: 100%; }
.theme-popover { right: -60px; }
}