settings.json
This page will introduce detailed usage of settings.json
.
{
"images": {
"avatar": "",
"logo_big": "",
"logo_small": "",
"language_flags": {}
},
"others": {
"colors": [],
"defaultLanguage": "",
"serverHost": "",
"serverPort": "",
"review":
},
"theme": {
"primaryColor": "",
"primaryColorHover": "",
"primaryColorPressed": "",
"primaryColorSuppl": ""
}
}
images
Settings of images.
images.avatar
Avatar when displaying your answers. Can be the avatar of the host of the website.
Type: String
Default value: ./assets/Avatar.jpg
images.logo_big
Logo of the website (top left).
Type: String
Default value: ./assets/logo.png
images.logo_small
Mobile logo of the website (top left).
Type: String
Default value: ./assets/logoMobile.png
language_flags
The flag icon of the languages.
Type: Object
Default value:
{
"enus": "./assets/flags/gb.png",
"zhcn": "./assets/flags/cn.png",
"zhtw": "./assets/flags/tw.png",
"ja": "./assets/flags/jp.png",
"de": "./assets/flags/de.png",
"nl": "./assets/flags/nl.png",
"zhsb": "./assets/flags/unknown.png"
}
These icons are all from flagcdn (opens in a new tab), because of the internet restrictions of some regions, the default icons are all downloaded, you can change it to anyother api you want.
Example:
{
"enus": "https://flagcdn.com/40x30/gb.png"
}
others
Other settings.
others.colors
Questioners' avatar has random background color, this is the list of the colors.
Type: Array
Members type: String
Default value: [ "#c3cfe2" ]
Example: [ "#c3cfe2", "#8a2be2"]
others.defaultLanguage
Default display language, it will be showed when the user first visit this website, after that, follow the cookie.
Type: String
Default value: enus
Languages available:
defaultLanguage | Language Name In Website | Language |
---|---|---|
enus | English | English |
zhcn | 简体中文 | Simplified Chinese |
zhtw | 繁體中文 | Traditional Chinese |
ja | 日本語 | Japanese |
de | Deutsch | German |
ru | Русский | Russian |
nl | Nederlands | Dutch |
zhsb | 减啼忠吻 | Meme Language |
others.serverHost
Server host.
Type: String
Default value: 127.0.0.1
Example: https://example.com
others.serverPort
Server port.
Type: String
Default value: 1106
others.review
Whether the questions need review before showing.
Please set review
in secret.json
the same with this to avoid causing bugs.
Type: Boolean
theme
Theme colors.
theme.primaryColor
Website theme color, please use hex color.
Type: String
Default value: #8a2be2
theme.primaryColorHover
Website mouse hover theme color, please use hex color.
Type: String
Default value: #8a2be2
theme.primaryColorPressed
Website mouse pressed theme color, please use hex color.
Type: String
Default value: #610AB3
theme.primaryColorSuppl
Website dark theme switch color, please use hex color.
Type: String
Default value: #8a2be2