diff --git a/static/css/notes2.css b/static/css/notes2.css index 7c7c224..f44c24a 100644 --- a/static/css/notes2.css +++ b/static/css/notes2.css @@ -19,10 +19,14 @@ html { } #tree { grid-area: tree; - padding: 16px; + padding: 16px 32px; background-color: #333; color: #ddd; z-index: 100; + border-left: 2px solid #333; +} +#tree:focus { + border-left: 2px solid #FE5F55; } #tree #logo { display: grid; @@ -188,7 +192,6 @@ html { max-width: 900px; white-space: pre-wrap; word-wrap: break-word; - color: #f0f; background: rgba(0, 255, 255, 0.5); justify-self: center; /* Hidden from view, clicks, and screen readers */ diff --git a/static/js/node.mjs b/static/js/node.mjs index 8648057..9433f72 100644 --- a/static/js/node.mjs +++ b/static/js/node.mjs @@ -205,12 +205,15 @@ export class NodeUI extends Component { // All keybindings is Alt+Shift, since the popular browsers at the time (2023) allows to override thees. // Ctrl+S is the exception to using Alt+Shift, since it is overridable and in such widespread use for saving. // Thus, the exception is acceptable to consequent use of alt+shift. - if (!(evt.shiftKey && evt.altKey) && !(evt.key.toUpperCase() == 'S' && evt.ctrlKey)) + if (!(evt.shiftKey && evt.altKey) && !(evt.key.toUpperCase() === 'S' && evt.ctrlKey)) return switch (evt.key.toUpperCase()) { case 'T': - _notes2.current.tree.treeDiv.current?.focus() + if (document.activeElement.id === 'tree') + document.getElementById('node-content').focus() + else + document.getElementById('tree').focus() break /* case 'C': @@ -260,7 +263,6 @@ export class NodeUI extends Component { evt.stopPropagation() } }//}}} - } class NodeContent extends Component { diff --git a/static/less/notes2.less b/static/less/notes2.less index a2c0f81..3593011 100644 --- a/static/less/notes2.less +++ b/static/less/notes2.less @@ -48,13 +48,14 @@ html { #tree { grid-area: tree; - padding: 16px; + padding: 16px 32px; background-color: #333; color: #ddd; z-index: 100; // Over crumbs shadow + border-left: 2px solid #333; &:focus { - //background-color: #f0f; + border-left: 2px solid #FE5F55; } #logo { @@ -256,7 +257,6 @@ html { max-width: 900px; white-space: pre-wrap; word-wrap: break-word; - color: #f0f; background: rgba(0, 255, 255, 0.5); justify-self: center;