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

home state

Back to all declarations

toriiMask

untyped string

toriiMask is the Samouraï Coop mark, redrawn as vectors: a torii gate cut out of a full circle, in a 480x480 box. Everything painted through the mask takes the shape of the mark.

Value

"<mask id=\"torii\"><circle cx=\"238\" cy=\"240\" r=\"240\" fill=\"#fff\"/><g fill=\"#000\"><path d=\"M-10 90 Q238 164 490 90 L490 140 Q238 190 -10 140 Z\"/><path d=\"M102 140 L165 140 L162 206 L96 206 Z\"/><path d=\"M302 140 L364 140 L370 206 L304 206 Z\"/><rect x=\"-10\" y=\""...

heroText

type

Value

home.heroText

heroSVG

func(h home.heroText) string

heroSVG draws the page banner: the mark set in a red sun on the right, the text stack on the left.

Open
OID
0b48b9…12c2:3
heroSVG details

Inspect func

gh

untyped string

defaultCrew seeds the roster at deploy time: everyone who contributed to gno with samcrew over the last four years, team by team, in the order the cards appear. Former members are in the alumni team, drawn in grey. Cards link to a public page until LinkProfile ties a member to their gno.land identity.

Value

"https://github.com/"

aboutCrew

untyped string

defaultCrew seeds the roster at deploy time: everyone who contributed to gno with samcrew over the last four years, team by team, in the order the cards appear. Former members are in the alumni team, drawn in grey. Cards link to a public page until LinkProfile ties a member to their gno.land identity.

Value

"https://www.samourai.world/about/"

defaultCrew

func() []struct{...}
Open
OID
0b48b9…12c2:6
defaultCrew details

Inspect func

defaultProfiles

func() []struct{...}

defaultProfiles are the members already on chain.

Open
OID
0b48b9…12c2:8
defaultProfiles details

Inspect func

memba

untyped string

Value

"https://memba.samourai.app/mainnet"

defaultSlots

func() []struct{...}

defaultSlots and defaultGalleries seed the page at deploy time. They are functions, not package variables, so the seed text is stored once (in the slot and gallery trees) instead of twice. After deploy the chain is the source of truth: edit with Set and SetGallery, not by redeploying.

Open
OID
0b48b9…12c2:11
defaultSlots details

Inspect func

yt

untyped string

Value

"https://www.youtube.com/watch?v="

ghsw

untyped string

Value

"https://github.com/samouraiworld/"

defaultGalleries

func() []struct{...}
Open
OID
0b48b9…12c2:12
defaultGalleries details

Inspect func

maxCrew

untyped bigint

// each card costs render gas; keeps Render("") far below the query ceiling

Value

(96 <untyped> bigint)

maxIDLen

untyped bigint

Value

(32 <untyped> bigint)

maxHandleLen

untyped bigint

Value

(32 <untyped> bigint)

maxRoleLen

untyped bigint

Value

(40 <untyped> bigint)

maxLineLen

untyped bigint

Value

(160 <untyped> bigint)

member

type

Value

home.member

byAddr

*v0.Tree

// address string -> id, for SetLine

Open
OID
0b48b9…12c2:17
byAddr details

Inspect pointer

nextOrder

int

Value

16

oneLine

func(field string, s string, max int)

oneLine rejects text that would break out of its markdown or SVG slot.

Open
OID
0b48b9…12c2:20
oneLine details

Inspect func

mdEscape

func(s string) string

mdEscape turns member-written text into plain text: every character that markdown could read as a link, image, emphasis, code or HTML is escaped.

Open
OID
0b48b9…12c2:23
mdEscape details

Inspect func

addMember

func(id string, handle string, role string, team string, url string)
Open
OID
0b48b9…12c2:24
addMember details

Inspect func

setIdentity

func(m *home.member, handle string, role string, team string, url string)
Open
OID
0b48b9…12c2:25
setIdentity details

Inspect func

mustMember

