Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

/p/nym-moultest123/mdlist/v0

Directory · 4 Files
README.md Open

gno.land/p/nym-moultest123/mdlist

🧪 Proof of concept. It explores a composable-UI idea rather than offering a settled API.

The idea: a realm should describe its data once and choose the presentation at Render time, instead of building a different string for each layout.

1entries := mdlist.Entries{
2	{Title: "First", Body: "Some text", Link: "/r/x:1"},
3	{Title: "Second", Body: "More text", Link: "/r/x:2"},
4}
5
6out := entries.BulletList()       // or NumberedList, Paragraphs, Columns
method output
BulletList() - **Title** body
NumberedList() 1. **Title** body
Paragraphs() bold title, then the body as a paragraph
Columns() a grid
BulletListTruncated(t, b) as above, title and body cut to t / b runes
NumberedListTruncated(t, b) same

One Entries value, six renderings. A realm that stores its data as Entries can switch layout from a query parameter, and a caller embedding that realm's list can pick the shape that fits its own page.

Truncation takes explicit limits rather than guessing, because the right cut depends on where the list is being embedded.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

Dependency graph:

gno.land/p/nym-moultest123/mdlist/v0 dependency graph

⚠️ Disclaimer: provided as-is, without warranty; not security-audited. Full disclaimer: DISCLAIMER.