Skip to content

Commit 0aa9ae5

Browse files
committed
Passing background opacity as parameter so we can tweak the looks on birthday
1 parent cd6284b commit 0aa9ae5

File tree

9 files changed

+15
-9
lines changed

9 files changed

+15
-9
lines changed

Diff for: 08/lambda/documents/launchSampleDatasource.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"mainText": "Aún no me has dicho la fecha",
66
"hintString": "cuando cumplo años?",
77
"logoUrl": "https://yourimgurlhere",
8-
"backgroundImage": "https://yourimgurlhere"
8+
"backgroundImage": "https://yourimgurlhere",
9+
"backgroundOpacity": "0.3"
910
}
1011
}
1112
}

Diff for: 08/lambda/documents/launchScreen.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"scale": "best-fill",
7373
"width": "100vw",
7474
"height": "100vh",
75-
"opacity": "0.3"
75+
"opacity": "${payload.launchData.properties.backgroundOpacity}"
7676
},
7777
{
7878
"type": "Container",

Diff for: 08/lambda/handlers.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ const SayBirthdayIntentHandler = {
174174
mainText: isBirthday ? sessionAttributes['age'] : handlerInput.t('DAYS_LEFT_MSG', {name: '', count: sessionAttributes['daysLeft']}),
175175
hintString: handlerInput.t('LAUNCH_HINT_MSG'),
176176
logoUrl: Viewport.pixelWidth > 480 ? util.getS3PreSignedUrl('Media/full_icon_512.png') : util.getS3PreSignedUrl('Media/full_icon_108.png'),
177-
backgroundImage: isBirthday ? util.getS3PreSignedUrl('Media/cake_'+resolution+'.png') : util.getS3PreSignedUrl('Media/papers_'+resolution+'.png')
177+
backgroundImage: isBirthday ? util.getS3PreSignedUrl('Media/cake_'+resolution+'.png') : util.getS3PreSignedUrl('Media/papers_'+resolution+'.png'),
178+
backgroundOpacity: isBirthday ? "1" : "0.3"
178179
},
179180
transformers: [{
180181
inputPath: 'hintString',

Diff for: 09/lambda/documents/launchSampleDatasource.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"mainText": "Aún no me has dicho la fecha",
66
"hintString": "cuando cumplo años?",
77
"logoUrl": "https://yourimgurlhere",
8-
"backgroundImage": "https://yourimgurlhere"
8+
"backgroundImage": "https://yourimgurlhere",
9+
"backgroundOpacity": "0.3"
910
}
1011
}
1112
}

Diff for: 09/lambda/documents/launchScreen.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"scale": "best-fill",
7373
"width": "100vw",
7474
"height": "100vh",
75-
"opacity": "0.3"
75+
"opacity": "${payload.launchData.properties.backgroundOpacity}"
7676
},
7777
{
7878
"type": "Container",

Diff for: 09/lambda/handlers.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ const SayBirthdayIntentHandler = {
174174
mainText: isBirthday ? sessionAttributes['age'] : handlerInput.t('DAYS_LEFT_MSG', {name: '', count: sessionAttributes['daysLeft']}),
175175
hintString: handlerInput.t('LAUNCH_HINT_MSG'),
176176
logoUrl: Viewport.pixelWidth > 480 ? util.getS3PreSignedUrl('Media/full_icon_512.png') : util.getS3PreSignedUrl('Media/full_icon_108.png'),
177-
backgroundImage: isBirthday ? util.getS3PreSignedUrl('Media/cake_'+resolution+'.png') : util.getS3PreSignedUrl('Media/papers_'+resolution+'.png')
177+
backgroundImage: isBirthday ? util.getS3PreSignedUrl('Media/cake_'+resolution+'.png') : util.getS3PreSignedUrl('Media/papers_'+resolution+'.png'),
178+
backgroundOpacity: isBirthday ? "1" : "0.3"
178179
},
179180
transformers: [{
180181
inputPath: 'hintString',

Diff for: 10/lambda/documents/launchSampleDatasource.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"mainText": "Aún no me has dicho la fecha",
66
"hintString": "cuando cumplo años?",
77
"logoUrl": "https://yourimgurlhere",
8-
"backgroundImage": "https://yourimgurlhere"
8+
"backgroundImage": "https://yourimgurlhere",
9+
"backgroundOpacity": "0.3"
910
}
1011
}
1112
}

Diff for: 10/lambda/documents/launchScreen.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"scale": "best-fill",
7373
"width": "100vw",
7474
"height": "100vh",
75-
"opacity": "0.3"
75+
"opacity": "${payload.launchData.properties.backgroundOpacity}"
7676
},
7777
{
7878
"type": "Container",

Diff for: 10/lambda/handlers.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ const SayBirthdayIntentHandler = {
174174
mainText: isBirthday ? sessionAttributes['age'] : handlerInput.t('DAYS_LEFT_MSG', {name: '', count: sessionAttributes['daysLeft']}),
175175
hintString: handlerInput.t('LAUNCH_HINT_MSG'),
176176
logoUrl: Viewport.pixelWidth > 480 ? util.getS3PreSignedUrl('Media/full_icon_512.png') : util.getS3PreSignedUrl('Media/full_icon_108.png'),
177-
backgroundImage: isBirthday ? util.getS3PreSignedUrl('Media/cake_'+resolution+'.png') : util.getS3PreSignedUrl('Media/papers_'+resolution+'.png')
177+
backgroundImage: isBirthday ? util.getS3PreSignedUrl('Media/cake_'+resolution+'.png') : util.getS3PreSignedUrl('Media/papers_'+resolution+'.png'),
178+
backgroundOpacity: isBirthday ? "1" : "0.3"
178179
},
179180
transformers: [{
180181
inputPath: 'hintString',

0 commit comments

Comments
 (0)