chore: add height/width for front page images (#6385)

* chore: add height/width for Lighthouse performance

* use auto width

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
Nick Schonning 2022-01-22 20:57:31 -05:00 committed by GitHub
parent efd211dba4
commit 2528226eeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 7 deletions

View file

@ -829,7 +829,7 @@ module.exports = {
{
html: `
<a href="https://www.netlify.com" target="_blank" rel="noreferrer noopener" aria-label="Deploys by Netlify">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" />
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" width="114" height="51" />
</a>
`,
},
@ -865,7 +865,7 @@ module.exports = {
{
html: `
<a href="https://www.netlify.com" target="_blank" rel="noreferrer noopener" aria-label="Deploys by Netlify">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" />
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" width="114" height="51" />
</a>
`,
},

View file

@ -471,7 +471,7 @@ const config = {
{
html: `
<a href="https://www.netlify.com" target="_blank" rel="noreferrer noopener" aria-label="Deploys by Netlify">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" />
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" width="114" height="51" />
</a>
`,
},

View file

@ -95,6 +95,8 @@ function Home(): JSX.Element {
alt={translate({message: 'Docusaurus with Keytar'})}
className={styles.heroLogo}
src={useBaseUrl('/img/docusaurus_keytar.svg')}
width="200"
height="200"
/>
<span
className={styles.heroTitleTextHtml}
@ -157,6 +159,8 @@ function Home(): JSX.Element {
className={styles.featureImage}
alt="Powered by MDX"
src={useBaseUrl('/img/undraw_typewriter.svg')}
width="1009.54"
height="717.96"
/>
<h2 className={clsx(styles.featureHeading)}>
<Translate>Powered by Markdown</Translate>
@ -176,6 +180,8 @@ function Home(): JSX.Element {
alt="Built Using React"
className={styles.featureImage}
src={useBaseUrl('/img/undraw_react.svg')}
width="1108"
height="731.18"
/>
<h2 className={clsx(styles.featureHeading)}>
<Translate>Built Using React</Translate>
@ -193,6 +199,8 @@ function Home(): JSX.Element {
alt="Ready for Translations"
className={styles.featureImage}
src={useBaseUrl('/img/undraw_around_the_world.svg')}
width="1137"
height="776.59"
/>
<h2 className={clsx(styles.featureHeading)}>
<Translate>Ready for Translations</Translate>
@ -213,6 +221,8 @@ function Home(): JSX.Element {
alt="Document Versioning"
className={styles.featureImage}
src={useBaseUrl('/img/undraw_version_control.svg')}
width="1038.23"
height="693.31"
/>
<h2 className={clsx(styles.featureHeading)}>
<Translate>Document Versioning</Translate>
@ -230,6 +240,8 @@ function Home(): JSX.Element {
alt="Document Search"
className={styles.featureImage}
src={useBaseUrl('/img/undraw_algolia.svg')}
width="1137.97"
height="736.21"
/>
<h2 className={clsx(styles.featureHeading)}>
<Translate>Content Search</Translate>

View file

@ -18,7 +18,7 @@
}
.featureImage {
max-width: 60%;
width: auto;
max-height: 128px;
margin: 0 auto;
}

View file

@ -763,7 +763,7 @@ module.exports = {
{
html: `
<a href="https://www.netlify.com" target="_blank" rel="noreferrer noopener" aria-label="Deploys by Netlify">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" />
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" width="114" height="51" />
</a>
`,
},

View file

@ -763,7 +763,7 @@ module.exports = {
{
html: `
<a href="https://www.netlify.com" target="_blank" rel="noreferrer noopener" aria-label="Deploys by Netlify">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" />
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" width="114" height="51" />
</a>
`,
},
@ -799,7 +799,7 @@ module.exports = {
{
html: `
<a href="https://www.netlify.com" target="_blank" rel="noreferrer noopener" aria-label="Deploys by Netlify">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" />
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" width="114" height="51" />
</a>
`,
},