Newer
Older
{{- $block := .block -}}
{{- $block_class := partial "GetBlockClass" .block -}}
{{- with .block.data -}}
<div class="{{ $block_class }}">
<div class="container">
<div class="block-content">
{{ partial "blocks/top.html" (dict
"title" $block.title
"heading_level" $block.ranks.self
"description" .description
)}}
<ul class="links">
{{- range .links }}
<li itemscope itemtype="https://schema.org/WebPage">
{{ $title := partial "PrepareHTML" .title }}
{{ $a11y_title := .alt_title | default $title }}
{{ $is_external := .external | default true }}
{{ $link_title := cond $is_external (safeHTML (i18n "commons.link.blank_aria" (dict "Title" $a11y_title))) $a11y_title }}
<a itemprop="relatedLink" href="{{ .url }}" title="{{ $link_title }}" {{ if $is_external -}} target="_blank" rel="noopener" {{- end }}>
Olivia Simonet
committed
<span itemprop="name">{{- $title -}}</span>
{{ if $is_external }}
Olivia Simonet
committed
<span class="sr-only"> - {{ safeHTML (i18n "commons.link.blank") }}</span>
{{ end }}
</a>
{{ with .description }}
<p>{{ . | safeHTML }}</p>
{{ end }}
{{- partial "commons/image.html"
(dict
"image" .image
"alt" .alt