docs(config): create json schema
This commit is contained in:
parent
7219e5bdf1
commit
d9d7ab50c5
3 changed files with 201 additions and 68 deletions
65
example.json
65
example.json
|
@ -1,65 +0,0 @@
|
|||
{
|
||||
"image": "wallpaper.jpg",
|
||||
"description": "Sem magna a dui labore et cursus nibh ipsum nulla. Sem magna a dui labore et cursus nibh ipsum nulla. Blandit adipiscing nulla diam dolore ultricies ornare sed risus faucibus. Lobortis mi sed dui risus nulla ultrices vulputate at enim.",
|
||||
"person": {
|
||||
"name": "Anhgelus Morhtuuzh",
|
||||
"pronouns": "he/his - some basic things though",
|
||||
"image": "pfp.webp"
|
||||
},
|
||||
"font": "serif",
|
||||
"colors": {
|
||||
"text": "#fff",
|
||||
"background": {
|
||||
"type": "linear",
|
||||
"angle": 243,
|
||||
"colors": [
|
||||
{
|
||||
"color": "#020024",
|
||||
"position": 0
|
||||
},
|
||||
{
|
||||
"color": "#090979",
|
||||
"position": 40
|
||||
},
|
||||
{
|
||||
"color": "#00d4ff",
|
||||
"position": 100
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"link": "https://discord.gg/minecraft",
|
||||
"content": "Minecraft's Discord",
|
||||
"color": "#800080",
|
||||
"text_color": "#fff",
|
||||
"color_hover": "#680c68",
|
||||
"text_color_hover": "#eee"
|
||||
},
|
||||
{
|
||||
"link": "https://github.com/anhgelus",
|
||||
"content": "GitHub",
|
||||
"color": "#800080FF",
|
||||
"text_color": "#fff",
|
||||
"color_hover": "#680c68",
|
||||
"text_color_hover": "#eee"
|
||||
},
|
||||
{
|
||||
"link": "https://youtube.com/@anhgelus",
|
||||
"content": "YouTube",
|
||||
"color": "#800080FF",
|
||||
"text_color": "#fff",
|
||||
"color_hover": "#680c68",
|
||||
"text_color_hover": "#eee"
|
||||
}
|
||||
],
|
||||
"legal": {
|
||||
"legal_information_link": "https://www.anhgelus.world/legal/",
|
||||
"images_source": [
|
||||
"Profile picture: John Smith for example.org",
|
||||
"Background: John Smith 2 for another.example.org"
|
||||
],
|
||||
"font_source": "serif by ?"
|
||||
}
|
||||
}
|
198
schema.json
Normal file
198
schema.json
Normal file
|
@ -0,0 +1,198 @@
|
|||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"colors": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"background": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"angle": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"minimum": 0,
|
||||
"maximum": 359
|
||||
},
|
||||
"colors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"color": {
|
||||
"type": "string"
|
||||
},
|
||||
"position": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"minimum": 0,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"color",
|
||||
"position"
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"type",
|
||||
"angle",
|
||||
"colors"
|
||||
]
|
||||
},
|
||||
"buttons": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"background": {
|
||||
"type": "string"
|
||||
},
|
||||
"background_hover": {
|
||||
"type": "string"
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"text_hover": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"text",
|
||||
"text_hover",
|
||||
"background",
|
||||
"background_hover"
|
||||
]
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"background",
|
||||
"buttons",
|
||||
"text"
|
||||
]
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"image": {
|
||||
"type": "string"
|
||||
},
|
||||
"legal": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"font_source": {
|
||||
"type": "string"
|
||||
},
|
||||
"images_source": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"legal_information_link": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"legal_information_link",
|
||||
"images_source",
|
||||
"font_source"
|
||||
]
|
||||
},
|
||||
"links": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"color": {
|
||||
"type": "string"
|
||||
},
|
||||
"color_hover": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"link": {
|
||||
"type": "string"
|
||||
},
|
||||
"text_color": {
|
||||
"type": "string"
|
||||
},
|
||||
"text_color_hover": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"link",
|
||||
"content",
|
||||
"color",
|
||||
"text_color",
|
||||
"color_hover",
|
||||
"text_color_hover"
|
||||
]
|
||||
}
|
||||
},
|
||||
"person": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"image": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"pronouns": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"description"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"pronouns",
|
||||
"image",
|
||||
"tags"
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"image",
|
||||
"description",
|
||||
"person",
|
||||
"colors",
|
||||
"links",
|
||||
"legal"
|
||||
]
|
||||
}
|
|
@ -14,9 +14,9 @@
|
|||
</p>
|
||||
<div class="links">
|
||||
{{ range $link := .Links }}
|
||||
<div class="link" style="{{ .GetBackground }}">
|
||||
<a href="{{ .Link }}" style="{{ .GetLinkColor }}">{{ .Content }}</a>
|
||||
</div>
|
||||
<div class="link" style="{{ .GetBackground }}">
|
||||
<a href="{{ .Link }}" style="{{ .GetLinkColor }}">{{ .Content }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="link" style="{{ .Color.Button.GetBackground }}">
|
||||
<a href="/tags" style="{{ .Color.Button.GetTextColor }}">Tags</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue