article-infos

Information

Folder
src/components/patterns/article-infos

Files

Schema
Mocks
Template
// src/components/patterns/article-infos/article-infos.twig

{{ attach_library("circle_dot/pattern-article-infos") }}

{% set size = size|default('regular') %}
{% set variant = variant|default('dark') %}
{% set show_first_separator = show_first_separator|default(false) %}

{% set classes = [
  'ArticleInfos',
	'ArticleInfos--' ~ size,
	'ArticleInfos--' ~ variant,
] %}

{% if infos %}
	<div class="{{ classes|join(' ') }}">
		<div class="ArticleInfos-content {{ is_centered ? 'ArticleInfos--centered' : '' }}">
		<ul class="ArticleInfos-items">
			{% for info in infos %}
				<li class="ArticleInfos-item {% if not loop.last and (show_first_separator or not loop.first) %}with-separator{% endif %}">
					{{ info }}
				</li>
			{% endfor %}
		</ul>
		{% if extLink %}
			<div class="ArticleInfos-externalLink">
				<a href="{{ extLink.url }}" class="ArticleInfos-externalLinkButton" target="_blank" rel="noopener noreferrer">
					<span class="u-hiddenVisually">{{ extLink.label }}</span>
					{% include "@elements/icon/icon.twig" with {
						name: "ic-external-link",
						classes: ["ArticleInfos-externalLinkIcon"]
					} only %}
				</a>
			</div>
		{% endif %}
		</div>
	</div>
{% endif %}

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

Variants

Author with image
Open

Author with image mock data

Raw
Resolved
Author without image
Open

Author without image mock data

Raw
Resolved
NJW badge and Author with image
Open

NJW badge and Author with image mock data

Raw
Resolved
NJW badge, Author, text
Open

NJW badge, Author, text mock data

Raw
Resolved
NJW badge, Author, all slots
Open

NJW badge, Author, all slots mock data

Raw
Resolved
All slots, external link
Open

All slots, external link mock data

Raw
Resolved
On media
Open

On media mock data

Raw
Resolved
Source attribution
Open

Source attribution mock data

Raw
Resolved
Case citation
Open

Case citation mock data

Raw
Resolved