diff --git a/index.html b/index.html index 323416a..cf4c6e9 100644 --- a/index.html +++ b/index.html @@ -18,31 +18,27 @@ --accent: #FFD700; --accent-hover: #FFA500; --controls-bg: #f1f1f1; - --border: #ddd; - --sidebar-bg: #f8f8f8; - --sidebar-hover: #efefef; + --border: #e0e0e0; + --sidebar-bg: #fff; + --sidebar-hover: #f5f5f5; --sidebar-active-bg: #FFD700; --sidebar-active-fg: #000; --input-bg: #fff; - --muted: #888; - --header-bg: #FFD700; - --header-fg: #000; + --muted: #999; } [data-dark] { --bg: #1a1a1a; --fg: #e0e0e0; --accent: #c9a800; --accent-hover: #a88800; - --controls-bg: #252525; - --border: #3a3a3a; - --sidebar-bg: #1f1f1f; - --sidebar-hover: #2a2a2a; + --controls-bg: #222; + --border: #333; + --sidebar-bg: #1e1e1e; + --sidebar-hover: #272727; --sidebar-active-bg: #3a2e00; --sidebar-active-fg: #FFD700; --input-bg: #2a2a2a; --muted: #666; - --header-bg: #2a2200; - --header-fg: #c9a800; } * { box-sizing: border-box; margin: 0; padding: 0; } @@ -50,148 +46,209 @@ body { height: 100vh; display: flex; - flex-direction: column; font-family: 'Roboto Mono', monospace; background: var(--bg); color: var(--fg); overflow: hidden; } - /* ── Header ── */ - .header { - display: flex; - align-items: center; - height: 44px; - padding: 0 10px; - gap: 8px; - background: var(--header-bg); - border-bottom: 1px solid var(--border); - flex-shrink: 0; - } - .header-title { - font-weight: 700; - font-size: 18px; - flex: 1; - color: var(--header-fg); - } - .header-right { - display: flex; - align-items: center; - gap: 6px; - } - .save-indicator { - font-size: 11px; - color: var(--header-fg); - opacity: 0; - transition: opacity 0.4s; - white-space: nowrap; - } - .save-indicator.visible { opacity: 0.7; } - - /* ── Buttons ── */ - button { - padding: 5px 10px; - cursor: pointer; - background: var(--accent); - color: #000; - border: none; - border-radius: 4px; - font-family: 'Roboto Mono', monospace; - font-size: 12px; - white-space: nowrap; - } - button:hover { background: var(--accent-hover); } - button.on { background: var(--accent-hover); box-shadow: inset 0 2px 3px rgba(0,0,0,0.2); } - .btn-ghost { - background: transparent; - padding: 4px 7px; - font-size: 15px; - } - .btn-ghost:hover { background: rgba(0,0,0,0.1); } - [data-dark] .btn-ghost:hover { background: rgba(255,255,255,0.1); } - - /* ── Layout ── */ - .body { - display: flex; - flex: 1; - overflow: hidden; - } - - /* ── Sidebar ── */ + /* ── Left sidebar ── */ .sidebar { - width: 190px; + width: 220px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--sidebar-bg); border-right: 1px solid var(--border); - overflow: hidden; transition: width 0.2s; + overflow: hidden; } - .sidebar.closed { width: 0; } + .sidebar.closed { width: 42px; } + .sidebar-top { - padding: 8px; + display: flex; + align-items: center; + justify-content: space-between; + padding: 10px 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; + height: 44px; } - .sidebar-top button { width: 100%; text-align: left; } - .notes-list { flex: 1; overflow-y: auto; } + .sidebar.closed .sidebar-top { justify-content: center; } + + .sidebar-title { + font-size: 13px; + font-weight: 700; + letter-spacing: 0.05em; + white-space: nowrap; + overflow: hidden; + opacity: 1; + transition: opacity 0.15s; + } + .sidebar.closed .sidebar-title { opacity: 0; width: 0; } + + .notes-list { + flex: 1; + overflow-y: auto; + overflow-x: hidden; + } + .note-item { display: flex; align-items: center; padding: 9px 10px; cursor: pointer; border-bottom: 1px solid var(--border); - font-size: 12px; gap: 4px; + min-height: 38px; } .note-item:hover { background: var(--sidebar-hover); } - .note-item.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-fg); font-weight: 700; } + .note-item.active { + background: var(--sidebar-active-bg); + color: var(--sidebar-active-fg); + } + .note-item-name { flex: 1; + font-size: 12px; + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - white-space: nowrap; } + .sidebar.closed .note-item-name { display: none; } + + /* inline rename input */ + .note-rename-input { + flex: 1; + font-size: 12px; + font-family: 'Roboto Mono', monospace; + border: none; + outline: 1px solid var(--accent); + border-radius: 3px; + padding: 1px 4px; + background: var(--input-bg); + color: var(--fg); + } + .note-del { background: transparent; - padding: 0 3px; + border: none; + padding: 0 2px; font-size: 13px; opacity: 0; - color: inherit; + color: var(--fg); + cursor: pointer; + flex-shrink: 0; } - .note-item:hover .note-del { opacity: 0.5; } - .note-del:hover { opacity: 1 !important; background: transparent; } + .note-item:hover .note-del { opacity: 0.4; } + .note-del:hover { opacity: 1 !important; } + .sidebar.closed .note-del { display: none; } - /* ── Editor ── */ - .editor { + .sidebar-bottom { + padding: 8px; + border-top: 1px solid var(--border); + display: flex; + flex-direction: column; + gap: 6px; + flex-shrink: 0; + } + + /* ── Icon buttons ── */ + .icon-btn { + background: none; + border: none; + cursor: pointer; + font-size: 16px; + padding: 4px 6px; + border-radius: 4px; + color: var(--fg); + line-height: 1; + display: flex; + align-items: center; + justify-content: center; + } + .icon-btn:hover { background: var(--sidebar-hover); } + + .sidebar-bottom-btn { + width: 100%; + padding: 7px; + background: none; + border: 1px solid var(--border); + border-radius: 5px; + cursor: pointer; + font-size: 18px; + color: var(--fg); + font-family: 'Roboto Mono', monospace; + display: flex; + align-items: center; + justify-content: center; + gap: 6px; + white-space: nowrap; + overflow: hidden; + } + .sidebar-bottom-btn:hover { background: var(--sidebar-hover); } + .sidebar.closed .btn-label { display: none; } + + /* ── Main area ── */ + .main { flex: 1; display: flex; flex-direction: column; overflow: hidden; + position: relative; } - .note-title-bar { + + /* floating share + dark toggle */ + .float-actions { + position: absolute; + top: 10px; + right: 12px; display: flex; - align-items: center; - border-bottom: 1px solid var(--border); - flex-shrink: 0; + gap: 6px; + z-index: 10; } - #note-title { - flex: 1; - padding: 10px 14px; - font-size: 17px; - font-weight: 700; - font-family: 'Roboto Mono', monospace; + .float-btn { + padding: 5px 12px; + background: var(--accent); border: none; - outline: none; - background: var(--bg); + border-radius: 4px; + cursor: pointer; + font-family: 'Roboto Mono', monospace; + font-size: 12px; + font-weight: 700; + color: #000; + } + .float-btn:hover { background: var(--accent-hover); } + .float-icon-btn { + background: none; + border: 1px solid var(--border); + border-radius: 4px; + padding: 4px 8px; + cursor: pointer; + font-size: 15px; color: var(--fg); } - #note-title::placeholder { color: var(--muted); } + .float-icon-btn:hover { background: var(--sidebar-hover); } + + /* save flash */ + .save-flash { + position: absolute; + top: 12px; + left: 50%; + transform: translateX(-50%); + font-size: 11px; + color: var(--muted); + opacity: 0; + transition: opacity 0.4s; + pointer-events: none; + } + .save-flash.show { opacity: 1; } + + /* ── Editor ── */ .notepad { flex: 1; width: 100%; - padding: 14px; + padding: 40px 20px 14px; font-size: 24px; border: none; outline: none; @@ -203,7 +260,7 @@ } .md-view { flex: 1; - padding: 14px 18px; + padding: 40px 20px 14px; overflow-y: auto; background: var(--bg); color: var(--fg); @@ -242,7 +299,7 @@ } .draw-controls.visible { display: flex; } - /* ── Main controls ── */ + /* ── Bottom controls ── */ .controls { display: flex; align-items: center; @@ -257,6 +314,19 @@ .cgroup label { font-size: 11px; color: var(--muted); } .controls-right { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; } + button.ctrl { + padding: 5px 10px; + background: var(--accent); + border: none; + border-radius: 4px; + cursor: pointer; + font-family: 'Roboto Mono', monospace; + font-size: 12px; + color: #000; + } + button.ctrl:hover { background: var(--accent-hover); } + button.ctrl.on { background: var(--accent-hover); box-shadow: inset 0 2px 3px rgba(0,0,0,0.2); } + select { padding: 4px 6px; border-radius: 4px; @@ -267,13 +337,9 @@ font-size: 12px; } input[type="color"] { - width: 36px; - height: 28px; - padding: 2px; - border-radius: 4px; - border: 1px solid var(--border); - background: var(--input-bg); - cursor: pointer; + width: 36px; height: 28px; padding: 2px; + border-radius: 4px; border: 1px solid var(--border); + background: var(--input-bg); cursor: pointer; } input[type="range"] { width: 70px; } @@ -291,45 +357,28 @@ /* ── Share modal ── */ .overlay { - position: fixed; - inset: 0; - background: rgba(0,0,0,0.55); - display: flex; - align-items: center; - justify-content: center; + position: fixed; inset: 0; + background: rgba(0,0,0,0.5); + display: flex; align-items: center; justify-content: center; z-index: 999; } .modal { - background: var(--bg); - color: var(--fg); - border-radius: 8px; - padding: 22px; - width: 380px; - max-width: 92vw; + background: var(--bg); color: var(--fg); + border-radius: 8px; padding: 22px; + width: 380px; max-width: 92vw; } .modal h3 { margin-bottom: 10px; } .modal p { font-size: 12px; color: var(--muted); margin-bottom: 10px; } .modal input[type="text"] { - width: 100%; - padding: 7px; - border: 1px solid var(--border); - border-radius: 4px; - font-family: 'Roboto Mono', monospace; - font-size: 12px; - background: var(--input-bg); - color: var(--fg); - margin-bottom: 12px; + width: 100%; padding: 7px; + border: 1px solid var(--border); border-radius: 4px; + font-family: 'Roboto Mono', monospace; font-size: 12px; + background: var(--input-bg); color: var(--fg); margin-bottom: 12px; } .modal-btns { display: flex; gap: 8px; justify-content: flex-end; } - /* ── Share read-only view ── */ - .share-page { - padding: 40px; - max-width: 760px; - margin: 0 auto; - overflow-y: auto; - height: 100vh; - } + /* ── Share read-only ── */ + .share-page { padding: 40px; max-width: 760px; margin: 0 auto; overflow-y: auto; height: 100vh; } .share-page h1 { font-size: 26px; margin-bottom: 20px; } .share-page .content { font-family: 'Roboto', sans-serif; font-size: 16px; line-height: 1.7; } .share-page .content h1,.share-page .content h2,.share-page .content h3 { margin: 16px 0 8px; } @@ -340,36 +389,41 @@ -
- - noted. -
- ✓ saved - - + + + -
-