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

theme/v0 package

Overview

Package theme is the first look of gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/home.

It draws a header card as inline SVG, a divider and a footer, on top of the slot machinery the home realm provides. Everything else on the page comes from slots, so this file only decides HOW things are drawn, never WHAT is said.

It is a candidate, not the page. Deploying it registers it (see init); the authority accepts it in a separate transaction. To change the look in a way slots and style knobs cannot express, copy this directory to theme/v1, edit, deploy, Accept. The home realm and every slot stay exactly where they are.

Style knobs read from slots (all optional):

Example
1style.accent  #RRGGBB   brass by default
2style.bg      #RRGGBB   card background
3style.fg      #RRGGBB   card text
4style.header  card | plain | none

Widgets this theme adds to the layout, beside every slot and the home realm's computed placeholders:

Example
1:header:   the card (or a plain heading, or nothing, per style.header)
2:divider:  a thin accent rule
3:footer:   realm · revision · block · chain · theme · links

Function

Instance

func Instance() home.Theme

Instance returns the theme object, for a caller that would rather register it explicitly than rely on this realm's init having done it.

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/home/theme/v0.Instance()"

Result