diff --git a/static/css/markdown.css b/static/css/markdown.css index bd68c7b..e29ec9e 100644 --- a/static/css/markdown.css +++ b/static/css/markdown.css @@ -1,26 +1,10 @@ .el-node-markdown { padding-top: 16px; - .heading-container { - display: grid; - grid-template-columns: min-content 1fr; - grid-gap: 16px; - white-space: nowrap; - align-items: center; - margin-top: 32px; - margin-bottom: 8px; - - &:first-child { - margin-top: 32px; - } - - .line { - border-bottom: 1px solid var(--line-color); - } - } - h1 { border-bottom: 1px solid #ccc; + margin-top: 32px; + margin-bottom: 8px; display: inline-block; font-size: 1.25em; @@ -30,33 +14,24 @@ background-color: var(--color1); padding: 4px 12px; - margin-top: 0px; - margin-bottom: 0px; - + &:first-child { + margin-top: 32px; + } } h2 { font-size: 1.25em; - margin-top: 0px; + margin-top: 32px; margin-bottom: 0px; color: var(--color1); } - h2+.line, - h3+.line { - border-bottom: none !important; - } - h3:before { font-size: 1.0em; content: "> "; color: var(--color1); } - a { - color: var(--color1); - } - p { line-height: 150%; } diff --git a/static/css/notes2.css b/static/css/notes2.css index 9805b82..b4d7e02 100644 --- a/static/css/notes2.css +++ b/static/css/notes2.css @@ -307,28 +307,65 @@ button { } n2-syncprogress { - position: absolute; - top: 16px; - right: 16px; - padding: 8px 16px; - z-index: 16384; - border-radius: 6px; - font-weight: bold; - background-color: var(--color1); - color: #fff; + --radius: 8px; display: grid; - grid-template-columns: min-content repeat(3, min-content); - grid-gap: 8px 8px; - white-space: nowrap; + grid-area: sync; + display: grid; + justify-items: center; align-items: center; - justify-items: end; - img { - grid-row: 1/3; - height: 34px; - margin-right: 8px; + position: relative; + + opacity: 0; + transition: height 0s 500ms, opacity 500ms linear, visibility 0s 500ms; + + &.show { + opacity: 1; + transition: visibility, height 0s, opacity 500ms linear; } + + progress { + width: 100%; + height: 24px; + border-radius: 8px; + } + + .count { + position: absolute; + top: 16px; + width: 100%; + white-space: nowrap; + color: #888; + text-align: center; + font-size: 12pt; + font-weight: bold; + } + + progress[value]::-webkit-progress-bar { + background-color: #eee; + box-shadow: 0 2px var(--radius) rgba(0, 0, 0, 0.25) inset; + border-radius: var(--radius); + } + + progress[value]::-moz-progress-bar { + background-color: #eee; + box-shadow: 0 2px var(--radius) rgba(0, 0, 0, 0.25) inset; + border-radius: var(--radius); + } + + progress[value]::-webkit-progress-value { + background: rgb(186, 95, 89); + background: linear-gradient(180deg, rgba(186, 95, 89, 1) 0%, rgba(254, 95, 85, 1) 50%, rgba(186, 95, 89, 1) 100%); + border-radius: var(--radius); + } + + progress[value]::-moz-progress-value { + background: rgb(186, 95, 89); + background: linear-gradient(180deg, rgba(186, 95, 89, 1) 0%, rgba(254, 95, 85, 1) 50%, rgba(186, 95, 89, 1) 100%); + border-radius: var(--radius); + } + } /* ============================================================= */ diff --git a/static/images/icon_transfer.svg b/static/images/icon_transfer.svg deleted file mode 100644 index 59c900e..0000000 --- a/static/images/icon_transfer.svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - file-arrow-up-down-outline - - - diff --git a/static/js/app.mjs b/static/js/app.mjs index 38aebd4..688b476 100644 --- a/static/js/app.mjs +++ b/static/js/app.mjs @@ -199,7 +199,6 @@ export class App { _mbus.dispatch('NODE_UI_OPEN', node) _mbus.dispatch('TREE_EXPANSION', { expand: false, when: 'narrow' }) _mbus.dispatch('NODE_UNMODIFIED') - _mbus.dispatch('SHOW_PAGE', { page: 'node' }) }//}}} pageIsVisible(page) {// {{{ let classList = document.querySelector('#main-page').classList diff --git a/static/js/marked_position.mjs b/static/js/marked_position.mjs index 175f490..62a6996 100644 --- a/static/js/marked_position.mjs +++ b/static/js/marked_position.mjs @@ -114,12 +114,7 @@ export class MarkedPosition { renderer: { heading(token) { const content = this.parser.parseInline(token.tokens) - return ` -
- ${content}\n -
\n -
- ` + return `${content}\n` }, paragraph(token) { diff --git a/static/js/sidebar.mjs b/static/js/sidebar.mjs index da05750..285fd44 100644 --- a/static/js/sidebar.mjs +++ b/static/js/sidebar.mjs @@ -346,8 +346,7 @@ export class N2Sidebar extends CustomHTMLElement { } if (siblingBefore !== null && siblingExpanded && siblingBefore.hasChildren()) { - const nodeVisuallyAbove = this.getLastExpandedNode(siblingBefore) - _mbus.dispatch("GO_TO_NODE", { nodeUUID: nodeVisuallyAbove.UUID, dontPush: false, dontExpand: true }) + _mbus.dispatch("GO_TO_NODE", { nodeUUID: siblingBefore.Children[siblingBefore.Children.length - 1]?.UUID, dontPush: false, dontExpand: true }) return } diff --git a/static/js/sync.mjs b/static/js/sync.mjs index 47777f5..291e0b9 100644 --- a/static/js/sync.mjs +++ b/static/js/sync.mjs @@ -166,9 +166,8 @@ export class N2SyncProgress extends CustomHTMLElement { static {// {{{ this.tmpl = document.createElement('template') this.tmpl.innerHTML = ` - -
0
/
0
-
0
/
0
+ +
0 / 0
` }// }}} constructor() {//{{{ @@ -212,8 +211,9 @@ export class N2SyncProgress extends CustomHTMLElement { this.render() }//}}} render() {//{{{ - this.elDownloadTransferred.innerText = this.state.nodesSynced - this.elDownloadTotal.innerText = this.state.nodesToSync + this.elProgress.max = this.state.nodesToSync + this.elProgress.value = this.state.nodesSynced + this.elCount.innerText = `${this.state.nodesSynced} / ${this.state.nodesToSync}` }//}}} setSyncState(state) {// {{{ if (state) diff --git a/views/pages/notes2.gotmpl b/views/pages/notes2.gotmpl index 422b672..1142eda 100644 --- a/views/pages/notes2.gotmpl +++ b/views/pages/notes2.gotmpl @@ -22,8 +22,6 @@ - -