Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split up the benefits sample into template + data json files #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions samples/benefits/ac-qv-benefits.data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"title": "Enrollment is open!",
"subTitle": "What does 2022 have in store?",
"imageUrl": "https://raw.githubusercontent.com/pnp/AdaptiveCards-Templates/main/samples/benefits/assets/building.png",
"description": "Take your pick! The past year has been limiting in more ways than one, but now is your chance to finally make a few choices for you and your family. And you have plenty of great options to choose from—we’ve even expanded some benefits to support you more fully in the year ahead! Check out some of the essential updates and enhancements we’ve made for 2022 below:",
"items": [
{
"title": "Perks+ Reimbursement",
"text": "We've increased program reimbursement amounts. That's means more money to put toward you doing you!",
"backgroundImageUrl": "https://raw.githubusercontent.com/pnp/AdaptiveCards-Templates/main/samples/benefits/assets/gym.jpg",
"buttonText": "Learn more the Perks+ reimbursement",
"buttonUrl": "https://www.benefits.va.gov/benefits/programs/program-reimbursement-amounts"
},
{
"title": "Life insurance",
"text": "Prudential is providing a one-time exception for you to increase your coverage without Evidence of Insurability.",
"backgroundImageUrl": "https://raw.githubusercontent.com/pnp/AdaptiveCards-Templates/main/samples/benefits/assets/outside.jpg",
"buttonText": "Visit the return-to-worksite toolkit",
"buttonUrl": "http://aka.ms/TechToolkit"
},
{
"title": "Your workspace assignment beginning Stage 4",
"text": "If you have any questions or concerns about your schedule please see [email protected]",
"backgroundImageUrl": "https://raw.githubusercontent.com/pnp/AdaptiveCards-Templates/main/samples/benefits/assets/outside.jpg"
}
]
}

196 changes: 0 additions & 196 deletions samples/benefits/ac-qv-benefits.json

This file was deleted.

104 changes: 104 additions & 0 deletions samples/benefits/ac-qv-benefits.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"schema": "http=//adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.3",
"body": [
{
"type": "TextBlock",
"text": "${title}",
"wrap": true,
"horizontalAlignment": "left",
"fontType": "Default",
"weight": "bolder",
"size": "extraLarge",
"spacing": "extraLarge"
},
{
"type": "Container",
"backgroundImage": {
"url": "${imageUrl}",
"horizontalAlignment": "Center",
"verticalAlignment": "Center"
},
"bleed": true,
"height": "stretch",
"minHeight": "240px",
"horizontalAlignment": "center",
"spacing": "Medium"
},
{
"type": "TextBlock",
"text": "${subTitle}",
"wrap": true,
"horizontalAlignment": "Left",
"fontType": "Default",
"weight": "Bolder",
"spacing": "Large"
},
{
"type": "TextBlock",
"text": "${description}",
"wrap": true,
"horizontalAlignment": "Left",
"fontType": "Default"
},
{
"type": "Container",
"$data": "${items}",
"spacing": "Medium",
"style": "emphasis",
"items": [
{
"type": "TextBlock",
"text": "${title}",
"wrap": true,
"weight": "Bolder",
"size": "Medium"
},
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "${text}",
"wrap": true
}
]
},
{
"type": "Column",
"width": "80px",
"minHeight": "80px",
"backgroundImage": {
"url": "${backgroundImageUrl}"
}
}
]
}
]
},
{
"type": "ActionSet",
"$when": "${!!buttonText}",
"actions": [
{
"type": "Action.OpenUrl",
"title": "${buttonText}",
"url": "${buttonUrl}"
}
],
"spacing": "Medium"
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}