Files
babaevmm 201be941c9 fix json format
commit_hash:fd6e36a8ea96d96b9a00bac60a72f213c5f2dc0e
2025-02-07 18:43:40 +03:00

156 lines
4.0 KiB
JSON

{
"templates": {
"button": {
"type": "text",
"width": {
"type": "match_parent"
},
"height": {
"type": "wrap_content"
},
"paddings": {
"left": 16,
"top": 16,
"right": 16,
"bottom": 16
},
"margins": {
"top": 16,
"left": 12,
"right": 12
},
"border": {
"corner_radius": 8
},
"background": [
{
"type": "solid",
"color": "#0E000000"
}
],
"font_size": 16,
"font_weight": "medium",
"text_alignment_vertical": "center",
"text_alignment_horizontal": "center",
"text_color": "#000000",
"alpha": 1.0,
"alignment_horizontal": "center",
"alignment_vertical": "center"
}
},
"card": {
"log_id": "visibility",
"variables": [
{
"type": "string",
"name": "visibility",
"value": "visible"
}
],
"states": [
{
"state_id": 0,
"div": {
"type": "container",
"height": {
"type": "wrap_content"
},
"items": [
{
"type": "container",
"alignment_horizontal": "center",
"text": "Hi",
"background": [
{
"type": "image",
"image_url": "https://yastatic.net/s3/home/divkit/pattern.png",
"scale": "fill"
}
],
"width": {
"type": "match_parent"
},
"height": {
"type": "wrap_content"
},
"margins": {
"top": 16
},
"items": [
{
"type": "text",
"visibility": "@{visibility}",
"visibility_action": {
"log_id": "text_view",
"visibility_percentage": 80,
"visibility_duration": 0,
"log_limit": 100
},
"background": [
{
"type": "solid",
"color": "#f1f1f1"
}
],
"text": "Visible item",
"width": {
"type": "match_parent"
},
"height": {
"type": "fixed",
"value": 100
},
"margins": {
"left": 12,
"top": 12,
"right": 12,
"bottom": 12
},
"font_size": 18,
"font_weight": "medium",
"text_alignment_vertical": "center",
"text_alignment_horizontal": "center",
"text_color": "#000000",
"alpha": 1.0,
"alignment_horizontal": "center",
"alignment_vertical": "center"
}
]
},
{
"type": "button",
"text": "visible",
"actions": [
{
"log_id": "update_visibility_visible",
"url": "div-action://set_variable?name=visibility&value=visible"
}
]
},
{
"type": "button",
"text": "invisible",
"actions": [
{
"log_id": "update_visibility_invisible",
"url": "div-action://set_variable?name=visibility&value=invisible"
}
]
},
{
"type": "button",
"text": "gone",
"actions": [
{
"log_id": "update_visibility_gone",
"url": "div-action://set_variable?name=visibility&value=gone"
}
]
}
]
}
}
]
}
}