Closed github-learning-lab[bot] closed 4 years ago
:white_check_mark::white_check_mark::white_check_mark::x:
:white_check_mark: Code compilation :white_check_mark: Define two info cards in the home block :white_check_mark: Declare info-card#button-right and info-card#button-left :x: You didn't use the info-card properties we're expecting
:white_check_mark::white_check_mark::white_check_mark::white_check_mark:
:white_check_mark: Code compilation :white_check_mark: Define two info cards in the home block :white_check_mark: Declare info-card#button-right and info-card#button-left :white_check_mark: Define the correct info card properties
Info Card: Store Framework's call to action
:sparkles: Branch: infocard
Introduction
A store needs a good home page to engage users, increasing session time and therefore conversion chances. To achieve this, several elements need to be used, such as promotional banners, shelves with highlights, about us material, etc.
We have created the next block on the home page using a call to action. In Store Framework, we have a block designed for this purpose, called Info Card.
Info Card
Using the Info Card, you can create images which have links and buttons (top or side of the block) that direct the user's flow (Call to action).
Looking at the documentation, we can see that:
isFullModeStyle
defines whether the Call to Action (CTA) is set above the banner;textPosition
defines the position of the text;textAlignment
defines the text's alignment;imageUrl
defines which image will be used as banner;headline
determines which text will be used as headline;callToActionMode
allows to choose the CTA mode as either a link or a button;callToActionText
defines the CTA text;callToActionUrl
determines the URL to which it redirects;We therefore have the following props:
Instancing blocks
You may have asked yourself:
It's possible through block instancing.
All block have pre-established names, but you can create block instances and define different ways in which the block types appear. After each block has been defined, simply place an '#' with an arbitrary name that makes, for example:
In the
home.jsonc
file, based on the code above, create theinfo-card#button-left
right under the infocard:info-card#button-right
. This new infocard must implement the following:Shining chrome
Go to Collection
https://appliancetheme.vteximg.com.br/arquivos/cozinha-cinza-min.png
Give your kitchen a cool style adding warm metallic finishes.<br>Available until January 2020.
textPosition
).The expected result will look similar to this:
:information_source: Remember to access the Info Card documentation if you have any questions regarding the activity.
If you're still unsure as to how to send your answers, click here.