diff --git a/assets/sass/_theme/blocks/links.sass b/assets/sass/_theme/blocks/links.sass index 39ff971e5349fd3c755ca4e232200d67677bab41..2b22eb0451acb802f02a510132f8d0872f945515 100644 --- a/assets/sass/_theme/blocks/links.sass +++ b/assets/sass/_theme/blocks/links.sass @@ -4,32 +4,33 @@ @include grid(2, md) align-items: flex-start li + @include icon(link-blank, after, true) background-color: $block-lien-card-background display: flex flex-direction: column-reverse justify-content: flex-end min-height: pxToRem(130) position: relative + &::after + position: absolute + bottom: space(4) + right: space(4) .link-content padding: space(4) + line-height: 100% a @include stretched-link(before) - &::after - position: absolute - bottom: space(4) - right: space(4) + text-decoration: none p @include small - margin-top: space() - figure + margin-top: space(3) + .media + aspect-ratio: 16/9 position: relative img + display: block aspect-ratio: 16/9 object-fit: cover - figcaption - text-align: right - padding-left: space(4) - padding-right: space(4) @include in-page-without-sidebar .top display: flex diff --git a/layouts/partials/blocks/templates/links.html b/layouts/partials/blocks/templates/links.html index 4d0d0154d076f0e6f40d1c0a88bc2d17e2a7e907..3bdbc153d28f70abf36c3da06c66a7b8e662604f 100644 --- a/layouts/partials/blocks/templates/links.html +++ b/layouts/partials/blocks/templates/links.html @@ -13,35 +13,23 @@ <ul class="links"> {{- range .links }} - <li> + <li itemscope itemtype="https://schema.org/WebPage"> <div class="link-content"> {{- $title := partial "PrepareHTML" .title -}} {{- $url := .url -}} - <a href="{{ .url }}" - {{ if .target_blank }} - title="{{ i18n "commons.link.blank_aria" (dict "Title" $title) }}" - target="_blank" - {{ else }} - title="{{ $title }}" - {{ end }} - >{{- $title -}} - </a> + <link itemprop="url" href="{{ .url }}"> + <a itemprop="relatedLink" href="{{ .url }}" title="{{ $title }}"><span itemprop="name">{{- $title -}}</span></a> <p>{{ .description | safeHTML }}</p> </div> {{- if .image -}} - <figure> + <div class="media"> {{- partial "commons/image.html" (dict "image" .image "alt" .alt "sizes" site.Params.image_sizes.blocks.links ) -}} - {{- if .credit -}} - <figcaption> - {{ partial "PrepareHTML" .credit }} - </figcaption> - {{- end -}} - </figure> + </div> {{- end -}} </li> {{ end -}}