func Delete
crossing ActionDelete removes one section. Only the admin can call it.
name is the section to remove, "talks" for example. Its name can stay in "order": a name with no section shows nothing.
Package home is David G.'s profile page on gno.land.
Package home is David G.'s profile page on gno.land.
gnoweb renders a profile by calling Render("") on the realm at exactly /r/<address>/home, so this path carries no /vN suffix.
The page is a list of sections, each a markdown body the owner edits with one Set transaction, so changing the text never needs a redeploy. The slot named "order" lists the sections to show. Six sections are drawn rather than stored: "hero", the page banner, "banner" and "reviews", the activity charts, "areachart", the ring of pull requests by area, "game", today's Gnordle, and "hearts", the heart count and wall.
Delete removes one section. Only the admin can call it.
name is the section to remove, "talks" for example. Its name can stay in "order": a name with no section shows nothing.
Get returns a section's markdown, or "" when it does not exist. Get("order") returns the current section list, the one to edit before setting "order".
HasHeart reports whether addr already sent a heart.
Heart records one heart from the caller. Each address can send exactly one.
Hearts returns how many distinct addresses sent a heart.
Set writes one section of the page. Only the admin can call it.
name is the section to write and body is its markdown. The text sections are "header", the bio at the top, then "gno", "projects", "peerdev" and "unrelated"; any other name creates a new section.
name "order" decides which sections show and in which order. Its body lists every section name, comma separated, with no spaces. A name left out of the list is hidden, so copy the current list, from Get("order"), and edit it.
name "herotext" is the banner's text: "key value" pairs split by ";", with the keys kicker, the small line on top, title, subtitle, tagline, footline, the small line at the bottom, and alt, the banner's description for screen readers. A key left out keeps its current default.
"hero", "banner", "reviews", "areachart", "game" and "hearts" are drawn by the page itself: they cannot be set, only placed through "order".
Examples, as the two fields of the form:
1name: header
2body: I'm a developer engineer at [Samouraï Coop](https://www.samourai.world/).
3
4name: herotext
5body: title David G.; subtitle Developer engineer at Samouraï Coop; footline Open for contribution
6
7name: talks
8body: ## Talks
9
10name: order
11body: hero,header,activityhead,banner,reviews,gno,areachart,projects,peerdev,unrelated,talks,game,hearts
SetActivity refreshes the three charts in one transaction. Only the admin can call it. Its three arguments are the bodies of the "activity", "reviewactivity" and "areas" sections, as scripts/activity.py prints them; an empty argument leaves that chart as it is.