-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathrecipeIntent.json
160 lines (160 loc) · 6.58 KB
/
recipeIntent.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
{
"type": "APL",
"version": "1.1",
"import": [
{
"name": "alexa-viewport-profiles",
"version": "1.1.0"
},
{
"name": "alexa-layouts",
"version": "1.1.0"
},
{
"name": "alexa-styles",
"version": "1.1.0"
}
],
"resources": [
{
"description": "Background Image for Recipe Screen on Small Round Hubs",
"when": "${@viewportProfile == @hubRoundSmall}",
"strings": {
"backgroundImg": "https://s3.amazonaws.com/ask-samples-resources/images/sauce-boss/sauceBoss-background-left-smHub.png"
}
},
{
"description": "Background Image for Recipe Screen on Landscape Hubs",
"when": "${@viewportProfile == @hubLandscapeSmall || @viewportProfile == @hubLandscapeMedium || @viewportProfile == @hubLandscapeLarge}",
"strings": {
"backgroundImg": "https://s3.amazonaws.com/ask-samples-resources/images/sauce-boss/sauceBoss-background-left-Hub.png"
}
},
{
"description": "Background Image for Recipe Screen on XLarge Hubs (e.g TV)",
"when": "${@viewportProfile == @tvLandscapeXLarge}",
"strings": {
"backgroundImg": "https://s3.amazonaws.com/ask-samples-resources/images/sauce-boss/sauceBoss-background-left-TV.png"
}
},
{
"description": "Skill Icon",
"strings": {
"skillIcon": "https://s3.amazonaws.com/ask-samples-resources/icons/sauce-boss-icon.png"
}
}
],
"styles": {
"karaokeStyle": {
"extends": "textStyleKaraoke",
"values": [
{
"color": "@colorText"
},
{
"when": "${state.karaoke}",
"color": "rgba(91,197,250,1)"
},
{
"when": "${state.karaokeTarget}",
"color": "blue"
}
]
}
},
"mainTemplate": {
"parameters": [
"payload"
],
"items": [
{
"type": "Container",
"items": [
{
"description": "Set background Image",
"when": "${@viewportProfile != @hubRoundSmall}",
"type": "AlexaBackground",
"backgroundImageSource": "@backgroundImg"
},
{
"description": "Use sauce image as background from Small Round Hubs",
"when": "${@viewportProfile == @hubRoundSmall}",
"type": "AlexaBackground",
"backgroundImageSource": "${payload.sauceBossData.properties.sauceImg}",
"colorOverlay": true
},
{
"description": "Use Responsive Header accross all Hubs",
"type": "AlexaHeader",
"headerTitle": "${payload.sauceBossData.properties.headerTitle}",
"headerAttributionImage": "@skillIcon",
"headerBackButton": "${payload.sauceBossData.properties.headerBackButton}",
"headerDivider": true
},
{
"description": "Define a ScrollView to contain sauce instructions on Small Round Hubs",
"when": "${@viewportProfile == @hubRoundSmall}",
"type": "ScrollView",
"width": "100vw",
"height": "100vh",
"top": "5vh",
"paddingRight": 50,
"paddingLeft": 50,
"paddingBottom": 280,
"item": {
"type": "Text",
"id": "recipeText",
"style": "karaokeStyle",
"text": "${payload.sauceBossData.properties.sauceText}",
"speech": "${payload.sauceBossData.properties.sauceSpeech}",
"textAlign": "center",
"fontSize": "7vh",
"fontWeight": "300"
}
},
{
"description": "Define a Container to contain sauce image & instructions for Landscape Hubs",
"when": "${@viewportProfile != @hubRoundSmall}",
"type": "Container",
"direction": "row",
"width": "100vw",
"height": "65vh",
"top": "10vh",
"justifyContent": "center",
"items": [
{
"type": "Image",
"source": "${payload.sauceBossData.properties.sauceImg}",
"borderRadius": "50vh",
"width": "50vh",
"height": "50vh",
"scale": "best-fit"
},
{
"type": "ScrollView",
"paddingLeft": "5vw",
"width": "60vw",
"height": "60vh",
"item": {
"type": "Text",
"id": "recipeText",
"style": "karaokeStyle",
"text": "${payload.sauceBossData.properties.sauceText}",
"speech": "${payload.sauceBossData.properties.sauceSpeech}",
"fontSize": "6vh",
"fontWeight": "300"
}
}
]
},
{
"description": "Use Responsive Footer accross all Hubs",
"when": "${@viewportProfile != @hubRoundSmall}",
"type": "AlexaFooter",
"hintText": "${payload.sauceBossData.properties.hintText}"
}
]
}
]
}
}