Compare commits

...

3 Commits

Author SHA1 Message Date
Magnus Åhall
5c27f9ed1c Bumped to v20 2024-01-09 18:03:30 +01:00
Magnus Åhall
d3bc5e3f7f Modified Alt+Shift+S to also save node properties 2024-01-09 18:03:12 +01:00
Magnus Åhall
8768ab1692 Added highlight to markdown code. Added markdown icon to differentiate against markdown on/off. 2024-01-09 17:58:41 +01:00
5 changed files with 79 additions and 4 deletions

View File

@ -320,6 +320,16 @@ header .menu {
border: 1px solid #ddd;
padding: 4px 8px;
}
#markdown code {
background: #e6eeee;
padding: 4px;
border-radius: 4px;
}
#markdown pre > code {
background: unset;
padding: 0px;
border-radius: 0px;
}
/* ============================================================= *
* Textarea replicates the height of an element expanding height *
* ============================================================= */

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="128"
width="208"
viewBox="-31.2 -32 208 128"
version="1.1"
id="svg1"
sodipodi:docname="markdown-hollow.svg"
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="5.6568542"
inkscape:cx="109.68994"
inkscape:cy="68.942911"
inkscape:window-width="1916"
inkscape:window-height="1404"
inkscape:window-x="1280"
inkscape:window-y="16"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<rect
fill="none"
stroke-width="10"
stroke="#000000"
ry="10"
y="-27"
x="-26.200001"
height="118"
width="198"
id="rect1"
style="stroke:#ffffff;stroke-opacity:1" />
<path
d="M -1.2000003,66 V -2 H 18.8 l 20,25 20,-25 h 20 v 68 h -20 V 27 l -20,25 -20,-25 V 66 Z M 123.8,66 93.8,33 h 20 V -2 h 20 v 35 h 20 z"
id="path1"
style="fill:#ffffff;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -12,6 +12,7 @@ export class NodeUI extends Component {
this.menu = signal(false)
this.node = signal(null)
this.nodeContent = createRef()
this.nodeProperties = createRef()
this.keys = signal([])
this.page = signal('node')
@ -80,7 +81,7 @@ export class NodeUI extends Component {
break
case 'node-properties':
page = html`<${NodeProperties} nodeui=${this} />`
page = html`<${NodeProperties} ref=${this.nodeProperties} nodeui=${this} />`
break
case 'keys':
@ -105,7 +106,7 @@ export class NodeUI extends Component {
<header class="${modified}" onclick=${() => this.saveNode()}>
<div class="tree"><img src="/images/${window._VERSION}/tree.svg" onclick=${() => document.getElementById('app').classList.toggle('toggle-tree')} /></div>
<div class="name">Notes</div>
<div class="markdown" onclick=${evt => { evt.stopPropagation(); this.toggleMarkdown() }}><img src="/images/${window._VERSION}/markdown.svg" /></div>
<div class="markdown" onclick=${evt => { evt.stopPropagation(); this.toggleMarkdown() }}><img src="/images/${window._VERSION}/${node.RenderMarkdown.value ? 'markdown.svg' : 'markdown-hollow.svg'}" /></div>
<div class="search" onclick=${evt => { evt.stopPropagation(); this.showPage('search') }}><img src="/images/${window._VERSION}/search.svg" /></div>
<div class="add" onclick=${evt => this.createNode(evt)}><img src="/images/${window._VERSION}/add.svg" /></div>
<div class="keys" onclick=${evt => { evt.stopPropagation(); this.showPage('keys') }}><img src="/images/${window._VERSION}/padlock.svg" /></div>
@ -160,7 +161,10 @@ export class NodeUI extends Component {
break
case 'S':
if (this.page.value == 'node')
this.saveNode()
else if (this.page.value == 'node-properties')
this.nodeProperties.current.save()
break
case 'U':

View File

@ -365,6 +365,18 @@ header {
padding: 4px 8px;
}
}
code {
background: #e6eeee;
padding: 4px;
border-radius: 4px;
}
pre > code {
background: unset;
padding: 0px;
border-radius: 0px;
}
}
/* ============================================================= *

View File

@ -1 +1 @@
v19
v20