Skip to content

Commit

Permalink
preload hero image
Browse files Browse the repository at this point in the history
  • Loading branch information
SvMak committed Sep 17, 2024
1 parent 878e78d commit 785e9fd
Showing 1 changed file with 32 additions and 28 deletions.
60 changes: 32 additions & 28 deletions src/components/sections/welcome/Hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,45 @@ import Link from '@docusaurus/Link';
import clsx from 'clsx';

import GithubButton from '@site/src/components/GithubButton';
// import HeroFamily from '@site/static/images/logo/hero-family.svg';
import styles from './styles.module.scss';

const heroImageSrc = '/images/logo/hero-family.webp';

export default function Hero() {
return (
<header className={styles.section}>
<div className={clsx('container', styles.sectionContent)}>
<div>
<h1 className={styles.sectionTitle}>
Greetings,
<br /> Java <span className="text--primary">Hipster</span>!
</h1>
<>
<link rel="preload" as="image" href={heroImageSrc} />

<header className={styles.section}>
<div className={clsx('container', styles.sectionContent)}>
<div>
<h1 className={styles.sectionTitle}>
Greetings,
<br /> Java <span className="text--primary">Hipster</span>!
</h1>

<p className={styles.sectionDescription}>
JHipster is a development platform to quickly generate, develop, and
deploy modern web applications & microservice architectures.
</p>
<p className={styles.sectionDescription}>
JHipster is a development platform to quickly generate, develop,
and deploy modern web applications & microservice architectures.
</p>

<div className={styles.sectionButtons}>
<Link className="button button--primary" to="/getting-started">
Getting Started
</Link>
<GithubButton>GitHub</GithubButton>
<div className={styles.sectionButtons}>
<Link className="button button--primary" to="/getting-started">
Getting Started
</Link>
<GithubButton>GitHub</GithubButton>
</div>
</div>
</div>

<img
className={styles.sectionImage}
src="/images/logo/hero-family.webp"
alt="JHipster family"
width={476}
height={380}
/>
{/* <HeroFamily className={styles.sectionImage} /> */}
</div>
</header>
<img
className={styles.sectionImage}
src={heroImageSrc}
alt="JHipster family"
width={476}
height={380}
/>
</div>
</header>
</>
);
}

0 comments on commit 785e9fd

Please sign in to comment.