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">
shouldDownload ? 'download' : '' ${
}> href
<button> ? `<a href="${href}" tabindex="-1" rel="noopener" target="_blank" ${
shouldDownload ? 'download' : ''
}>`
: ''
}
<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,23 +5,19 @@
padding: var(--small-margin) 8px; padding: var(--small-margin) 8px;
text-align: center; text-align: center;
> button { .svg-container {
cursor: pointer; position: relative;
margin: auto;
@include square(var(--icon-size));
> .svg-container { > svg {
position: relative; transition: stroke var(--transition-time), transform var(--transition-time);
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;
} }
} }
p {
font-size: 0.9rem;
font-style: italic;
text-align: center;
}
} }