func(id string) *home.member
Open
OID
0b48b9…12c2:26
mustMember details

Inspect func

AddMember

func(id string, handle string, role string, team string, url string)

AddMember puts someone on the roster, in a team, linked to a public page.

Open
OID
0b48b9…12c2:27
AddMember details

Inspect func

UpdateMember

func(id string, handle string, role string, team string, url string)

UpdateMember changes a member's handle, role, team and public link.

Open
OID
0b48b9…12c2:28
UpdateMember details

Inspect func

LinkProfile

func(id string, addr .uverse.address, home string)

LinkProfile ties a member to their gno.land identity. home is their home realm path ("/r/..."), or "" to link to /u/\<addr>. From then on the member can write their own line with SetLine.

Open
OID
0b48b9…12c2:29
LinkProfile details

Inspect func

ClearLine

func(id string)

ClearLine removes a member's line, for moderation.

Open
OID
0b48b9…12c2:30
ClearLine details

Inspect func

RemoveMember

func(id string)

RemoveMember takes someone off the roster.

Open
OID
0b48b9…12c2:31
RemoveMember details

Inspect func

SetLine

func(line string)

SetLine lets a crew member with a linked profile write their own line. It renders as plain text: markdown in it is escaped.

Open
OID
0b48b9…12c2:32
SetLine details

Inspect func

IsMember

func(addr .uverse.address) bool

IsMember reports whether addr is linked to a crew profile.

Open
OID
0b48b9…12c2:33
IsMember details

Inspect func

CrewSize

func() int

CrewSize returns the number of members on the roster.

Open
OID
0b48b9…12c2:34
CrewSize details

Inspect func

teamTitles

map[string]string

teamTitles names the known teams; any other team shows its raw name.

Open
OID
0b48b9…12c2:36
teamTitles details

Inspect map

teamKinds

map[string]string

teamKinds picks the poster style of a team's cards.

Open
OID
0b48b9…12c2:38
teamKinds details

Inspect map

crewTable

func() string

crewTable shows the roster team by team, teams in the order their first member joined, members in the order they joined: one poster each, then the lines they wrote themselves.

Open
OID
0b48b9…12c2:39
crewTable details

Inspect func

galleryPrefix

untyped string

Value

"gallery."

cardsPerRow

untyped bigint

Value

(3 <untyped> bigint)

maxCards

untyped bigint

Value

(48 <untyped> bigint)

maxTitleLen

untyped bigint

Value

(80 <untyped> bigint)

maxMetaLen

untyped bigint

Value

(80 <untyped> bigint)

maxDescLen

untyped bigint

Value

(200 <untyped> bigint)

card

type

Value

home.card

style

type

Value

home.style

styleOf

func(kind string) home.style
Open
OID
0b48b9…12c2:60
styleOf details

Inspect func

SetGallery

func(name string, spec string)

SetGallery replaces a whole gallery from its line format.

Open
OID
0b48b9…12c2:62
SetGallery details

Inspect func

DeleteGallery

func(name string)

DeleteGallery removes a gallery.

Open
OID
0b48b9…12c2:63
DeleteGallery details

Inspect func

parseGallery

func(spec string) []home.card
Open
OID
0b48b9…12c2:64
parseGallery details

Inspect func

renderGallery

func(name string) (string, bool)

renderGallery lays cards out cardsPerRow to a row, each one a poster that links to its target.

Open
OID
0b48b9…12c2:65
renderGallery details

Inspect func

linkTitle

func(desc string) string

linkTitle renders an optional markdown link title, which gnoweb emits as the link's hover text.

Open
OID
0b48b9…12c2:66
linkTitle details

Inspect func

mdText

func(s string) string

mdText keeps a title from closing the markdown image alt text early.

Open
OID
0b48b9…12c2:67
mdText details

Inspect func

wrap

func(s string, width int) []string

wrap splits s into at most two lines of about width runes; the second line is cut with an ellipsis when the title is longer.

