mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-28 15:46:33 +00:00
20 lines
425 B
Nim
20 lines
425 B
Nim
|
import
|
||
|
karax/vdom
|
||
|
|
||
|
type
|
||
|
SectionRenderer* = proc(): VNode
|
||
|
|
||
|
Section* = object
|
||
|
title*: cstring
|
||
|
content*: SectionRenderer
|
||
|
|
||
|
when defined(createChroniclesTail):
|
||
|
var
|
||
|
sections* = newSeq[Section](0)
|
||
|
|
||
|
proc addSection*(title: cstring, content: SectionRenderer) {.exportc.} =
|
||
|
sections.add Section(title: title, content: content)
|
||
|
else:
|
||
|
proc addSection*(title: cstring, content: SectionRenderer) {.importc.}
|
||
|
|