- Node and Yarn - Acquired using Node Version Manager (https://github.com/nvm-sh/nvm)
- Install Node Version Manager
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash- Install the latest version of NodeJS
nvm install node # "node" is an alias for the latest version- Install the latest version of NPM for Node
nvm install-latest-npm # get the latest supported npm version on the current node version- Install Yarn
npm install --global yarn- Running with yarn
yarn --ignore-engines && yarn serve- Building for web servers, like nginx, apache
yarn --ignore-engines && yarn build
cp -r ./dist/* <ROOT_OF_WEB_SERVER>- Running with docker
./docker.sh
docker run -d -p 8088:80 ping.pub/dashboard- Set
enable = truein./config/app.toml
###############################################################################
### API Configuration ###
###############################################################################
[api]
# Enable defines if the API server should be enabled.
enable = true
# Swagger defines if swagger documentation should automatically be registered.
swagger = false
# Address defines the API server to listen on.
address = "tcp://0.0.0.0:1317"
# MaxOpenConnections defines the number of maximum open connections.
max-open-connections = 1000
- add proxy server and enable CORS. NOTE: You must enable https as well.
server {
server_name juno.api.ping.pub;
listen 443;
location / {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Max-Age 3600;
add_header Access-Control-Expose-Headers Content-Length;
proxy_pass http://<HOST>:1317;
}
}
- config your blockchain in ./chains/mainnet
Colours live in the daisyUI themes in tailwind.config.js. Editing them re-themes
the app; no component changes are needed.
// tailwind.config.js
daisyui: {
themes: [
{
light: {
...require('daisyui/src/theming/themes')['[data-theme=light]'],
primary: '#0f766e',
},
},
{
dark: {
...require('daisyui/src/theming/themes')['[data-theme=dark]'],
primary: '#2dd4bf',
'base-100': '#0b1220', // cards, sidebar, header
'base-200': '#111a2e', // page bands, table headers
},
},
],
},Spreading the stock theme first means you only list what you want to change.
The tokens you will reach for most:
| token | used for |
|---|---|
primary |
active nav, buttons, links, chart accent |
base-100 |
cards, sidebar, header |
base-200 / base-300 |
page bands, table headers, hover |
base-content |
default text colour |
info success warning error |
status text, badges, vote bars |
Full list: https://daisyui.com/docs/colors/
Tailwind reads the config at startup, so restart the dev server after editing.
Two caveats:
- A component that hardcodes a colour (
text-gray-400,bg-green-500, ...) will not follow the theme. Those are gradually being moved onto tokens. @ping-pub/widgetinjects its own daisyUI build at runtime, which would otherwise override these values.postcss.config.jsre-emits the theme at a higher specificity so the app's config wins - keep that plugin if you fork.