Files
textDB/src/index.css

1080 lines
18 KiB
CSS
Raw Normal View History

2026-01-30 23:14:06 +01:00
:root {
color-scheme: dark;
font-family: "SF Pro Text", "Segoe UI", "Helvetica Neue", "Noto Sans", sans-serif;
font-size: var(--base-font-size, 16px);
2026-01-30 23:14:06 +01:00
line-height: 1.5;
font-weight: 400;
--bg: #141414;
--bg-elevated: #1b1b1b;
--panel: #1b1b1b;
--ink: #e5e5e5;
--muted: #a0a0a0;
--accent: #3a3a3a;
--accent-strong: #5a5a5a;
--accent-warm: #5a5a5a;
--border: #2a2a2a;
--shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
--radius: 16px;
--bg-input: #151515;
--bg-contrast: #1f1f1f;
--bg-contrast-strong: #242424;
--bg-active: #202020;
--border-strong: #555;
--danger-hover: #4f4f4f;
2026-02-01 01:28:53 +01:00
--tree-line: #5f5f5f;
}
body[data-theme="light"] {
color-scheme: light;
--bg: #f4f4f4;
--bg-elevated: #ffffff;
--panel: #f2f2f2;
--ink: #1b1b1b;
--muted: #5f5f5f;
--border: #d3d3d3;
--accent: #e1e1e1;
--accent-strong: #c1c1c1;
--accent-warm: #d0d0d0;
--shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
--bg-input: #ffffff;
--bg-contrast: #f5f5f5;
--bg-contrast-strong: #ececec;
--bg-active: #e6e6e6;
--border-strong: #b5b5b5;
--danger-hover: #d6d6d6;
2026-02-01 01:28:53 +01:00
--tree-line: #9a9a9a;
2026-01-30 23:14:06 +01:00
}
2026-01-30 23:14:06 +01:00
* {
box-sizing: border-box;
}
body {
margin: 0;
height: 100vh;
overflow: hidden;
min-height: 100vh;
background: var(--bg);
color: var(--ink);
}
#root {
height: 100vh;
min-height: 100vh;
}
.app {
display: grid;
grid-template-columns: 300px 1fr;
height: 100vh;
min-height: 100vh;
}
.app--sidebar-collapsed {
2026-02-01 02:53:29 +01:00
grid-template-columns: 1fr;
}
2026-01-30 23:14:06 +01:00
.sidebar {
display: flex;
flex-direction: column;
gap: 16px;
padding: 24px 0 16px;
2026-01-30 23:14:06 +01:00
background: var(--panel);
border-right: 1px solid var(--border);
height: 100vh;
overflow: hidden;
}
.sidebar__header {
display: flex;
flex-direction: column;
gap: 12px;
padding-left: 24px;
padding-right: 24px;
}
.sidebar__title-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.sidebar__actions {
display: flex;
align-items: center;
gap: 6px;
}
2026-01-30 23:14:06 +01:00
.sidebar__footer {
display: flex;
flex-direction: row;
align-items: center;
gap: 8px;
justify-content: center;
2026-01-30 23:14:06 +01:00
margin-top: auto;
padding: 0 24px;
2026-01-30 23:14:06 +01:00
}
.sidebar__footer .icon-button {
width: 36px;
height: 36px;
2026-01-30 23:14:06 +01:00
}
.app-title {
font-size: 1.4rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--ink);
}
.search {
padding: 10px 12px;
border-radius: 10px;
border: 1px solid var(--border);
background: var(--bg-elevated);
color: var(--ink);
font-size: 0.95rem;
}
.button {
border-radius: 12px;
border: 1px solid var(--border);
padding: 10px 16px;
background: var(--bg-elevated);
color: var(--ink);
font-size: 0.95rem;
cursor: pointer;
transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.button:hover {
box-shadow: var(--shadow);
border-color: rgba(255, 255, 255, 0.12);
}
.button:disabled {
cursor: not-allowed;
opacity: 0.6;
box-shadow: none;
}
.button--primary {
background: var(--accent);
border-color: var(--accent);
color: var(--ink);
}
.button--primary:hover {
border-color: var(--accent-strong);
}
.button--danger {
background: var(--accent-warm);
border-color: var(--accent-warm);
color: var(--ink);
}
.button--danger:hover {
border-color: var(--accent-strong);
background: var(--danger-hover);
2026-01-30 23:14:06 +01:00
}
.button--save {
}
.prompt-list {
flex: 1;
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
padding: 0;
min-height: 0;
}
.prompt-list__inner {
display: flex;
flex-direction: column;
gap: 10px;
padding: 0 16px 16px 16px;
}
.prompt-item {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 12px;
text-align: left;
position: relative;
border-radius: 14px;
border: 1px solid transparent;
background: var(--bg-elevated);
padding: 12px 48px 12px 14px;
cursor: pointer;
transition: border-color 0.15s ease;
}
.prompt-item:hover {
border-color: rgba(255, 255, 255, 0.12);
}
.prompt-item.is-active {
border-color: var(--border-strong);
background: var(--bg-active);
2026-01-30 23:14:06 +01:00
}
.prompt-item__content {
display: flex;
flex-direction: column;
gap: 4px;
flex: 1;
}
.prompt-item__input {
width: 100%;
font: inherit;
color: var(--ink);
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: 10px;
padding: 6px 10px;
}
2026-01-30 23:14:06 +01:00
.prompt-item__delete {
width: 34px;
height: 34px;
border-radius: 10px;
border: 1px solid transparent;
background: transparent;
color: var(--muted);
font-size: 1.1rem;
line-height: 1;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
position: absolute;
top: 4px;
2026-01-30 23:14:06 +01:00
right: 8px;
transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.prompt-item__delete:hover {
border-color: transparent;
background: transparent;
color: var(--ink);
}
.prompt-item__title {
font-weight: 600;
overflow-wrap: anywhere;
word-break: break-word;
}
.folder-node {
display: flex;
flex-direction: column;
gap: 8px;
border: 1px solid transparent;
}
.folder-item {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 12px;
border-radius: 14px;
2026-02-01 02:04:47 +01:00
border: 1px solid var(--tree-line);
background: var(--bg-elevated);
color: var(--ink);
cursor: pointer;
2026-02-01 02:05:23 +01:00
transition: none;
position: relative;
}
body:not([data-theme="light"]) .prompt-item,
body:not([data-theme="light"]) .folder-item {
background: var(--bg-contrast);
}
.folder-item__toggle {
2026-02-01 02:01:07 +01:00
width: 18px;
height: 18px;
display: inline-flex;
align-items: center;
justify-content: center;
border: none;
background: transparent;
color: var(--muted);
cursor: pointer;
padding: 0;
2026-02-01 02:01:32 +01:00
margin-left: -4px;
font-size: 1.6rem;
transform: translateY(-3px);
}
.folder-item__lead {
display: inline-flex;
align-items: center;
2026-02-01 02:00:35 +01:00
gap: 1px;
}
.folder-item__icon {
width: 1em;
height: 1em;
flex: 0 0 1em;
display: block;
}
.folder-item__title {
font-weight: 600;
flex: 1;
overflow-wrap: anywhere;
word-break: break-word;
}
.folder-item__delete {
width: 28px;
height: 28px;
border-radius: 8px;
border: 1px solid transparent;
background: transparent;
color: var(--muted);
font-size: 1rem;
line-height: 1;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
margin-left: 6px;
}
.folder-item__delete:hover {
color: var(--ink);
}
.folder-item__input {
width: 100%;
font: inherit;
color: var(--ink);
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: 10px;
padding: 6px 10px;
}
.folder-children {
display: flex;
flex-direction: column;
gap: 10px;
margin-top: 6px;
padding-left: 18px;
position: relative;
}
.folder-children > * {
position: relative;
2026-02-01 01:27:16 +01:00
}
.folder-children > *::after {
content: "";
position: absolute;
left: -12px;
2026-02-01 01:27:16 +01:00
top: -10px;
bottom: -10px;
width: 1px;
2026-02-01 01:28:59 +01:00
background: var(--tree-line);
}
.folder-children > :first-child::after {
top: -16px;
}
.folder-children > :last-child::after {
2026-02-01 01:27:16 +01:00
bottom: 50%;
}
.folder-children .folder-item::before,
.folder-children .prompt-item::before {
content: "";
position: absolute;
left: -12px;
top: 50%;
width: 12px;
height: 1px;
background: var(--tree-line);
transform: translateY(-50%);
}
2026-01-30 23:14:06 +01:00
.workspace {
padding: 16px 32px;
2026-01-30 23:14:06 +01:00
height: 100%;
overflow: hidden;
position: relative;
display: flex;
flex-direction: column;
min-height: 0;
}
.workspace__body {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
}
.workspace__topbar {
position: absolute;
top: 24px;
left: 8px;
display: flex;
align-items: center;
gap: 12px;
z-index: 5;
}
.workspace__topbar .icon-button {
width: 24px;
height: 24px;
border-radius: 8px;
font-size: 0.9rem;
}
2026-01-30 23:14:06 +01:00
.workspace__content {
display: grid;
grid-template-columns: 1fr;
gap: 24px;
flex: 1;
2026-01-30 23:14:06 +01:00
min-height: 0;
}
.workspace__content--history {
grid-template-columns: minmax(0, 1fr) 260px;
}
.editor {
display: flex;
flex-direction: column;
gap: 16px;
2026-01-31 13:26:00 +01:00
/* padding: 24px; */
/* border-radius: var(--radius); */
/* background: var(--bg-elevated); */
/* box-shadow: var(--shadow); */
2026-01-30 23:14:06 +01:00
min-height: 0;
height: 100%;
}
.editor__header {
display: flex;
flex-direction: column;
gap: 8px;
}
.editor__title-row {
2026-01-30 23:14:06 +01:00
display: flex;
align-items: center;
gap: 12px;
}
.editor__title-row .title-input {
flex: 1;
}
2026-01-30 23:14:06 +01:00
.title-input {
font-size: 1.6rem;
border: none;
border-bottom: 2px solid var(--border);
padding: 6px 2px 8px;
background: transparent;
color: var(--ink);
}
.title-input:focus {
outline: none;
border-bottom-color: var(--accent-strong);
2026-01-30 23:14:06 +01:00
}
.status-line {
display: flex;
align-items: center;
gap: 8px;
font-size: 0.9rem;
color: var(--muted);
}
.icon-button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
border-radius: 10px;
border: 1px solid var(--border);
background: var(--bg-elevated);
color: var(--muted);
cursor: pointer;
transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.icon-button--ghost {
border-color: transparent;
background: transparent;
}
.icon-button--ghost:hover {
border-color: rgba(255, 255, 255, 0.12);
background: var(--bg-elevated);
color: var(--ink);
}
2026-01-30 23:14:06 +01:00
.icon-button__img {
width: 18px;
height: 18px;
display: block;
}
2026-01-31 12:45:38 +01:00
.icon-button__glyph {
font-size: 1rem;
line-height: 1;
}
.icon-button__glyph--large {
font-size: 1.1rem;
}
2026-01-30 23:14:06 +01:00
.icon-button:hover {
border-color: rgba(255, 255, 255, 0.2);
color: var(--ink);
}
.icon-button.is-active {
border-color: var(--accent-strong);
2026-01-30 23:14:06 +01:00
color: var(--ink);
background: var(--bg-active);
2026-01-30 23:14:06 +01:00
}
.status {
width: 10px;
height: 10px;
border-radius: 999px;
background: #3c3c3c;
}
.status--saved {
background: #b3b3b3;
}
.status--draft {
background: #8f8f8f;
}
.status--unsaved {
background: #d0d0d0;
}
.status--history {
background: #707070;
}
2026-01-31 12:59:03 +01:00
.editor__textarea-wrap {
flex: 1;
display: flex;
border-radius: 12px;
border: 1px solid var(--border);
background: var(--bg-input);
overflow: hidden;
}
2026-01-31 14:37:20 +01:00
.editor__textarea-wrap--preview {
border-color: transparent;
}
2026-01-31 12:59:03 +01:00
.editor__textarea-wrap:focus-within {
border-color: rgba(255, 255, 255, 0.18);
}
.line-numbers {
padding: 14px 10px;
min-width: 3ch;
text-align: right;
font-family: "SF Mono", "Menlo", "Consolas", monospace;
font-size: 0.95rem;
line-height: 1.5;
color: var(--muted);
background: var(--bg-contrast);
border-right: 1px solid var(--border);
user-select: none;
overflow: hidden;
position: relative;
}
.line-numbers__inner {
position: relative;
width: 100%;
2026-01-31 12:59:03 +01:00
}
.line-numbers__line {
position: absolute;
left: 0;
right: 0;
2026-01-31 13:05:08 +01:00
display: flex;
align-items: flex-start;
justify-content: flex-end;
2026-01-31 13:05:08 +01:00
}
.editor__codemirror {
2026-01-30 23:14:06 +01:00
flex: 1;
width: 100%;
min-height: 0;
}
.editor__codemirror--hidden {
display: none;
}
.editor__codemirror .cm-editor {
height: 100%;
background: transparent;
color: var(--ink);
2026-01-30 23:14:06 +01:00
font-family: "SF Mono", "Menlo", "Consolas", monospace;
font-size: 0.95rem;
2026-01-31 12:59:03 +01:00
line-height: 1.5;
2026-01-30 23:14:06 +01:00
}
.editor__codemirror .cm-scroller {
overflow: auto;
}
.editor__codemirror .cm-content {
padding: 14px;
}
.editor__codemirror .cm-gutters {
background: var(--bg-contrast);
border-right: 1px solid var(--border);
color: var(--muted);
}
.editor__codemirror .cm-gutterElement {
padding: 0 10px 0 0;
}
.editor__codemirror .cm-activeLineGutter {
background: transparent;
}
.markdown-preview {
flex: 1;
width: 100%;
overflow-y: auto;
padding: 14px;
color: var(--ink);
}
.markdown-preview--hidden {
display: none;
}
2026-01-30 23:14:06 +01:00
.editor__footer {
display: flex;
flex-wrap: wrap;
gap: 12px;
align-items: center;
}
.editor__footer-status {
margin-left: auto;
2026-01-30 23:14:06 +01:00
}
.banner {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 12px 14px;
border-radius: 12px;
border: 1px solid var(--border);
background: var(--bg-contrast);
2026-01-30 23:14:06 +01:00
}
.banner__actions {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.banner--draft {
border-color: #3a3a3a;
background: var(--bg-contrast);
2026-01-30 23:14:06 +01:00
}
.banner--history {
border-color: #3a3a3a;
background: var(--bg-contrast);
2026-01-30 23:14:06 +01:00
}
.history {
display: flex;
flex-direction: column;
gap: 12px;
padding: 20px;
background: var(--panel);
border-radius: var(--radius);
border: 1px solid var(--border);
height: 100%;
min-height: 0;
}
.history__header {
display: flex;
align-items: center;
justify-content: space-between;
text-transform: uppercase;
letter-spacing: 0.08em;
font-size: 0.95rem;
}
.history__close {
width: 28px;
height: 28px;
border-radius: 8px;
border: 1px solid transparent;
background: transparent;
color: var(--muted);
font-size: 1rem;
line-height: 1;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: color 0.15s ease;
}
.history__close:hover {
color: var(--ink);
}
.history__list {
display: flex;
flex-direction: column;
gap: 10px;
flex: 1;
min-height: 0;
overflow-y: auto;
}
.history__item {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 10px;
text-align: left;
position: relative;
border: 1px solid transparent;
border-radius: 12px;
background: var(--bg-contrast);
2026-01-30 23:14:06 +01:00
padding: 10px 42px 10px 12px;
cursor: pointer;
transition: border-color 0.15s ease;
}
.history__item.is-active {
border-color: var(--border-strong);
background: var(--bg-contrast-strong);
2026-01-30 23:14:06 +01:00
}
.history__item-content {
display: flex;
flex-direction: column;
gap: 4px;
flex: 1;
}
.history__item-delete {
width: 32px;
height: 32px;
border-radius: 10px;
border: 1px solid transparent;
background: transparent;
color: var(--muted);
font-size: 1rem;
line-height: 1;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
position: absolute;
top: 6px;
right: 6px;
transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.history__item-delete:hover {
border-color: transparent;
background: transparent;
color: var(--ink);
}
.modal {
position: fixed;
inset: 0;
display: grid;
place-items: center;
z-index: 20;
}
.modal__overlay {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.6);
}
.modal__card {
position: relative;
z-index: 1;
width: min(420px, 92vw);
padding: 22px;
border-radius: 16px;
background: var(--bg-elevated);
border: 1px solid var(--border);
box-shadow: var(--shadow);
display: flex;
flex-direction: column;
gap: 12px;
}
.modal__title {
font-size: 1.2rem;
}
.modal__message {
color: var(--muted);
}
.modal__actions {
display: flex;
justify-content: flex-end;
gap: 12px;
flex-wrap: wrap;
}
.history__item-title {
font-weight: 600;
}
.history__item-meta {
font-size: 0.8rem;
color: var(--muted);
}
.empty {
color: var(--muted);
font-size: 0.9rem;
}
.empty-state {
display: flex;
flex-direction: column;
gap: 16px;
align-items: flex-start;
padding: 32px;
border-radius: var(--radius);
background: var(--bg-elevated);
box-shadow: var(--shadow);
max-width: 520px;
}
.empty-state__title {
font-size: 1.6rem;
}
.empty-state__subtitle {
color: var(--muted);
}
@media (max-width: 900px) {
body {
height: auto;
overflow: auto;
}
#root {
height: auto;
}
.app {
grid-template-columns: 1fr;
height: auto;
}
.sidebar {
border-right: none;
border-bottom: 1px solid var(--border);
height: auto;
}
.workspace {
padding: 20px;
height: auto;
overflow: visible;
}
.workspace__content {
height: auto;
}
.workspace__content--history {
grid-template-columns: 1fr;
}
.editor {
height: auto;
}
.history {
height: auto;
}
}
.settings-overlay {
position: fixed;
inset: 0;
display: grid;
place-items: center;
z-index: 30;
}
.settings-overlay__backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.45);
}
.settings-panel {
position: relative;
z-index: 1;
width: min(420px, 92vw);
padding: 20px;
border-radius: 16px;
background: var(--bg-elevated);
border: 1px solid var(--border);
box-shadow: var(--shadow);
display: flex;
flex-direction: column;
gap: 16px;
}
.settings-panel__header {
display: flex;
align-items: center;
justify-content: space-between;
}
.settings-panel__title {
font-size: 1.1rem;
}
.settings-panel__section {
display: flex;
flex-direction: column;
gap: 8px;
}
.settings-panel__label {
font-size: 0.9rem;
color: var(--muted);
}
.settings-panel__select {
border-radius: 10px;
border: 1px solid var(--border);
background: var(--bg-input);
color: var(--ink);
padding: 8px 10px;
font-size: 0.95rem;
}
.settings-panel__slider-row {
display: flex;
align-items: center;
gap: 12px;
}
.settings-panel__range {
flex: 1;
}
.settings-panel__value {
min-width: 44px;
text-align: right;
color: var(--muted);
font-size: 0.9rem;
}
2026-01-31 12:59:03 +01:00
body[data-theme="light"] .editor__textarea-wrap:focus-within {
border-color: var(--accent-strong);
}
2026-01-31 12:59:03 +01:00
.settings-panel__section--row {
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.settings-panel__section--row .settings-panel__label {
margin: 0;
}
@media print {
body.print-markdown {
--bg: #ffffff;
--bg-elevated: #ffffff;
--panel: #ffffff;
--ink: #111111;
--muted: #444444;
--border: #dddddd;
--bg-input: #ffffff;
--bg-contrast: #f5f5f5;
--bg-contrast-strong: #eeeeee;
background: #ffffff;
color: #111111;
}
body.print-markdown .app {
display: block;
height: auto;
}
body.print-markdown .sidebar,
body.print-markdown .history,
body.print-markdown .editor__header,
body.print-markdown .editor__footer,
body.print-markdown .line-numbers,
body.print-markdown .line-measure {
display: none !important;
}
body.print-markdown .workspace__content {
grid-template-columns: 1fr;
gap: 0;
}
body.print-markdown .editor__textarea-wrap {
border-color: transparent;
background: transparent;
overflow: visible;
}
body.print-markdown .markdown-preview {
padding: 32px 36px;
overflow: visible;
}
body.print-markdown .md-codeblock__copy,
body.print-markdown .md-icon-external {
display: none !important;
}
}