This repository has been archived on 2026-04-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
core/packages/notes/css/main.css
Jeffrey Smith 03c182b9d1
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-frontend (push) Successful in 6s
CI/CD / test-go-pg (push) Successful in 2m38s
CI/CD / test-sqlite (push) Successful in 2m48s
CI/CD / build-and-deploy (push) Successful in 28s
Feat v0.4.1 folders (#23)
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
2026-03-29 12:23:47 +00:00

382 lines
9.1 KiB
CSS

/* ── Notes Surface Styles ─────────────────── */
.notes-app {
display: flex;
height: 100%;
overflow: hidden;
}
/* ── Sidebar ─────────────────────────────── */
.notes-sidebar {
width: 280px;
min-width: 220px;
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
background: var(--bg-raised);
flex-shrink: 0;
}
.notes-sidebar__header {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 14px;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.notes-sidebar__title {
font-size: 14px;
font-weight: 600;
color: var(--text);
flex: 1;
}
.notes-sidebar__count {
font-size: 12px;
color: var(--text-3);
}
.notes-sidebar__actions {
display: flex;
gap: 4px;
}
/* ── Folder Tree ────────────────────────── */
.folder-tree {
padding: 4px 0;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
max-height: 40%;
overflow-y: auto;
}
.folder-tree__item {
display: flex;
align-items: center;
gap: 4px;
padding: 5px 12px;
font-size: 13px;
color: var(--text-2);
cursor: pointer;
border-radius: var(--radius);
margin: 1px 6px;
transition: var(--transition);
user-select: none;
}
.folder-tree__item:hover {
background: var(--bg-hover);
color: var(--text);
}
.folder-tree__item--active {
background: var(--bg-active);
color: var(--text);
font-weight: 500;
}
.folder-tree__toggle {
width: 14px;
font-size: 9px;
text-align: center;
flex-shrink: 0;
color: var(--text-3);
}
.folder-tree__icon {
font-size: 13px;
flex-shrink: 0;
}
.folder-tree__name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
}
.folder-tree__edit {
flex: 1;
font-size: 13px;
padding: 1px 4px;
border: 1px solid var(--accent);
border-radius: 3px;
background: var(--bg-surface);
color: var(--text);
font-family: var(--font);
outline: none;
}
.folder-tree__add {
padding: 6px 12px;
font-size: 12px;
color: var(--text-3);
cursor: pointer;
transition: var(--transition);
}
.folder-tree__add:hover {
color: var(--accent);
}
/* ── Search ──────────────────────────────── */
.notes-search {
padding: 8px 14px;
flex-shrink: 0;
}
.notes-search input {
width: 100%;
padding: 6px 10px;
font-size: 13px;
background: var(--bg-surface);
color: var(--text);
border: 1px solid var(--border);
border-radius: var(--radius);
font-family: var(--font);
}
.notes-search input:focus {
outline: none;
border-color: var(--accent);
}
.notes-search input::placeholder {
color: var(--text-3);
}
/* ── Note List ───────────────────────────── */
.notes-list {
flex: 1;
overflow-y: auto;
padding: 4px 8px;
}
.notes-list__empty {
padding: 40px 16px;
text-align: center;
color: var(--text-3);
font-size: 13px;
}
.notes-list__loading {
padding: 40px 0;
display: flex;
justify-content: center;
color: var(--text-3);
}
/* ── Note Card (sidebar item) ────────────── */
.note-card {
padding: 10px 12px;
border-radius: var(--radius);
cursor: pointer;
transition: var(--transition);
margin-bottom: 2px;
}
.note-card:hover {
background: var(--bg-hover);
}
.note-card--active {
background: var(--bg-active);
}
.note-card__title {
font-size: 13px;
font-weight: 500;
color: var(--text);
display: flex;
align-items: center;
gap: 6px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.note-card__pin {
font-size: 11px;
flex-shrink: 0;
}
.note-card__snippet {
font-size: 12px;
color: var(--text-3);
margin-top: 3px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 1.4;
}
.note-card__date {
font-size: 11px;
color: var(--text-3);
margin-top: 3px;
}
/* ── Editor Pane ─────────────────────────── */
.notes-editor {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
overflow: hidden;
}
.notes-editor__empty {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-3);
font-size: 14px;
}
/* ── Editor Header ───────────────────────── */
.notes-editor__header {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 20px;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.notes-editor__title-input {
flex: 1;
font-size: 18px;
font-weight: 600;
color: var(--text);
background: transparent;
border: none;
outline: none;
padding: 4px 0;
font-family: var(--font);
}
.notes-editor__title-input::placeholder {
color: var(--text-3);
}
.notes-editor__actions {
display: flex;
gap: 6px;
align-items: center;
}
/* ── Folder select in editor ────────────── */
.notes-editor__folder-select {
font-size: 12px;
padding: 3px 6px;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--bg-raised);
color: var(--text-2);
font-family: var(--font);
cursor: pointer;
max-width: 140px;
}
.notes-editor__folder-select:focus {
outline: none;
border-color: var(--accent);
}
/* ── Editor Body ─────────────────────────── */
.notes-editor__body {
flex: 1;
display: flex;
min-height: 0;
overflow: hidden;
}
.notes-editor__textarea {
flex: 1;
resize: none;
padding: 20px;
font-size: 14px;
line-height: 1.6;
color: var(--text);
background: var(--bg-surface);
border: none;
outline: none;
font-family: var(--mono);
tab-size: 2;
}
.notes-editor__textarea::placeholder {
color: var(--text-3);
}
/* ── Preview ─────────────────────────────── */
.notes-preview {
flex: 1;
overflow-y: auto;
padding: 20px;
border-left: 1px solid var(--border);
background: var(--bg-surface);
}
.notes-preview h1 { font-size: 24px; font-weight: 700; color: var(--text); margin: 0 0 12px; }
.notes-preview h2 { font-size: 20px; font-weight: 600; color: var(--text); margin: 20px 0 8px; }
.notes-preview h3 { font-size: 16px; font-weight: 600; color: var(--text); margin: 16px 0 6px; }
.notes-preview p { font-size: 14px; color: var(--text); line-height: 1.7; margin: 0 0 10px; }
.notes-preview ul, .notes-preview ol { padding-left: 24px; margin: 0 0 10px; color: var(--text); font-size: 14px; line-height: 1.7; }
.notes-preview li { margin-bottom: 2px; }
.notes-preview code {
font-family: var(--mono);
font-size: 13px;
background: var(--bg-raised);
padding: 2px 6px;
border-radius: 3px;
color: var(--accent);
}
.notes-preview pre {
background: var(--bg-raised);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 14px;
overflow-x: auto;
margin: 0 0 12px;
}
.notes-preview pre code {
background: none;
padding: 0;
color: var(--text);
font-size: 13px;
}
.notes-preview blockquote {
border-left: 3px solid var(--accent);
margin: 0 0 12px;
padding: 4px 16px;
color: var(--text-2);
}
.notes-preview a { color: var(--accent); text-decoration: none; }
.notes-preview a:hover { text-decoration: underline; }
.notes-preview hr {
border: none;
border-top: 1px solid var(--border);
margin: 16px 0;
}
.notes-preview strong { font-weight: 600; }
.notes-preview em { font-style: italic; }
/* ── Toggle button ───────────────────────── */
.notes-toggle {
padding: 4px 10px;
font-size: 12px;
border: 1px solid var(--border);
background: var(--bg-raised);
color: var(--text-2);
border-radius: var(--radius);
cursor: pointer;
transition: var(--transition);
}
.notes-toggle:hover { background: var(--bg-hover); color: var(--text); }
.notes-toggle--active { background: var(--accent); color: #fff; border-color: var(--accent); }
/* ── Inline buttons ──────────────────────── */
.notes-btn {
border: none;
background: var(--bg-raised);
color: var(--text-2);
cursor: pointer;
border-radius: var(--radius);
transition: var(--transition);
padding: 4px 10px;
font-size: 13px;
}
.notes-btn:hover { background: var(--bg-hover); color: var(--text); }
.notes-btn--danger:hover { background: var(--danger-dim); color: var(--danger); }
.notes-btn--accent { background: var(--accent); color: #fff; }
.notes-btn--accent:hover { opacity: 0.9; color: #fff; }
/* ── Saved indicator ─────────────────────── */
.notes-saved {
font-size: 12px;
color: var(--text-3);
padding: 2px 8px;
}
.notes-saved--dirty {
color: var(--warning);
}
/* ── Responsive ──────────────────────────── */
@media (max-width: 700px) {
.notes-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 40vh; }
.notes-app { flex-direction: column; }
.folder-tree { max-height: 30vh; }
}