wip
This commit is contained in:
parent
a1a6d7cff8
commit
1b5d007289
5 changed files with 43 additions and 6 deletions
|
@ -1,10 +1,22 @@
|
|||
#let todo-list = state("todo-list",())
|
||||
#let show-todos = state("show-todos", true)
|
||||
|
||||
#let todo(done: false, content) = context {
|
||||
if (not done) and (show-todos.get()) {
|
||||
#let todo(color: red, content) = context {
|
||||
if show-todos.get() {
|
||||
let todonum = todo-list.get().len() + 1
|
||||
text(weight: "bold", fill: red, [TODO n°#todonum #label("todo-"+str(todonum)): #content])
|
||||
|
||||
box(
|
||||
text(font: "DejaVu Sans Mono", white, size: .5em)[
|
||||
TODO #todonum #label("todo-"+str(todonum))
|
||||
],
|
||||
inset: 3pt, fill: color,
|
||||
)
|
||||
text(weight: "bold", fill: color)[
|
||||
#box(text($triangle.filled.r$, size: .8em), baseline: -.8mm)
|
||||
_ #content _
|
||||
#box(text($triangle.filled.l$, size: .8em), baseline: -.8mm)
|
||||
]
|
||||
|
||||
todo-list.update(x => x + (("todo-"+str(x.len()+1),x.len()+1, content),))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue