mirror of
https://github.com/zadam/trilium.git
synced 2025-10-28 18:18:55 +01:00
feat(website): add alt + lazy loading
This commit is contained in:
parent
f991276152
commit
a15aab395a
@ -14,7 +14,7 @@ interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|||||||
export default function Card({ title, children, imageUrl, iconSvg, className, moreInfoUrl, ...restProps }: CardProps) {
|
export default function Card({ title, children, imageUrl, iconSvg, className, moreInfoUrl, ...restProps }: CardProps) {
|
||||||
return (
|
return (
|
||||||
<div className={`card ${className}`} {...restProps}>
|
<div className={`card ${className}`} {...restProps}>
|
||||||
{imageUrl && <img class="image" src={imageUrl} />}
|
{imageUrl && <img class="image" src={imageUrl} loading="lazy" />}
|
||||||
|
|
||||||
<div className="card-content">
|
<div className="card-content">
|
||||||
<h3>
|
<h3>
|
||||||
|
|||||||
@ -29,7 +29,7 @@ export function Header() {
|
|||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="first-row">
|
<div class="first-row">
|
||||||
<a class="banner" href="/">
|
<a class="banner" href="/">
|
||||||
<img src={logoPath} width="300" height="300" /> <span>Trilium Notes</span>
|
<img src={logoPath} width="300" height="300" alt="Trilium Notes logo" /> <span>Trilium Notes</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
@ -84,7 +84,7 @@ function HeroSection() {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{screenshotUrl && <img class="screenshot" src={screenshotUrl} />}
|
{screenshotUrl && <img class="screenshot" src={screenshotUrl} alt="Screenshot of the Trilium Notes desktop application" />}
|
||||||
</Section>
|
</Section>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -258,7 +258,7 @@ function ListWithScreenshot({ items, horizontal, cardExtra }: {
|
|||||||
<div className="details">
|
<div className="details">
|
||||||
{selectedItem && (
|
{selectedItem && (
|
||||||
<>
|
<>
|
||||||
<img src={selectedItem.imageUrl} />
|
<img src={selectedItem.imageUrl} alt="Screenshot of the feature being selected" loading="lazy" />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user