standard-teaser-list

Information

Folder
src/components/patterns/teaser-list/standard-teaser-list

Files

Schema
Mocks
Template
// src/components/patterns/teaser-list/standard-teaser-list/standard-teaser-list.twig

{{ attach_library("circle_dot/pattern-standard-teaser-list") }}

{# Build class list #}
{% set classes = [
	'StandardTeaserList',
	(with_top_padding is defined and not with_top_padding) ? 'StandardTeaserList--noTopPadding'
] %}

<section class="{{ classes|join(' ')|trim }} {% if should_contain %}u-container{% endif %} {% if should_breakout %}u-breakout{% endif %}">
	{% if segment_headline %}
		{# Check if segment_headline is rendered HTML (component) or plain text #}
		{% set is_component = segment_headline|trim starts with '<' %}

		{% if is_component %}
			{# It's a rendered component (SegmentHeadline), output it directly #}
			{{ segment_headline }}
		{% else %}
			{# It's plain text, build the header inline #}
			<header class="StandardTeaserList-header">
				<div class="StandardTeaserList-headerTop">
					<div class="StandardTeaserList-headlineWrapper">
						<h2 class="StandardTeaserList-headline">{{ segment_headline }}</h2>
						{% if segment_link %}
							<a href="{{ segment_link_url|default('#') }}" class="StandardTeaserList-link" aria-label="View more">
								<svg class="StandardTeaserList-linkIcon" width="24" height="24" viewbox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
									<path d="M5 12H19M19 12L12 5M19 12L12 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
								</svg>
							</a>
						{% endif %}
					</div>
				</div>
				<div class="StandardTeaserList-divider"></div>
			</header>
		{% endif %}
	{% endif %}

	<div class="StandardTeaserList-list {% if as_grid %}StandardTeaserList-grid{% endif %} {% if as_stack %}StandardTeaserList-stack{% endif %}">
		{% for teaser in teasers %}
			<div class="StandardTeaserList-item {% if is_ranked_list %}StandardTeaserList-itemRanked{% endif %}" data-index="{{ loop.index }}">
				{{ teaser }}
			</div>
			{% if not loop.last and with_divider %}
				<div class="StandardTeaserList-separator"></div>
			{% endif %}
		{% endfor %}
	</div>
</section>

Error: schema is invalid: data/properties must be object

Variants

Three medium with kicker and heading
Open

Three medium with kicker and heading mock data

Raw
Resolved
Three xs with kicker and heading
Open

Three xs with kicker and heading mock data

Raw
Resolved
Stacked three xs with kicker and heading
Open

Stacked three xs with kicker and heading mock data

Raw
Resolved
Segment headline and link with stack
Open

Segment headline and link with stack mock data

Raw
Resolved
With segment headline and link
Open

With segment headline and link mock data

Raw
Resolved
With sorting dropdown
Open

With sorting dropdown mock data

Raw
Resolved
Without segment headline
Open

Without segment headline mock data

Raw
Resolved
Two teasers
Open

Two teasers mock data

Raw
Resolved
Four teasers
Open

Four teasers mock data

Raw
Resolved
With images and segment headline
Open

With images and segment headline mock data

Raw
Resolved
With images (no segment headline)
Open

With images (no segment headline) mock data

Raw
Resolved
Six items with segment headline and link
Open

Six items with segment headline and link mock data

Raw
Resolved
Ressort Two Teasers No Headline
Open

Ressort Two Teasers No Headline mock data

Raw
Resolved
NJW, Standard, no Segment Headline
Open

NJW, Standard, no Segment Headline mock data

Raw
Resolved
Ranked List
Open

Ranked List mock data

Raw
Resolved