// Set up a particular post
{% set demo_icon %}
{% include '@bolt-elements-icon/icon.twig' with {
name: 'pega-chat-question',
size: 'large',
color: 'teal',
} only %}
{% endset %}
{% set demo_action_menu %}
{% set list_items %}
{% set reply %}
{% include '@bolt-elements-text-link/text-link.twig' with {
content: 'Reply',
icon_before: icon_reply,
attributes: {
type: 'button'
}
} only %}
{% endset %}
{% set reply %}
{% include '@bolt-elements-text-link/text-link.twig' with {
content: 'Reply',
icon_before: icon_reply,
attributes: {
type: 'button'
}
} only %}
{% endset %}
{% include '@bolt-elements-menu/menu-item.twig' with {
content: reply,
} only %}
{% set favorite %}
{% include '@bolt-elements-text-link/text-link.twig' with {
content: 'Favorite',
icon_before: icon_heart,
attributes: {
type: 'button'
}
} only %}
{% endset %}
{% include '@bolt-elements-menu/menu-item.twig' with {
content: favorite,
} only %}
{% set subscribe %}
{% include '@bolt-elements-text-link/text-link.twig' with {
content: 'Subscribe',
icon_before: icon_eye,
attributes: {
type: 'button'
}
} only %}
{% endset %}
{% include '@bolt-elements-menu/menu-item.twig' with {
content: subscribe,
} only %}
{% endset %}
{% include '@bolt-elements-menu/menu.twig' with {
title: 'More actions',
content: list_items
} only %}
{% endset %}
{% set demo_post %}
{% include '@bolt-components-listing-teaser/listing-teaser.twig' with {
signifier: demo_icon,
headline: {
text: 'This is a post with actions (also favorited and subscribed)',
tag: 'h3',
size: 'large',
link_attributes: {
href: 'https://google.com'
},
},
meta_items: [
'Posted by <a href="#!" class="e-bolt-text-link e-bolt-text-link--reversed-underline">mikemai</a> on Apr 9, 2020',
'Last activity: 8 hours 26 minutes ago',
],
description: description,
reply: reply,
status: {
solved: true,
locked: true,
number_items: number_items,
},
action_menu: demo_action_menu,
} only %}
{% endset %}
// Render a list to display posts
{% include '@bolt-components-list/list.twig' with {
spacing: 'small',
inset: true,
separator: 'solid',
items: [
demo_post,
]
} only %}