Open
OID
0b48b9…12c2:69
wrap details

Inspect func

clip

func(s string, n int) string

clip cuts s to at most n runes, ending with an ellipsis when it had to cut.

Open
OID
0b48b9…12c2:71
clip details

Inspect func

posterURI

func(c home.card) string
Open
OID
0b48b9…12c2:72
posterURI details

Inspect func

poster

func(c home.card) string

poster draws a 320x180 card: a dark gradient, a rising sun in the kind's accent (a play button for videos), a large kanji watermark, the kind label, the title on up to two lines and a meta line.

Open
OID
0b48b9…12c2:73
poster details

Inspect func

layoutSlug

untyped string

Value

"layout"

maxSlugLen

untyped bigint

Value

(64 <untyped> bigint)

slot

type

Value

home.slot

admin

.uverse.address

// samcrew namespace, 2-of-3

Value

<gnolang.StringValue>

pendingAdmin

.uverse.address

Value

<zero>

rev

int

Value

17

ProposeAdmin

func(next .uverse.address)

ProposeAdmin starts a handover. Nothing changes until the new address calls AcceptAdmin, so a typo cannot lock the page.

Open
OID
0b48b9…12c2:87
ProposeAdmin details

Inspect func

AcceptAdmin

func()

AcceptAdmin completes a handover started by ProposeAdmin.

Open
OID
0b48b9…12c2:88
AcceptAdmin details

Inspect func

validSlug

func(slug string) bool
Open
OID
0b48b9…12c2:89
validSlug details

Inspect func

assertWritableSlug

func(slug string)
Open
OID
0b48b9…12c2:90
assertWritableSlug details

Inspect func

Set

func(slug string, body string)

Set creates or replaces one slot.

Open
OID
0b48b9…12c2:91
Set details

Inspect func

Delete

func(slug string)

Delete removes a slot. Deleting "layout" falls back to the built-in layout.

Open
OID
0b48b9…12c2:92
Delete details

Inspect func

Get

func(slug string) string

Get returns a slot body, or "" when the slot does not exist.

Open
OID
0b48b9…12c2:93
Get details

Inspect func

realmPath

untyped string

Value

"gno.land/r/samcrew/home"

webPath

untyped string

Value

"/r/samcrew/home"

fallbackLayout

untyped string

Value

"# samcrew\n\n:intro:\n\n## The crew\n\n:crew:\n"

Render

func(path string) string

Render serves: "" the team page "slots" the slot index "slots/<slug>" one slot's raw markdown

Open
OID
0b48b9…12c2:94
Render details

Inspect func

fill

func(s string) string

fill replaces every :slug: in s, in one left-to-right pass. Replacement text is never rescanned, and an unknown placeholder stays verbatim.

Open
OID
0b48b9…12c2:97
fill details

Inspect func

lookup

func(slug string) (string, bool)
Open
OID
0b48b9…12c2:98
lookup details

Inspect func

renderSlot

func(slug string) string
Open
OID
0b48b9…12c2:100
renderSlot details

