Skip to content

Commit 6ada50e

Browse files
committed
Display notes in block mode, add dummy new-note control
1 parent 1dc0711 commit 6ada50e

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

tiddlers/$__supp-info_notes_content.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"Another note, just to prove I can."
55
],
66
"Quick Start": [
7-
"And a note on another tiddler"
7+
"And a note on another tiddler, with a [[link|Hard and Soft Links]] just for demo."
88
]
99
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
created: 20251107151758434
2-
modified: 20251107152250615
2+
modified: 20251107173841789
33
tags: $:/tags/SupplementaryInfo
44
title: $:/supp-info/notes/content
55
type: application/json

tiddlers/$__supp-info_notes_view-template.tid

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
11
created: 20251107152410791
2-
modified: 20251107173101719
2+
modified: 20251107204927451
33
tags: $:/tags/ViewTemplate
44
title: $:/supp-info/notes/view-template
55
type: text/vnd.tiddlywiki
66

7+
\procedure add-note()
8+
<$action-log clicked=<<now>> />
9+
\end add-note
10+
711
<% if [{$:/supp-info/notes/content}jsonget<currentTiddler>] %>
812
<div class="supp-notes">
913
<$let count={{{ [{$:/supp-info/notes/content}jsonindexes<currentTiddler>last[]add[1]] }}}>
1014

1115
<details open>
12-
<summary><<count>> Note(s)</summary>
16+
<summary>
17+
<<count>> Note(s)
18+
<span class="controls">
19+
<$button actions=<<add-note>> ><span class="icon">{{$:/core/images/new-button}}</span></$button>
20+
</span>
21+
</summary>
1322
<div class="note-list">
1423
<$list filter="[{$:/supp-info/notes/content}jsonindexes<currentTiddler>]" variable="index">
15-
<div class="note"><$text text={{{ [{$:/supp-info/notes/content}jsonget<currentTiddler>,<index>] }}}/></div>
24+
<div class="note">
25+
<$wikify name="note" text={{{ [{$:/supp-info/notes/content}jsonget<currentTiddler>,<index>] }}} output="html"><<note>></$wikify>
26+
</div>
1627
</$list>
1728
</div>
1829
</details>
@@ -25,6 +36,11 @@ type: text/vnd.tiddlywiki
2536
div.debug {background: red; color: white; font-weight: bold; font-size: 150%;}
2637
background-color: #ffc;
2738
padding: 0;
39+
.controls {
40+
display: inline-block;
41+
margin-left: 1em;
42+
svg {width: 1em; height: 1em; vertical-align: middle;}
43+
}
2844
summary {background-color: #996; color: white; padding: .5em; font-weight: bold;}
2945
.note-list {padding: .5em;}
3046
.note {border: 1px solid #ccc; padding: .25em; margin-top: .5em; &>:first-child {margin-top: 0;}}

0 commit comments

Comments
 (0)