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 } = {}
) =>
(href?: url) =>
`<a ${href ? `href="${href}"` : ''}
class="image-button" tabindex="-1" rel="noopener" target="_blank" ${
shouldDownload ? 'download' : ''
}>
<button>
`
<button class="image-button">
${
href
? `<a href="${href}" tabindex="-1" rel="noopener" target="_blank" ${
shouldDownload ? 'download' : ''
}>`
: ''
}
<div class="svg-container">${svg}</div>
<p>${title}</p>
</button>
</a>`;
${href ? '</a>' : ''}
</button>`;

View file

@ -5,23 +5,19 @@
padding: var(--small-margin) 8px;
text-align: center;
> button {
cursor: pointer;
.svg-container {
position: relative;
margin: auto;
@include square(var(--icon-size));
> .svg-container {
position: relative;
margin: auto;
@include square(var(--icon-size));
> svg {
transition: stroke var(--transition-time), transform var(--transition-time);
}
}
> p {
font-size: 0.9rem;
font-style: italic;
text-align: center;
> svg {
transition: stroke var(--transition-time), transform var(--transition-time);
}
}
p {
font-size: 0.9rem;
font-style: italic;
text-align: center;
}
}