-
Notifications
You must be signed in to change notification settings - Fork 126
/
3.json
138 lines (138 loc) · 4.29 KB
/
3.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
{
"$jason": {
"head": {
"title": "Mario Button"
},
"body": {
"style": {
"border": "none"
},
"header": {
"style": {
"shy": "true"
}
},
"sections": [
{
"items": [
{
"type": "image",
"style": {
"padding": "0",
"width": "100%",
"z_index": "-1"
},
"url": "http://cdn.bgr.com/2016/09/super-mario-run.jpg?quality=98&strip=all"
},
{
"type": "vertical",
"style": {
"padding": "20",
"spacing": "20"
},
"components": [
{
"type": "label",
"text": "There are two types of buttons, and we'll show you how they work",
"style": {
"font": "HelveticaNeue-Bold",
"size": "40"
}
},
{
"type": "label",
"text": "There are two types of buttons: image type and text type. You can build them both simply by specifying the type as 'button'. But the difference is what comes next. If the button contains a 'url' attribute, it will be rendered as an image button, like the Mario button below. If the button contains a 'text' attribute, it will be rendered as a text attribute, like the red 'Tap Mario' button below."
}
]
},
{
"type": "horizontal",
"style": {
"padding": "50",
"spacing": "20"
},
"components": [
{
"type": "button",
"text": "Tap Mario =>",
"style": {
"font": "HelveticaNeue-Bold",
"size": "20",
"corner_radius": "3",
"background": "#ff0000"
},
"action": {
"type": "$util.alert",
"options": {
"title": "I said Mario!",
"description": "Tap Mario, not the text."
}
}
},
{
"type": "button",
"url": "https://jasonette.github.io/Jasonpedia/assets/0.png",
"style": {
"width": "50"
},
"action": {
"type": "$audio.play",
"options": {
"url": "https://raw.githubusercontent.com/gliechtenstein/Sounds/master/oh_no.mp3"
}
}
}
]
},
{
"type": "vertical",
"style": {
"spacing": "10"
},
"components": [
{
"type": "label",
"text": "Label type buttons look like this in JSON:"
},
{
"type": "label",
"style": {
"background": "#000000",
"color": "#cecece",
"size": "11",
"padding": "10",
"corner_radius": "3"
},
"text": "{\"type\": \"button\", \"text\": \"Tap Mario => \"}"
}
]
},
{
"type": "vertical",
"style": {
"spacing": "10"
},
"components": [
{
"type": "label",
"text": "Image type buttons look like this in JSON:"
},
{
"type": "label",
"style": {
"background": "#000000",
"color": "#cecece",
"size": "11",
"padding": "10",
"corner_radius": "3"
},
"text": "{\"type\": \"button\", \"url\": \"https://jasonette.github.io/Jasonpedia/assets/0.png\"}"
}
]
}
]
}
]
}
}
}