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.

v0 source realm

Readme View source

gno.land/r/nym-moultest123/present

An on-chain slide deck: store a Markdown presentation, then read it back either as one page or one slide at a time.

1func Set(cur realm, slug, title, event, author, date, content string) string
2func Delete(cur realm, slug string) string

Both are owner-gated through p/nt/ownable. Set is an upsert: same slug, new content.

Routes

path view
"" index of every presentation
<slug> the whole deck on one page
<slug>/slides slide 1
<slug>/slides?page=N slide N

Slides are split on ## headings, so the deck is authored as ordinary Markdown and needs no slide markup. Path parsing goes through p/moul/realmpath, so the navigation links are built from the request rather than hardcoded.

Presentations are indexed twice, by seqid and by slug, which is what lets the index be listed in insertion order while URLs stay readable.

A demo presentation is seeded at deploy time by present_init.gno.


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

On mainnet: deployment status transactions unique callers deployed revision

Dependency graph:

gno.land/r/nym-moultest123/present/v0 dependency graph

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

Variables 1

Functions 3

func Delete

crossing Action
1func Delete(cur realm, slug string) string
source

Delete removes a presentation

func Render

1func Render(path string) string
source

Render handles the realm's rendering logic

func Set

crossing Action
1func Set(cur realm, slug, title, event, author, date, content string) string
source

Set adds or updates a presentation

Types 1

type Presentation

struct
 1type Presentation struct {
 2	id        string
 3	Slug      string
 4	Title     string
 5	Event     string
 6	Author    string
 7	Uploader  address
 8	Date      time.Time
 9	Content   string
10	EditDate  time.Time
11	NumSlides int
12}
source

Methods on Presentation

func FirstSlide

method on Presentation
1func (p *Presentation) FirstSlide() string
source

func LastSlide

method on Presentation
1func (p *Presentation) LastSlide() string
source

Dependencies

Source Files 5