// Set up variables
{% set demo_action_menu %}
{% include '@bolt-components-menu/menu.twig' with {
title: 'More actions',
items: [
{
content: 'Reply',
icon_before: icon_reply,
},
{
content: 'Favorite',
icon_before: icon_heart,
},
{
content: 'Subscribe',
icon_before: icon_eye,
},
]
} only %}
{% endset %}
{% set demo_share_menu %}
{% include '@bolt-components-share/share.twig' with {
display: 'menu',
size: 'small',
text: 'Share this listing',
sources: [
{
name: 'facebook',
attributes: {
href: 'https://www.facebook.com/sharer/sharer.php?u=https://google.com&src=sdkpreparse'
}
},
{
name: 'twitter',
attributes: {
href: 'https://twitter.com/intent/tweet?url=https://google.com&text=Sample%20Share%20Text&via=pega&hashtags=boltDesignSystemRocks!'
}
},
{
name: 'linkedin',
attributes: {
href: 'https://www.linkedin.com/shareArticle?url=https://google.com'
}
},
{
name: 'email',
attributes: {
href: 'mailto:?&body=Sample%20Text%20--%20https%3A//boltdesignsystem.com'
}
}
],
copy_to_clipboard: {
text_to_copy: 'https://google.com'
},
} only %}
{% endset %}
{% set number_items %}
{% include '@bolt-components-listing-teaser/listing-teaser-status-number.twig' with {
number: '167',
label: 'Replies',
} only %}
{% include '@bolt-components-listing-teaser/listing-teaser-status-number.twig' with {
number: '6k',
label: 'Views',
} only %}
{% endset %}
// Use the variables in the appropriate props
{% include '@bolt-components-listing-teaser/listing-teaser.twig' with {
headline: {
text: 'This listing has every status and menu possible',
tag: 'h3',
size: 'large',
link_attributes: {
href: 'https://google.com'
},
},
meta_items: [
'Posted 8 hours 15 minutes ago',
'Last activity: 2 minutes ago',
],
status: {
solved: true,
solved_label: 'Completed',
locked: true,
locked_label: 'Archived',
number_items: number_items,
},
action_menu: demo_action_menu,
share_menu: demo_share_menu,
} only %}