Files
the-leo 15000f072b Complex Rebind implementation
05a2696893a5a3219967d8132ae4e68e15f12cd3
2024-02-21 17:16:34 +03:00

168 lines
3.9 KiB
JSON

{
"templates": {
"button": {
"type": "text",
"background": [
{
"type": "solid",
"color": "#550055"
}
],
"paddings": {
"left": 50,
"right": 50,
"top": 20,
"bottom": 20
},
"width": {
"type": "wrap_content"
},
"text_color": "#FFF"
},
"block": {
"type": "container",
"background": [
{
"type": "solid",
"color": "#A0FFA0"
}
],
"margins": {
"top": 10
}
},
"content": {
"type": "text",
"font_size": 16,
"width": {
"type": "wrap_content"
},
"margins": {
"left": 10,
"right": 10,
"top": 10,
"bottom": 10
}
}
},
"card": {
"log_id": "test",
"states": [
{
"state_id": 0,
"div": {
"type": "container",
"width": {
"type": "match_parent"
},
"paddings": {
"left": 10,
"right": 10
},
"items": [
{
"type": "block",
"width": {
"type": "wrap_content"
},
"aspect": {
"ratio": 2
},
"items": [
{
"type": "content",
"text": "width = wrap_content\naspect = 2"
}
]
},
{
"type": "block",
"width": {
"type": "wrap_content"
},
"aspect": {
"ratio": 0.75
},
"items": [
{
"type": "content",
"text": "width = wrap_content\naspect = 0.75"
}
]
},
{
"type": "block",
"orientation": "overlap",
"width": {
"type": "wrap_content"
},
"aspect": {
"ratio": 2
},
"items": [
{
"type": "text",
"text": " ",
"width": {
"type": "fixed",
"value": 200
},
"height": {
"type": "fixed",
"value": 200
},
"background": [
{
"type": "solid",
"color": "#A0A0FF"
}
]
},
{
"type": "content",
"id": "action_button",
"text": "width = wrap_content\norientation = overlap\naspect = 2"
}
]
},
{
"type": "container",
"orientation": "horizontal",
"width": {
"type": "match_parent"
},
"content_alignment_horizontal": "space-between",
"margins": {
"top": 30,
"bottom": 30
},
"items": [
{
"type": "button",
"text": "UnDo",
"actions": [
{
"log_id": "rebinding",
"url": "div-demo-action://set_data?path=rebind/container/un_removed.json"
}
]
},
{
"type": "button",
"text": "Next",
"actions": [
{
"log_id": "rebinding",
"url": "div-demo-action://set_data?path=rebind/container/replaced_text.json"
}
]
}
]
}
]
}
}
]
}
}