diff --git a/assets/snotes-favicon.png b/assets/snotes-favicon.png new file mode 100644 index 0000000..3162a0d Binary files /dev/null and b/assets/snotes-favicon.png differ diff --git a/assets/snotes-logo.png b/assets/snotes-logo.png new file mode 100644 index 0000000..93714ee Binary files /dev/null and b/assets/snotes-logo.png differ diff --git a/static/app.css b/static/app.css index 0d9066d..783acce 100644 --- a/static/app.css +++ b/static/app.css @@ -3,6 +3,7 @@ --shadow: 0 1px 3px rgba(16, 24, 40, 0.08); --code-bg: #1e293b; --code-fg: #e2e8f0; + --secondary: #8b5cf6; } /* ── Dark (default) ──────────────────────────────────── */ @@ -10,6 +11,7 @@ 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; + --secondary: #f59e0b; --danger: #f87171; --input-bg: #1a1b1e; --bg-hover: #2b2c31; } @@ -18,6 +20,7 @@ html, [data-theme="dark"] { --bg: #f5f7fb; --surface: #ffffff; --border: #e4e8f0; --text: #1b2430; --muted: #6b7688; --primary: #3b82f6; --primary-bg: #3b82f6; --primary-dark: #2563eb; --on-primary: #ffffff; + --secondary: #8b5cf6; --danger: #ef4444; --input-bg: #ffffff; --bg-hover: #f3f5f9; } @@ -26,6 +29,7 @@ html, [data-theme="dark"] { --bg: #fff8f0; --surface: #fff0e0; --border: #ffd0a0; --text: #4a3528; --muted: #9a8070; --primary: #f08040; --primary-bg: #e06830; --primary-dark: #c05020; --on-primary: #fff8f0; + --secondary: #14b8a6; --danger: #c04030; --input-bg: #ffffff; --bg-hover: #ffe0c0; } @@ -34,6 +38,7 @@ html, [data-theme="dark"] { --bg: #fffdf5; --surface: #fff9e8; --border: #ffe082; --text: #212121; --muted: #757575; --primary: #e53935; --primary-bg: #d32f2f; --primary-dark: #b71c1c; --on-primary: #fffdf5; + --secondary: #f59e0b; --danger: #c62828; --input-bg: #fffefa; --bg-hover: #fff3c8; } @@ -42,6 +47,7 @@ html, [data-theme="dark"] { --bg: #f4f1ec; --surface: #eae5de; --border: #d4c8bc; --text: #3d3228; --muted: #8a7a6a; --primary: #d59b6a; --primary-bg: #d59b6a; --primary-dark: #c0834a; --on-primary: #f4f1ec; + --secondary: #7a9e6e; --danger: #c04040; --input-bg: #ffffff; --bg-hover: #e0d8ce; } @@ -50,6 +56,7 @@ html, [data-theme="dark"] { --bg: #0c0c1e; --surface: #12122a; --border: #222; --text: #eee; --muted: #aaa; --primary: #7c6af7; --primary-bg: #4a3a9a; --primary-dark: #6a5aba; --on-primary: #eee; + --secondary: #ff79c6; --danger: #f87272; --input-bg: #1a1a3a; --bg-hover: #2a2a4e; } @@ -58,6 +65,7 @@ html, [data-theme="dark"] { --bg: #2e3440; --surface: #3b4252; --border: #4c566a; --text: #eceff4; --muted: #b0b9ca; --primary: #88c0d0; --primary-bg: #5e81ac; --primary-dark: #81a1c1; --on-primary: #eceff4; + --secondary: #d08770; --danger: #bf616a; --input-bg: #3b4252; --bg-hover: #434c5e; } @@ -66,6 +74,7 @@ html, [data-theme="dark"] { --bg: #1a1b26; --surface: #1f2335; --border: #2f3549; --text: #c0caf5; --muted: #787c99; --primary: #7aa2f7; --primary-bg: #3d59a1; --primary-dark: #5470b8; --on-primary: #a9b1d6; + --secondary: #e0af68; --danger: #f7768e; --input-bg: #1f2335; --bg-hover: #292e42; } @@ -74,6 +83,7 @@ html, [data-theme="dark"] { --bg: #1e1e2e; --surface: #26263a; --border: #313150; --text: #cdd6f4; --muted: #9399b2; --primary: #cba6f7; --primary-bg: #7350a0; --primary-dark: #8b6bc0; --on-primary: #cdd6f4; + --secondary: #94e2d5; --danger: #f38ba8; --input-bg: #26263a; --bg-hover: #313150; } @@ -82,6 +92,7 @@ html, [data-theme="dark"] { --bg: #21252b; --surface: #282c34; --border: #333842; --text: #dcdfe4; --muted: #9196a0; --primary: #61afef; --primary-bg: #2b5780; --primary-dark: #3a6ea0; --on-primary: #61afef; + --secondary: #98c379; --danger: #e06c75; --input-bg: #282c34; --bg-hover: #333842; } @@ -90,6 +101,7 @@ html, [data-theme="dark"] { --bg: #1c1018; --surface: #251420; --border: #352030; --text: #fce7f3; --muted: #b090a0; --primary: #f472b6; --primary-bg: #831843; --primary-dark: #9d174d; --on-primary: #f9a8d4; + --secondary: #fb923c; --danger: #f87171; --input-bg: #251420; --bg-hover: #352030; } @@ -98,6 +110,7 @@ html, [data-theme="dark"] { --bg: #eef0f3; --surface: #ffffff; --border: #d4d8de; --text: #2b3038; --muted: #6b7480; --primary: #4a6a8a; --primary-bg: #3d5a75; --primary-dark: #2f4a60; --on-primary: #ffffff; + --secondary: #c68a3c; --danger: #c0392b; --input-bg: #ffffff; --bg-hover: #e2e6ec; } @@ -106,6 +119,7 @@ html, [data-theme="dark"] { --bg: #eef0f2; --surface: #fcfcfd; --border: #dfe3e8; --text: #33383e; --muted: #828a94; --primary: #c96f3a; --primary-bg: #b85f2e; --primary-dark: #9c4f24; --on-primary: #ffffff; + --secondary: #4a8a96; --danger: #c0392b; --input-bg: #ffffff; --bg-hover: #e3e7ec; } @@ -114,6 +128,7 @@ html, [data-theme="dark"] { --bg: #e9edf2; --surface: #ffffff; --border: #ccd4de; --text: #26303c; --muted: #6d7986; --primary: #33517a; --primary-bg: #2a4466; --primary-dark: #1f3550; --on-primary: #ffffff; + --secondary: #b06a3c; --danger: #b24436; --input-bg: #ffffff; --bg-hover: #dde3ea; } @@ -122,6 +137,7 @@ html, [data-theme="dark"] { --bg: #f3ede6; --surface: #fdfaf5; --border: #e0d3c2; --text: #3a2f26; --muted: #8c7f70; --primary: #b5653b; --primary-bg: #a5552f; --primary-dark: #8a4625; --on-primary: #ffffff; + --secondary: #3b9a9c; --danger: #c0392b; --input-bg: #ffffff; --bg-hover: #e9dfd2; } @@ -130,6 +146,7 @@ html, [data-theme="dark"] { --bg: #eaf0f4; --surface: #ffffff; --border: #d2dde5; --text: #24303c; --muted: #6f7f8c; --primary: #1f4e6e; --primary-bg: #1a425c; --primary-dark: #12344a; --on-primary: #ffffff; + --secondary: #4a97a6; --danger: #b2432f; --input-bg: #ffffff; --bg-hover: #dee7ee; } @@ -138,6 +155,7 @@ html, [data-theme="dark"] { --bg: #e7f1f4; --surface: #ffffff; --border: #cde0e6; --text: #1f2f36; --muted: #6d838c; --primary: #2f7fa0; --primary-bg: #276f8e; --primary-dark: #1e5c77; --on-primary: #ffffff; + --secondary: #d98a4a; --danger: #c0392b; --input-bg: #ffffff; --bg-hover: #d9e8ec; } @@ -146,6 +164,7 @@ html, [data-theme="dark"] { --bg: #eef0f6; --surface: #ffffff; --border: #dcdde8; --text: #2d3440; --muted: #787f8e; --primary: #5a73a6; --primary-bg: #4d6395; --primary-dark: #3d5078; --on-primary: #ffffff; + --secondary: #c06a52; --danger: #c0553d; --input-bg: #ffffff; --bg-hover: #e2e4ee; } @@ -154,6 +173,7 @@ html, [data-theme="dark"] { --bg: #f2efe6; --surface: #fdfaf2; --border: #e0d9c2; --text: #28302e; --muted: #7d8680; --primary: #e76f51; --primary-bg: #d95f41; --primary-dark: #c04e33; --on-primary: #ffffff; + --secondary: #32a09c; --danger: #c0392b; --input-bg: #ffffff; --bg-hover: #e9e4d4; } @@ -162,6 +182,7 @@ html, [data-theme="dark"] { --bg: #eceef1; --surface: #ffffff; --border: #d8dce2; --text: #2c3238; --muted: #77808a; --primary: #3aa6a0; --primary-bg: #2f918b; --primary-dark: #257771; --on-primary: #ffffff; + --secondary: #d0783c; --danger: #d0563a; --input-bg: #ffffff; --bg-hover: #e0e4e9; } @@ -192,7 +213,7 @@ body { } .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; } +.brand-logo { height: 65px; width: auto; object-fit: contain; } .search { flex: 1; @@ -248,7 +269,7 @@ body { box-shadow: var(--shadow); } .note-item:hover { border-color: var(--primary); } -.note-title { font-weight: 600; } +.note-title { font-weight: 600; color: var(--secondary); } .note-meta { color: var(--muted); font-size: 12px; margin-top: 2px; } .note-tags { color: var(--primary); font-size: 12px; margin-top: 4px; } @@ -280,13 +301,13 @@ body { min-height: 60vh; } .editor .ProseMirror { min-height: 55vh; outline: none; } -.editor h1, .editor h2, .editor h3 { margin: 0.5em 0 0.25em; } +.editor h1, .editor h2, .editor h3 { margin: 0.5em 0 0.25em; color: var(--secondary); } .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; } +.editor blockquote { border-left: 3px solid var(--secondary); margin: 0.5em 0; padding-left: 12px; color: var(--muted); } +.editor a { color: var(--secondary); text-decoration: underline; cursor: pointer; } .status { margin-top: 10px; color: var(--muted); font-size: 13px; min-height: 20px; } @@ -337,6 +358,14 @@ body { margin-bottom: 8px; padding: 0 4px; } .theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; } +.theme-section { + grid-column: 1 / -1; + font-size: 11px; color: var(--muted); + text-transform: uppercase; letter-spacing: 0.6px; + margin: 6px 4px 2px; padding-top: 6px; + border-top: 1px solid var(--border); +} +.theme-section:first-child { border-top: none; padding-top: 0; margin-top: 0; } .theme-option { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid transparent; border-radius: 6px; diff --git a/static/app.js b/static/app.js index fe522e8..9b14857 100644 --- a/static/app.js +++ b/static/app.js @@ -9,26 +9,26 @@ marked.setOptions({ gfm: true, breaks: false }); const state = { user: null, local: true, authed: true, editor: null, noteId: null, view: "home", space: null, userNames: null }; const THEMES = [ - { id: "dark", label: "Dark", dark: true, dots: ["#1a1b1e", "#26272b", "#7dd3fc"] }, - { id: "light", label: "Light", dark: false, dots: ["#f5f7fb", "#ffffff", "#3b82f6"] }, - { id: "summer", label: "Summer", dark: false, dots: ["#fff8f0", "#fff0e0", "#f08040"] }, - { id: "max-summer", label: "Max Summer", dark: false, dots: ["#fffdf5", "#fff9e8", "#e53935"] }, - { id: "autumn", label: "Autumn", dark: false, dots: ["#f4f1ec", "#eae5de", "#d59b6a"] }, - { id: "dracula", label: "Dracula", dark: true, dots: ["#0c0c1e", "#12122a", "#7c6af7"] }, - { id: "nord", label: "Nord", dark: true, dots: ["#2e3440", "#3b4252", "#88c0d0"] }, - { id: "tokyo-night", label: "Tokyo Night", dark: true, dots: ["#1a1b26", "#1f2335", "#7aa2f7"] }, - { id: "catppuccin", label: "Catppuccin", dark: true, dots: ["#1e1e2e", "#26263a", "#cba6f7"] }, - { id: "one-dark", label: "One Dark", dark: true, dots: ["#21252b", "#282c34", "#61afef"] }, - { id: "sunset", label: "Sunset", dark: true, dots: ["#1c1018", "#251420", "#f472b6"] }, - { id: "urban-slate", label: "Urban Slate", dark: false, dots: ["#eef0f3", "#ffffff", "#4a6a8a"] }, - { id: "frozen-mist", label: "Frozen Mist", dark: false, dots: ["#eef0f2", "#fcfcfd", "#c96f3a"] }, - { id: "yacht", label: "Yacht", dark: false, dots: ["#e9edf2", "#ffffff", "#33517a"] }, - { id: "copper", label: "Copper", dark: false, dots: ["#f3ede6", "#fdfaf5", "#b5653b"] }, - { id: "marina", label: "Marina", dark: false, dots: ["#eaf0f4", "#ffffff", "#1f4e6e"] }, - { id: "neptune", label: "Neptune", dark: false, dots: ["#e7f1f4", "#ffffff", "#2f7fa0"] }, - { id: "sapphire", label: "Sapphire", dark: false, dots: ["#eef0f6", "#ffffff", "#5a73a6"] }, - { id: "tropical", label: "Tropical", dark: false, dots: ["#f2efe6", "#fdfaf2", "#e76f51"] }, - { id: "gossamer", label: "Gossamer", dark: false, dots: ["#eceef1", "#ffffff", "#3aa6a0"] }, + { id: "light", label: "Light", dark: false, dots: ["#f5f7fb", "#ffffff", "#3b82f6", "#8b5cf6"] }, + { id: "summer", label: "Summer", dark: false, dots: ["#fff8f0", "#fff0e0", "#f08040", "#14b8a6"] }, + { id: "max-summer", label: "Max Summer", dark: false, dots: ["#fffdf5", "#fff9e8", "#e53935", "#f59e0b"] }, + { id: "autumn", label: "Autumn", dark: false, dots: ["#f4f1ec", "#eae5de", "#d59b6a", "#7a9e6e"] }, + { id: "urban-slate", label: "Urban Slate", dark: false, dots: ["#eef0f3", "#ffffff", "#4a6a8a", "#c68a3c"] }, + { id: "frozen-mist", label: "Frozen Mist", dark: false, dots: ["#eef0f2", "#fcfcfd", "#c96f3a", "#4a8a96"] }, + { id: "yacht", label: "Yacht", dark: false, dots: ["#e9edf2", "#ffffff", "#33517a", "#b06a3c"] }, + { id: "copper", label: "Copper", dark: false, dots: ["#f3ede6", "#fdfaf5", "#b5653b", "#3b9a9c"] }, + { id: "marina", label: "Marina", dark: false, dots: ["#eaf0f4", "#ffffff", "#1f4e6e", "#4a97a6"] }, + { id: "neptune", label: "Neptune", dark: false, dots: ["#e7f1f4", "#ffffff", "#2f7fa0", "#d98a4a"] }, + { id: "sapphire", label: "Sapphire", dark: false, dots: ["#eef0f6", "#ffffff", "#5a73a6", "#c06a52"] }, + { id: "tropical", label: "Tropical", dark: false, dots: ["#f2efe6", "#fdfaf2", "#e76f51", "#32a09c"] }, + { id: "gossamer", label: "Gossamer", dark: false, dots: ["#eceef1", "#ffffff", "#3aa6a0", "#d0783c"] }, + { id: "dark", label: "Dark", dark: true, dots: ["#1a1b1e", "#26272b", "#7dd3fc", "#f59e0b"] }, + { id: "dracula", label: "Dracula", dark: true, dots: ["#0c0c1e", "#12122a", "#7c6af7", "#ff79c6"] }, + { id: "nord", label: "Nord", dark: true, dots: ["#2e3440", "#3b4252", "#88c0d0", "#d08770"] }, + { id: "tokyo-night", label: "Tokyo Night", dark: true, dots: ["#1a1b26", "#1f2335", "#7aa2f7", "#e0af68"] }, + { id: "catppuccin", label: "Catppuccin", dark: true, dots: ["#1e1e2e", "#26263a", "#cba6f7", "#94e2d5"] }, + { id: "one-dark", label: "One Dark", dark: true, dots: ["#21252b", "#282c34", "#61afef", "#98c379"] }, + { id: "sunset", label: "Sunset", dark: true, dots: ["#1c1018", "#251420", "#f472b6", "#fb923c"] }, ]; const THEME_CONFIG_KEY = "snotes-theme-config"; const themeMQ = window.matchMedia("(prefers-color-scheme: dark)"); @@ -74,6 +74,13 @@ function themeSelector() { const pop = el("div", { class: "theme-popover hidden" }); sel.appendChild(btn); sel.appendChild(pop); + function optionHtml(t) { + return ``; + } + function render() { applyTheme(labelEl, swatchEl); pop.innerHTML = ` @@ -89,10 +96,8 @@ function themeSelector() {
- ${THEMES.map((t) => ``).join("")} +
Light
${THEMES.filter((t) => !t.dark).map(optionHtml).join("")} +
Dark
${THEMES.filter((t) => t.dark).map(optionHtml).join("")}
`; } @@ -183,8 +188,7 @@ async function doLogin() { function header() { return el("header", { class: "topbar" }, [ el("div", { class: "brand" }, [ - el("img", { src: "/static/snotes-new.png", class: "brand-logo" }), - el("span", { text: "snotes" }), + el("img", { src: "/static/snotes-logo.png", class: "brand-logo", alt: "snotes" }), ]), el("input", { id: "search", class: "search", type: "search", placeholder: "Search notes…", oninput: debounce(onSearch, 250) }), el("div", { class: "topbar-right" }, [ diff --git a/static/index.html b/static/index.html index c1eb15a..a644fcb 100644 --- a/static/index.html +++ b/static/index.html @@ -18,7 +18,7 @@ if (id) document.documentElement.setAttribute("data-theme", id); })(); - + diff --git a/static/snotes-favicon.png b/static/snotes-favicon.png new file mode 100644 index 0000000..3162a0d Binary files /dev/null and b/static/snotes-favicon.png differ diff --git a/static/snotes-logo.png b/static/snotes-logo.png new file mode 100644 index 0000000..93714ee Binary files /dev/null and b/static/snotes-logo.png differ