mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
201be941c9
commit_hash:fd6e36a8ea96d96b9a00bac60a72f213c5f2dc0e
70 lines
1.3 KiB
JSON
70 lines
1.3 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"
|
|
}
|
|
],
|
|
"margins": {
|
|
"left": 10,
|
|
"top": 10
|
|
}
|
|
}
|
|
},
|
|
"card": {
|
|
"log_id": "test",
|
|
"variables": [
|
|
{
|
|
"name": "block1_width",
|
|
"type": "integer",
|
|
"value": 0
|
|
}
|
|
],
|
|
"states": [
|
|
{
|
|
"state_id": 0,
|
|
"div": {
|
|
"type": "container",
|
|
"orientation": "horizontal",
|
|
"items": [
|
|
{
|
|
"type": "block",
|
|
"text": "width = match_parent",
|
|
"layout_provider": {
|
|
"width_variable_name": "block1_width"
|
|
}
|
|
},
|
|
{
|
|
"type": "block",
|
|
"text": "width = block1.width x 0.75",
|
|
"width": {
|
|
"type": "fixed",
|
|
"value": "@{block1_width * 3 / 4}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|