Improve Lighthouse crawlability score
This commit is contained in:
parent
1cece74e0d
commit
c206471b87
2 changed files with 23 additions and 23 deletions
|
|
@ -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>`;
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue