-
Notifications
You must be signed in to change notification settings - Fork 0
/
main-APL
132 lines (132 loc) · 5.15 KB
/
main-APL
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
{
"type": "APL",
"version": "1.1",
"theme": "dark",
"import": [
{
"name": "alexa-viewport-profiles",
"version": "1.0.0"
},
{
"name": "alexa-layouts",
"version": "1.0.0"
},
{
"name": "alexa-styles",
"version": "1.0.0"
}
],
"layouts": {
"LaunchScreen": {
"description": "One Week Habits Launch Screen",
"parameters": [
{
"name": "mainText",
"type": "string"
},
{
"name": "logo",
"type": "string"
}
],
"items": [
{
"type": "Container",
"width": "100%",
"height": "100%",
"justifyContent": "center",
"alignItems": "center",
"item": [
{
"type": "Image",
"source": "${logo}",
"width": "20vw",
"height": "20vw",
"scale": "best-fill"
},
{
"type": "Text",
"text": "${mainText}",
"style": "textStyleDisplay5",
"textAlign": "center",
"paddingTop": "30dp",
"color": "#ffffff"
}
]
}
]
}
},
"mainTemplate": {
"parameters": [
"payload"
],
"items": [
{
"type": "Container",
"direction": "column",
"items": [
{
"type": "Image",
"source": "${payload.launchData.properties.backgroundImage}",
"scale": "best-fill",
"width": "100vw",
"height": "100vh",
"opacity": "${payload.launchData.properties.backgroundOpacity}"
},
{
"type": "Container",
"position": "absolute",
"width": "100vw",
"height": "100vh",
"direction": "column",
"items": [
{
"headerTitle": "${payload.launchData.properties.headerTitle}",
"type": "AlexaHeader"
},
{
"when": "${@viewportProfile == @hubRoundSmall}",
"type": "Container",
"width": "100vw",
"height": "60vh",
"position": "relative",
"alignItems": "center",
"justifyContent": "center",
"direction": "column",
"items": [
{
"type": "LaunchScreen",
"mainText": "${payload.launchData.properties.mainText}",
"logo": "${payload.launchData.properties.logoImage}"
}
]
},
{
"when": "${@viewportProfile == @hubLandscapeSmall || @viewportProfile == @hubLandscapeMedium || @viewportProfile == @hubLandscapeLarge || @viewportProfile == @tvLandscapeXLarge}",
"type": "Container",
"width": "100vw",
"height": "70vh",
"direction": "column",
"alignItems": "center",
"justifyContent": "center",
"items": [
{
"type": "LaunchScreen",
"mainText": "${payload.launchData.properties.mainText}",
"logo": "${payload.launchData.properties.logoImage}"
}
]
},
{
"footerHint": "${payload.launchData.properties.hintString}",
"type": "AlexaFooter",
"when": "${@viewportProfile == @hubLandscapeSmall || @viewportProfile == @hubLandscapeMedium || @viewportProfile == @hubLandscapeLarge || @viewportProfile == @tvLandscapeXLarge}"
}
]
}
]
}
]
}
}