various fixes

This commit is contained in:
2026-09-24 08:28:43 -07:00
parent 92883d63f5
commit 720ffca099
7 changed files with 119 additions and 6 deletions

View File

@@ -272,8 +272,16 @@ body {
.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; }
.note-snippet { color: var(--text); font-size: 13px; line-height: 1.45; margin-top: 6px; overflow: hidden; }
.note-snippet p { margin: 0 0 0.3em; }
.note-snippet p:last-child { margin-bottom: 0; }
.note-snippet ul, .note-snippet ol { margin: 0.2em 0; padding-left: 1.4em; }
.note-snippet code { background: var(--code-bg); color: var(--code-fg); padding: 1px 4px; border-radius: 4px; font-size: 0.9em; }
.note-snippet a { color: var(--secondary); text-decoration: underline; }
.note-snippet h1, .note-snippet h2, .note-snippet h3 { margin: 0.3em 0; font-size: 1em; color: var(--secondary); }
.note-snippet blockquote { border-left: 3px solid var(--secondary); margin: 0.3em 0; padding-left: 10px; color: var(--muted); }
.note-item { display: flex; align-items: center; gap: 12px; }
.note-item { display: flex; align-items: flex-start; gap: 12px; }
.note-body { flex: 1; min-width: 0; }
.note-thumb {
width: 56px;

View File

@@ -415,6 +415,7 @@ function noteList(notes) {
el("div", { class: "note-title", text: n.title || "Untitled" }),
meta,
el("div", { class: "note-tags", text: tags }),
n.snippet ? el("div", { class: "note-snippet", html: marked.parse(n.snippet) }) : null,
]);
ul.appendChild(el("li", { class: isCommon ? "note-item note-common" : "note-item", onclick: () => openNote(n.id) }, [
n.image ? el("img", { class: "note-thumb", src: n.image, alt: "", loading: "lazy" }) : null,