Improve Lighthouse crawlability score

This commit is contained in:
Andras Schmelczer 2022-09-28 14:30:05 +02:00
parent 1cece74e0d
commit c206471b87
No known key found for this signature in database
GPG key ID: 0EA1BC97D0AB076E
2 changed files with 23 additions and 23 deletions

View file

@ -8,12 +8,16 @@ export const ImageButtonFactory =
{ shouldDownload = false }: { shouldDownload?: boolean } = {} { shouldDownload = false }: { shouldDownload?: boolean } = {}
) => ) =>
(href?: url) => (href?: url) =>
`<a ${href ? `href="${href}"` : ''} `
class="image-button" tabindex="-1" rel="noopener" target="_blank" ${ <button class="image-button">
${
href
? `<a href="${href}" tabindex="-1" rel="noopener" target="_blank" ${
shouldDownload ? 'download' : '' shouldDownload ? 'download' : ''
}> }>`
<button> : ''
}
<div class="svg-container">${svg}</div> <div class="svg-container">${svg}</div>
<p>${title}</p> <p>${title}</p>
</button> ${href ? '</a>' : ''}
</a>`; </button>`;

View file

@ -5,10 +5,7 @@
padding: var(--small-margin) 8px; padding: var(--small-margin) 8px;
text-align: center; text-align: center;
> button { .svg-container {
cursor: pointer;
> .svg-container {
position: relative; position: relative;
margin: auto; margin: auto;
@include square(var(--icon-size)); @include square(var(--icon-size));
@ -18,10 +15,9 @@
} }
} }
> p { p {
font-size: 0.9rem; font-size: 0.9rem;
font-style: italic; font-style: italic;
text-align: center; text-align: center;
} }
}
} }