mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
183 lines
4.3 KiB
JSON
183 lines
4.3 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": "match_parent"
|
|
},
|
|
"aspect": {
|
|
"ratio": 2
|
|
},
|
|
"items": [
|
|
{
|
|
"type": "content",
|
|
"text": "width = match_parent\naspect = 2"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "block",
|
|
"width": {
|
|
"type": "wrap_content"
|
|
},
|
|
"aspect": {
|
|
"ratio": 2
|
|
},
|
|
"items": [
|
|
{
|
|
"type": "content",
|
|
"text": "width = wrap_content\naspect = 2 + 1"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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_replaced_text.json"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "button",
|
|
"text": "Next",
|
|
"actions": [
|
|
{
|
|
"log_id": "rebinding",
|
|
"url": "div-demo-action://set_data?path=rebind/container/size_change.json"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|