new functions

This commit is contained in:
Mateusz Gruszczyński
2026-07-21 23:58:01 +02:00
parent fd2641780b
commit fa8a0d687f
18 changed files with 478 additions and 79 deletions
+71
View File
@@ -398,3 +398,74 @@ dialog::backdrop { background: rgba(4,6,9,.82); }
.note-delete-button:disabled { cursor: not-allowed; color: var(--muted-2); opacity: .55; }
.notes-view-switch button { cursor: pointer; }
.notes-view-switch button.active { cursor: default; }
/* Preview editing and source line numbers. */
.preview { padding: 12px 24px 12px 62px; line-height: 1.32; }
.preview-source-line { position: relative; min-height: 1.32em; }
.preview-source-line::before { content: attr(data-source-line); position: absolute; right: calc(100% + 18px); width: 32px; color: #596270; text-align: right; font: 400 .72rem/1.32 ui-monospace, SFMono-Regular, Consolas, monospace; user-select: none; }
.preview-editable { border-radius: 4px; outline: none; cursor: text; }
.preview-editable:hover { background: rgba(255,255,255,.025); }
.preview-editable:focus { background: rgba(124,104,238,.08); box-shadow: 0 0 0 1px rgba(124,104,238,.25); }
.markdown-body p { margin: .18em 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { margin: .48em 0 .18em; }
.markdown-body blockquote { margin: .3em 0; }
.markdown-body ul, .markdown-body ol { margin: .22em 0; }
.compact-editor .preview { line-height: 1.24; }
.hide-line-numbers .preview { padding-left: 24px; }
.hide-line-numbers .preview-source-line::before { display: none; }
/* Extended Markdown */
.markdown-body .table-wrap { overflow-x: auto; margin: .7em 0; }
.markdown-body table { width: 100%; border-collapse: collapse; }
.markdown-body th, .markdown-body td { padding: .55em .7em; border: 1px solid var(--border); vertical-align: top; }
.markdown-body th { background: var(--surface-2); color: var(--text); }
.markdown-body mark { padding: .05em .18em; border-radius: 3px; background: #6d5b16; color: #fff2a8; }
.markdown-body sub, .markdown-body sup { line-height: 0; }
.markdown-body dl { margin: .7em 0; }
.markdown-body dt { font-weight: 750; }
.markdown-body dd { margin: .25em 0 .65em 1.5em; color: #b9c2cf; }
.markdown-body .task-list{margin:0;padding:0;list-style:none}
.markdown-body .task-list-item{position:relative;display:grid;grid-template-columns:1em minmax(0,1fr);grid-template-rows:1.32em;column-gap:.45em;align-items:center;min-height:1.32em;margin:0;padding:0;line-height:1.32}
.markdown-body .task-list-item::before{position:absolute;top:0;right:calc(100% + 18px);width:32px;height:1.32em;line-height:1.32em;transform:none}
.markdown-body .task-checkbox{grid-column:1;grid-row:1;width:1em;height:1em;margin:0;align-self:center;accent-color:var(--accent);cursor:pointer}
.markdown-body .task-list-item>span{grid-column:2;grid-row:1;display:block;min-width:0;margin:0;padding:0;line-height:1.32}
.hide-line-numbers .markdown-body .task-list-item::before{display:none}
.compact-editor .markdown-body .task-list-item{grid-template-rows:1.24em;min-height:1.24em;line-height:1.24}
.compact-editor .markdown-body .task-list-item::before,.compact-editor .markdown-body .task-list-item>span{height:1.24em;line-height:1.24}
.markdown-body .task-list-item>span{min-width:0}
.markdown-body .footnotes { margin-top: 1.5em; color: var(--muted); font-size: .88em; }
.markdown-body .footnotes ol { padding-left: 1.5em; }
.markdown-body .footnote-backref { text-decoration: none; }
.shortcuts-panel { width: 100%; }
.shortcut-grid { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; align-items: center; }
.shortcut-grid kbd { padding: 5px 8px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: #0d1015; color: #e6eaf0; font: 600 .76rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.shortcut-grid span { color: #c3cad4; font-size: .82rem; }
@media (max-width: 520px) {
.shortcut-grid { grid-template-columns: 1fr; gap: 5px; }
.shortcut-grid span { margin-bottom: 7px; }
}
.footer-left, .footer-right { display:flex; align-items:center; gap:6px; min-width:0; }
.footer-status.status { min-height:0; padding:0; font-size:inherit; }
.markdown-more { position:relative; }
.markdown-more > summary { display:flex; align-items:center; min-height:34px; padding:0 9px; border:1px solid transparent; border-radius:7px; color:#b8c0cc; font-size:.78rem; list-style:none; cursor:pointer; }
.markdown-more > summary::-webkit-details-marker { display:none; }
.markdown-more > summary:hover, .markdown-more[open] > summary { border-color:var(--border); background:var(--surface-2); color:white; }
.markdown-more-menu { position:absolute; top:calc(100% + 8px); left:0; z-index:30; display:grid; grid-template-columns:repeat(2,minmax(120px,1fr)); gap:4px; width:290px; padding:8px; border:1px solid var(--border-strong); border-radius:9px; background:#11151c; box-shadow:0 14px 40px rgba(0,0,0,.4); }
.editor-toolbar .markdown-more-menu button { justify-content:flex-start; text-align:left; }
.hljs { color:#d7dae0; }
.hljs-keyword,.hljs-selector-tag,.hljs-literal { color:#c792ea; }
.hljs-string,.hljs-attr { color:#c3e88d; }
.hljs-number,.hljs-symbol { color:#f78c6c; }
.hljs-comment { color:#697383; font-style:italic; }
.public-content .task-checkbox { pointer-events:auto; }
@media (max-width:720px){.footer-left,.footer-right{flex-wrap:wrap}.markdown-more-menu{position:fixed;left:12px;right:12px;top:auto;bottom:58px;width:auto;}}
.public-task-toggle { display:inline-flex; align-items:center; gap:7px; color:var(--muted); font-size:.76rem; white-space:nowrap; }
.public-task-toggle input { width:15px; min-height:15px; height:15px; margin:0; accent-color:var(--accent); }
.public-page .preview-source-line { cursor:default; }
.public-page .task-checkbox:not(:disabled) { cursor:pointer; }
.public-page .task-checkbox:disabled { cursor:not-allowed; opacity:.55; }