Game page format
| Item | Contract |
|---|---|
| First page | /src/marketing/index.bwss |
| Other page | /src/marketing/<slug>.bwss |
| Nodes | Box, Image, Svg, Anchor, as on rules pages |
| Action nodes | PlayButton, RulesButton, ThemeToggle |
| Text | Plain strings in children |
This format is the same in every framework major.
Action nodes
Each action node takes id, style and children, and no href. Boardweaver builds each destination from the game:
| Node | Does |
|---|---|
PlayButton |
Opens the game's play page, on the channel of the version the page shows. |
RulesButton |
Opens the game's rules pages. |
ThemeToggle |
Switches the page between light and dark. The page opens in the theme's defaultColorMode, else in the visitor's system setting (Game theme format). |
{
"type": "Box",
"children": [
{ "type": "PlayButton", "children": ["Play now"] },
{ "type": "RulesButton", "children": ["Read the rules"] }
]
}
Only a game page takes these nodes. A rules page with one fails the compile.
Links, art and translations
An Anchor links to another game page or to an id, in the forms a rules page uses. It cannot reach a rules page: use RulesButton. An Image shows an image uploaded with upload_art. The cover and logo slots of upload_marketing_image are not art keys.
A translated page is /src/marketing/<locale>/<slug>.bwss, beside a default page of the same slug, as for rules pages.
Style the nodes with BWSS styles. commit refuses a page that does not compile with MARKETING_COMPILE_FAILED.