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 1 commit
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
15 changes: 14 additions & 1 deletion src/components/HomePageHeader/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,24 @@
}

.hero {
background: url('/static/img/bg-pattern-dark.png');
/* background: url('/static/img/bg-pattern-dark.png'); */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't like it?
other proposal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially, I thought of leaving only the black background; it seemed to me a more modern and minimalist look. If, instead, we want to keep a background image, as an alternative, I would have something similar to this:

image

What do you think? Otherwise, it's perfectly fine to keep the current one.

display: flex;
align-items: center;
justify-content: center;
background-color: black;
height: 50vh;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more in line with the actual

Suggested change
height: 50vh;
height: 32vh;

filter: invert(var(--fty-hero-color-filter));
padding: 3rem 2rem;
}

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

.hero img {
max-width: 320px;
}
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
11 changes: 11 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,14 @@
border-radius: var(--ifm-code-border-radius);
padding: 2em 1em 1em;
}

.text-center {
text-align: center;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I couldn't find something similar. Infima doesn't seem to have as many utility classes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead, it exists, it's not written in the documentation, but by trying, using Infima's style 'with double dash' I managed to use Infima's utility class. I will remove this line of code.


.flex {
display: flex;
justify-content: center;
align-items: center;
gap: 4rem;
}
21 changes: 15 additions & 6 deletions src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,17 @@ 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 +46,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 +59,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 +135,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