Files
2023-02-08 20:27:09 +03:00

118 lines
2.6 KiB
JSON

{
"templates": {
"block": {
"type": "container",
"items": [
{
"type": "text",
"$text": "text",
"font_size": 16,
"width": {
"type": "wrap_content"
},
"margins": {
"left": 10,
"right": 10,
"top": 10,
"bottom": 10
}
}
],
"background": [
{
"type": "solid",
"color": "#A0FFA0"
}
]
}
},
"card": {
"log_id": "test",
"variables": [
{
"name": "block1_height",
"type": "integer",
"value": 0
},
{
"name": "block2_width",
"type": "integer",
"value": 0
}
],
"states": [
{
"state_id": 0,
"div": {
"type": "container",
"paddings": {
"left": 10,
"top": 10,
"right": 10,
"bottom": 10
},
"items": [
{
"type": "block",
"text": "width = height x 4\nheight = wrap_content",
"width": {
"type": "fixed",
"value": "@{block1_height * 4}"
},
"extensions": [
{
"id": "size_provider",
"params": {
"height_variable_name": "block1_height"
}
}
]
},
{
"type": "separator",
"height": {
"type": "fixed",
"value": 10
}
},
{
"type": "block",
"text": "height = block1.height",
"width": {
"type": "wrap_content"
},
"height": {
"type": "fixed",
"value": "@{block1_height}"
},
"extensions": [
{
"id": "size_provider",
"params": {
"width_variable_name": "block2_width"
}
}
]
},
{
"type": "separator",
"height": {
"type": "fixed",
"value": 10
}
},
{
"type": "block",
"text": "width = block2.width",
"width": {
"type": "fixed",
"value": "@{block2_width}"
}
}
]
}
}
]
}
}