Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 'Getting Started' button and started improving homepage style #164

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/HomePageHeader/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ function HomepageHeader() {

return (
<header className={css.hero}>
<div className="container">
<div className={css['flex-col']}>
<img alt={siteConfig.title} src={`img/logos/fastify-white.svg`} />

<h2>{siteConfig.tagline}</h2>
<h2 className="text--center">{siteConfig.tagline}</h2>

<div>
<GitHubButton
Expand Down
13 changes: 12 additions & 1 deletion src/components/HomePageHeader/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,19 @@

.hero {
background: url('/static/img/bg-pattern-dark.png');
display: flex;
align-items: center;
justify-content: center;
filter: invert(var(--fty-hero-color-filter));
padding: 3rem 2rem;
padding: 2rem;
}

.flex-col {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0.5rem;
}

.hero img {
Expand Down
2 changes: 1 addition & 1 deletion src/components/QuickStart/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ start()`

return (
<>
<h1>Quick start</h1>
<h1 className="text--center">Quick start</h1>
<p>Get Fastify with NPM:</p>

<CodeBlock language="bash">npm install fastify</CodeBlock>
Expand Down
12 changes: 12 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,15 @@
border-radius: var(--ifm-code-border-radius);
padding: 2em 1em 1em;
}

.flex {
display: flex;
justify-content: center;
align-items: center;
gap: 2.5rem;
}

.button {
width: 10.5rem;
padding: 0.5rem 1rem;
}
22 changes: 16 additions & 6 deletions src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,18 @@ export default function Home() {
<HomepageHeader />

<main>
<section className="section flex">
<Link to="/docs/latest/Guides/Getting-Started" className="button button--lg button--primary">
Getting Started
</Link>

<Link to="/resources" className="button button--lg button--secondary">
Learn More
Eomm marked this conversation as resolved.
Show resolved Hide resolved
</Link>
</section>

<section className="section">
<div className="container">
<div className="container text--center">
<h1>Why</h1>
<p>
An efficient server implies a lower cost of the infrastructure, a better responsiveness under load and
Expand All @@ -37,7 +47,7 @@ export default function Home() {
</section>

<section className="section">
<div className="container">
<div className="container text--center">
<h1>Who is using Fastify?</h1>
<p>Fastify is proudly powering a large ecosystem of organisations and products out there.</p>
<p>
Expand All @@ -50,8 +60,8 @@ export default function Home() {

<section className="section alternate">
<div className="container">
<h1>Core features</h1>
<p>These are the main features and principles on which Fastify has been built:</p>
<h1 className="text--center">Core features</h1>
<p className="text--center">These are the main features and principles on which Fastify has been built:</p>
<ul>
<li>
<strong>Highly performant:</strong> as far as we know, Fastify is one of the fastest web frameworks in
Expand Down Expand Up @@ -126,8 +136,8 @@ export default function Home() {

<section className="section">
<div className="container">
<h1>Meet The Team</h1>
<p>
<h1 className="text--center">Meet The Team</h1>
<p className="text--center">
<i>In alphabetical order</i>
</p>
<Team />
Expand Down
Loading