bootstrap_italia-8.x-0.x-dev/patterns/card2/pattern-card2-big.html.twig
patterns/card2/pattern-card2-big.html.twig
{% apply spaceless %} {% set card_body_classes = [ content_padding == 'xs' ? 'px-1', content_padding == 'xs' ? 'px-md-2', content_padding == 'sm' ? 'px-2', content_padding == 'sm' ? 'px-md-3', content_padding == 'md' ? 'px-3', content_padding == 'md' ? 'px-md-4', content_padding == 'lg' ? 'px-4', content_padding == 'lg' ? 'px-md-5', content_padding == 'xl' ? 'px-5', content_padding == 'xxl' ? 'px-5', ] %} {% if variant == 'article' %} {% include '@bi-bcl/card/card-big.html.twig' with { card_image: false, card_title: card_title, card_text: card_text, card_category: card_category, card_date: card_date, card_icon: false, card_icon_color: false, card_signature: card_signature, card_read_more_url: card_read_more_url['node_link']['0']['0']['#context']['entity_url'] ? card_read_more_url['node_link']['0']['0']['#context']['entity_url']|render : card_read_more_url|render|striptags|trim, card_read_more_text: card_title|render|striptags|trim, card_read_more_type: read_more_type == 'button' ? 'button' : 'link', card_shadow: card_shadow, card_border_bottom: border_bottom, card_flag_invisible: flag_invisible, card_body_classes: card_body_classes, card_classes: ['mb-3'] } %} {% elseif variant == 'flag' %} {% include '@bi-bcl/card/card-big-flag.html.twig' with { card_image: false, card_title: card_title, card_text: card_text, card_category: card_category, card_date: false, card_icon: card_icon ?? default_icon, card_icon_color: default_icon_color, card_signature: card_signature, card_read_more_url: card_read_more_url['node_link']['0']['0']['#context']['entity_url'] ? card_read_more_url['node_link']['0']['0']['#context']['entity_url']|render : card_read_more_url|render|striptags|trim, card_read_more_text: card_title|render|striptags|trim, card_read_more_type: read_more_type == 'button' ? 'button' : 'link', card_shadow: card_shadow, card_border_bottom: border_bottom, card_flag_invisible: flag_invisible, card_body_classes: card_body_classes, card_classes: ['mb-3'] } %} {% elseif variant == 'icon' %} {% include '@bi-bcl/card/card-big-icon.html.twig' with { card_image: false, card_title: card_title, card_text: card_text, card_category: false, card_date: false, card_icon: card_icon ?? default_icon, card_signature: card_signature, card_read_more_url: card_read_more_url['node_link']['0']['0']['#context']['entity_url'] ? card_read_more_url['node_link']['0']['0']['#context']['entity_url']|render : card_read_more_url|render|striptags|trim, card_read_more_text: card_title|render|striptags|trim, card_read_more_type: read_more_type == 'button' ? 'button' : 'link', card_shadow: card_shadow, card_border_bottom: border_bottom, card_flag_invisible: true, card_body_classes: card_body_classes, card_classes: ['mb-3'] } %} {% elseif variant == 'image' %} {% if card_date['date-full'] or card_date['year'] or card_date['day'] or card_date['time'] or card_date['month'] %} {% set card_image_date = card_date %} {% elseif card_date %} {# Check if 'dd m y' #} {% set _date_value = card_date|render|striptags|trim|split(' ') %} {% if _date_value|length == 2 %} {% set card_image_date = { 'day': _date_value[0], 'month': _date_value[1] } %} {% elseif _date_value|length == 3 %} {% set card_image_date = { 'day': _date_value[0], 'month': _date_value[1], 'year': _date_value[2], } %} {% elseif _date_value|length == 4 %} {% set card_image_date = { 'day': _date_value[0], 'month': _date_value[1], 'year': _date_value[2], 'time': _date_value[3], } %} {% else %} {% set card_image_date = {'date-full': card_date } %} {% endif %} {% endif %} {% include '@bi-bcl/card/card-big.html.twig' with { card_image: card_image, card_image_date: card_image_date, image_panoramic: image_panoramic, card_title: card_title, card_text: card_text, card_category: false, card_date: false, card_icon: false, card_icon_color: false, card_signature: card_signature, card_read_more_url: card_read_more_url['node_link']['0']['0']['#context']['entity_url'] ? card_read_more_url['node_link']['0']['0']['#context']['entity_url']|render : card_read_more_url|render|striptags|trim, card_read_more_text: card_title|render|striptags|trim, card_read_more_type: read_more_type == 'button' ? 'button' : 'link', card_shadow: card_shadow, card_border_bottom: border_bottom, card_flag_invisible: flag_invisible, card_body_classes: card_body_classes, card_classes: ['mb-3'] } %} {% endif %} {% endapply %}