fix(website): lazy-load YT iframe (#6746)

This commit is contained in:
Joshua Chen 2022-03-30 22:50:16 +08:00 committed by GitHub
parent 04affa60b6
commit bb55586c20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -171,6 +171,7 @@ function VideoContainer() {
frameBorder="0" frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen allowFullScreen
loading="lazy"
/> />
</div> </div>
</div> </div>
@ -196,6 +197,7 @@ function Feature({
width={feature.image.width} width={feature.image.width}
height={feature.image.height} height={feature.image.height}
src={withBaseUrl(feature.image.src)} src={withBaseUrl(feature.image.src)}
loading="lazy"
/> />
<h3 className={clsx(styles.featureHeading)}>{feature.title}</h3> <h3 className={clsx(styles.featureHeading)}>{feature.title}</h3>
<p className="padding-horiz--md">{feature.text}</p> <p className="padding-horiz--md">{feature.text}</p>