Inspect func
toriiMask : untyped string ="<mask id=\"torii\"><circle cx=\"238\" cy=\"240\" r=\"240\" fill=\"#fff\"/><g fill=\"#000\"><path d=\"M-10 90 Q238 164 490 90 L490 140 Q238 190 -10 140 Z\"/><path d=\"M102 140 L165 140 L162 206 L96 206 Z\"/><path d=\"M302 140 L364 140 L370 206 L304 206 Z\"/><rect x=\"-10\" y=\""...
heroText : type =home.heroText
heroSVG : func(h home.heroText) string Inspect
heroImage : func() string Inspect
gh : untyped string ="https://github.com/"
aboutCrew : untyped string ="https://www.samourai.world/about/"
defaultCrew : func() []struct{...} Inspect
defaultProfiles : func() []struct{...} Inspect
memba : untyped string ="https://memba.samourai.app/mainnet"
hero : home.heroText Inspect
defaultSlots : func() []struct{...} Inspect
yt : untyped string ="https://www.youtube.com/watch?v="
ghsw : untyped string ="https://github.com/samouraiworld/"
defaultGalleries : func() []struct{...} Inspect
maxCrew : untyped bigint =(96 <untyped> bigint)
maxIDLen : untyped bigint =(32 <untyped> bigint)
maxHandleLen : untyped bigint =(32 <untyped> bigint)
maxRoleLen : untyped bigint =(40 <untyped> bigint)
maxLineLen : untyped bigint =(160 <untyped> bigint)
member : type =home.member
crew : *v0.Tree Inspect
byAddr : *v0.Tree Inspect
nextOrder : int =16
oneLine : func(field string, s string, max int) Inspect
validURL : func(u string) bool Inspect
mdEscape : func(s string) string Inspect
addMember : func(id string, handle string, role string, team string, url string) Inspect
setIdentity : func(m *home.member, handle string, role string, team string, url string) Inspect
mustMember : func(id string) *home.member Inspect
AddMember : func(id string, handle string, role string, team string, url string) Inspect
UpdateMember : func(id string, handle string, role string, team string, url string) Inspect
LinkProfile : func(id string, addr .uverse.address, home string) Inspect
ClearLine : func(id string) Inspect
RemoveMember : func(id string) Inspect
SetLine : func(line string) Inspect
IsMember : func(addr .uverse.address) bool Inspect
CrewSize : func() int Inspect
teamTitles : map[string]string Inspect
teamKinds : map[string]string Inspect
crewTable : func() string Inspect
galleryPrefix : untyped string ="gallery."
cardsPerRow : untyped bigint =(3 <untyped> bigint)
maxCards : untyped bigint =(48 <untyped> bigint)
maxTitleLen : untyped bigint =(80 <untyped> bigint)
maxMetaLen : untyped bigint =(80 <untyped> bigint)
maxDescLen : untyped bigint =(200 <untyped> bigint)
card : type =home.card
galleries : *v0.Tree Inspect
style : type =home.style
styles : map[string]home.style Inspect
styleOf : func(kind string) home.style Inspect
SetGallery : func(name string, spec string) Inspect
DeleteGallery : func(name string) Inspect
parseGallery : func(spec string) []home.card Inspect
renderGallery : func(name string) (string, bool) Inspect
linkTitle : func(desc string) string Inspect
mdText : func(s string) string Inspect
xmlText : func(s string) string Inspect
wrap : func(s string, width int) []string Inspect
runeLen : func(s string) int Inspect
clip : func(s string, n int) string Inspect
posterURI : func(c home.card) string Inspect
poster : func(c home.card) string Inspect
itoa : func(n int) string Inspect
layoutSlug : untyped string ="layout"
maxSlugLen : untyped bigint =(64 <untyped> bigint)
slot : type =home.slot
admin : .uverse.address =<gnolang.StringValue>
pendingAdmin : .uverse.address =<zero>
slots : *v0.Tree Inspect
rev : int =17
reservedSlugs : []string (len=6) Inspect
init.72 : func() Inspect
assertAdmin : func() Inspect
Admin : func() .uverse.address Inspect
ProposeAdmin : func(next .uverse.address) Inspect
AcceptAdmin : func() Inspect
validSlug : func(slug string) bool Inspect
assertWritableSlug : func(slug string) Inspect
Set : func(slug string, body string) Inspect
Delete : func(slug string) Inspect
Get : func(slug string) string Inspect
realmPath : untyped string ="gno.land/r/samcrew/home"
webPath : untyped string ="/r/samcrew/home"
fallbackLayout : untyped string ="# samcrew\n\n:intro:\n\n## The crew\n\n:crew:\n"
Render : func(path string) string Inspect
renderPage : func() string Inspect
fill : func(s string) string Inspect
lookup : func(slug string) (string, bool) Inspect
renderIndex : func() string Inspect
renderSlot : func(slug string) string Inspect