From 131c6133ba7901672eaae2036d44f6a53a681dc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Wed, 3 Jun 2026 22:22:29 +0200 Subject: [PATCH 01/79] Fixed path in logo small --- static/images/logo_small.svg | 30 ++++++++++++++++++------------ static/js/tree.mjs | 1 + 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/static/images/logo_small.svg b/static/images/logo_small.svg index cb83d39..47eabde 100644 --- a/static/images/logo_small.svg +++ b/static/images/logo_small.svg @@ -7,7 +7,7 @@ viewBox="0 0 7.5652731 5.2916666" version="1.1" id="svg1" - inkscape:version="1.4.4 (dcaf3e7d9e, 2026-05-05)" + inkscape:version="1.4.2 (ebf0e94, 2025-05-08)" sodipodi:docname="logo_small.svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" @@ -23,13 +23,13 @@ inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1" inkscape:document-units="px" - inkscape:zoom="16.477217" - inkscape:cx="48.460855" - inkscape:cy="5.2193281" - inkscape:window-width="2190" - inkscape:window-height="1401" - inkscape:window-x="1463" - inkscape:window-y="18" + inkscape:zoom="8.2386085" + inkscape:cx="48.491198" + inkscape:cy="5.219328" + inkscape:window-width="1916" + inkscape:window-height="1161" + inkscape:window-x="0" + inkscape:window-y="0" inkscape:window-maximized="1" inkscape:current-layer="layer1" /> + N2 + y="213.81186">N2 diff --git a/static/js/tree.mjs b/static/js/tree.mjs index 04555f6..fc861e4 100644 --- a/static/js/tree.mjs +++ b/static/js/tree.mjs @@ -68,6 +68,7 @@ export class N2Tree extends CustomHTMLElement { font-size: 1.25em; font-weight: bold; cursor: pointer; + margin-left: 16px; } } From 44ee1ac94b3c01e0eae0995d5383c576b1651fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Thu, 4 Jun 2026 07:47:27 +0200 Subject: [PATCH 02/79] Design changes --- static/css/notes2.css | 36 ++++----------------------------- static/js/tree.mjs | 47 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 33 deletions(-) diff --git a/static/css/notes2.css b/static/css/notes2.css index a2dbc11..5a3e0dd 100644 --- a/static/css/notes2.css +++ b/static/css/notes2.css @@ -10,6 +10,7 @@ */ --colorize: invert(59%) sepia(71%) saturate(3270%) hue-rotate(327deg) brightness(100%) contrast(99%); + --line-color: #ccc; --tree-expander: 0px; --functions-width: 150px; } @@ -111,7 +112,7 @@ html { color: #333; background-color: #eee; font-weight: bold; - border-right: 2px solid #ddd; + border-right: 1px solid var(--line-color); display: grid; justify-items: center; @@ -127,6 +128,7 @@ html { } } + #tree { grid-area: tree; display: grid; @@ -134,33 +136,7 @@ html { color: #444; z-index: 100; - border-right: 2px solid #ddd; - - #logo { - display: grid; - grid-template-columns: min-content 1fr min-content; - align-items: center; - justify-items: start; - cursor: pointer; - padding: 16px; - border-bottom: 1px solid #ccc; - - .el-search { - justify-self: end; - } - - img:first-child { - height: 24px; - margin-right: 8px; - } - } - - .icons { - display: flex; - justify-content: center; - margin: 16px 0px 32px 0px; - gap: 8px; - } + border-right: 1px solid var(--line-color); n2-tree { .el-treenodes { @@ -168,10 +144,6 @@ html { } } - &:focus-within { - n2-tree {} - } - .node { display: grid; grid-template-columns: 40px min-content; diff --git a/static/js/tree.mjs b/static/js/tree.mjs index fc861e4..397dfc9 100644 --- a/static/js/tree.mjs +++ b/static/js/tree.mjs @@ -64,16 +64,61 @@ export class N2Tree extends CustomHTMLElement { this.tmpl.innerHTML = ` +
From 12f8c019f0bd0110bc8097685a6be1660af37b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Thu, 4 Jun 2026 08:42:54 +0200 Subject: [PATCH 03/79] Small UI changes --- static/css/notes2.css | 4 ++++ static/images/leaf.svg | 20 +++++++++------- static/js/app.mjs | 1 - static/js/page_node.mjs | 6 ++--- static/js/tree.mjs | 51 ++++++++++++++++++++++------------------- 5 files changed, 47 insertions(+), 35 deletions(-) diff --git a/static/css/notes2.css b/static/css/notes2.css index 5a3e0dd..e1a6972 100644 --- a/static/css/notes2.css +++ b/static/css/notes2.css @@ -199,6 +199,10 @@ html { #main-page { display: contents; + &:focus-within { + background-color: #faf; + } + &.node { #page-node { display: contents; diff --git a/static/images/leaf.svg b/static/images/leaf.svg index 306a2a0..9d200c3 100644 --- a/static/images/leaf.svg +++ b/static/images/leaf.svg @@ -8,7 +8,7 @@ version="1.1" id="svg1" sodipodi:docname="leaf.svg" - inkscape:version="1.4.2 (ebf0e94, 2025-05-08)" + inkscape:version="1.4.4 (dcaf3e7d9e, 2026-05-05)" xml:space="preserve" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" @@ -23,13 +23,13 @@ inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1" inkscape:document-units="px" - inkscape:zoom="11.17754" - inkscape:cx="8.0965937" - inkscape:cy="22.903072" - inkscape:window-width="1916" - inkscape:window-height="1161" - inkscape:window-x="0" - inkscape:window-y="18" + inkscape:zoom="31.614857" + inkscape:cx="5.0609117" + inkscape:cy="9.5524708" + inkscape:window-width="2190" + inkscape:window-height="1401" + inkscape:window-x="1463" + inkscape:window-y="0" inkscape:window-maximized="1" inkscape:current-layer="layer1" showgrid="false" />folder-open-outlinenotebook-outlinetext-box-outline_mbus.dispatch('SHOW_PAGE', { page: 'history' })) + this.elIconHistory.addEventListener('click', () => _mbus.dispatch('SHOW_PAGE', { page: 'history' })) this.showMarkdown(true) }// }}} @@ -106,9 +106,9 @@ export class N2PageNodeUI extends CustomHTMLElement { }// }}} takeFocus() {// {{{ if (this.showMarkdown()) { - this.elNodeMarkdown.focus() + this.elNodeMarkdown.focus({ preventScroll: true }) } else - this.elNodeContent.focus() + this.elNodeContent.focus({ preventScroll: true }) }// }}} contentChanged(event) {//{{{ diff --git a/static/js/tree.mjs b/static/js/tree.mjs index 397dfc9..4e92021 100644 --- a/static/js/tree.mjs +++ b/static/js/tree.mjs @@ -64,8 +64,6 @@ export class N2Tree extends CustomHTMLElement { this.tmpl.innerHTML = ` -