From 0b43873189afd5fabb22e0f528233ab3d365bc3b Mon Sep 17 00:00:00 2001
From: Olivia206 <olivia.simonet206@gmail.com>
Date: Fri, 17 May 2024 18:34:04 +0200
Subject: [PATCH] schema.org and removed credit

---
 assets/sass/_theme/blocks/links.sass         | 21 ++++++++++---------
 layouts/partials/blocks/templates/links.html | 22 +++++---------------
 2 files changed, 16 insertions(+), 27 deletions(-)

diff --git a/assets/sass/_theme/blocks/links.sass b/assets/sass/_theme/blocks/links.sass
index 39ff971e..2b22eb04 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 4d0d0154..3bdbc153 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 -}}
-- 
GitLab