Skip to content

Commit 717bfc3

Browse files
committed
apply feedback
1 parent 23a1ac5 commit 717bfc3

File tree

9 files changed

+69
-18
lines changed

9 files changed

+69
-18
lines changed

docs/getting-started.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: Getting Started
33
description: How to install and use React Image Focal Point
44
---
55

6+
## Live demo
7+
8+
You can try this live demo in [Codesandbox](https://codesandbox.io/s/github/Lemoncode/react-image-focal-point/tree/main/examples/basic) or [StackBlitz](https://stackblitz.com/github/Lemoncode/react-image-focal-point/tree/main/examples/basic).
9+
610
## Installation
711

812
Install _React Image Focal Point_ using your favorite package manager:

website/src/components/HomepageFeatures/styles.module.css

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from 'react';
2+
import clsx from 'clsx';
3+
import Link from '@docusaurus/Link';
4+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
5+
import classes from './header.module.css';
6+
7+
export const Header: React.FC = () => {
8+
const { siteConfig } = useDocusaurusContext();
9+
return (
10+
<header className={clsx('hero hero--primary', classes.heroBanner)}>
11+
<div className="container">
12+
<h1 className="hero__title">{siteConfig.title}</h1>
13+
<p className="hero__subtitle">{siteConfig.tagline}</p>
14+
<div className={classes.buttons}>
15+
<Link className="button button--secondary button--lg" to="/docs/getting-started">
16+
Get started
17+
</Link>
18+
</div>
19+
</div>
20+
</header>
21+
);
22+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.heroBanner {
2+
padding: 4rem 0;
3+
text-align: center;
4+
position: relative;
5+
overflow: hidden;
6+
}
7+
8+
@media screen and (max-width: 996px) {
9+
.heroBanner {
10+
padding: 2rem;
11+
}
12+
}
13+
14+
.buttons {
15+
display: flex;
16+
align-items: center;
17+
justify-content: center;
18+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './header.component';

website/src/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './header';

website/src/css/custom.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
Learn more about overriding Docusaurus/Infima CSS variables here: https://docusaurus.io/docs/styling-layout#styling-your-site-with-infima
66
*/
77
:root {
8-
--ifm-color-primary: #2e5385;
9-
--ifm-color-primary-dark: #294b78;
10-
--ifm-color-primary-darker: #274771;
11-
--ifm-color-primary-darkest: #203a5d;
12-
--ifm-color-primary-light: #335b92;
13-
--ifm-color-primary-lighter: #355f99;
14-
--ifm-color-primary-lightest: #3c6cad;
8+
--ifm-color-primary: #005aad;
9+
--ifm-color-primary-dark: #00519c;
10+
--ifm-color-primary-darker: #004c93;
11+
--ifm-color-primary-darkest: #003f79;
12+
--ifm-color-primary-light: #0063be;
13+
--ifm-color-primary-lighter: #0067c7;
14+
--ifm-color-primary-lightest: #0075e1;
1515
--ifm-code-font-size: 95%;
1616
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
1717
}

website/src/pages/index.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from 'react';
2+
import Layout from '@theme/Layout';
3+
import { Header } from '@site/src/components';
4+
5+
const Home: React.FC = () => {
6+
return (
7+
<Layout description="React Image Focal Point provides a simple way to center a cropped image on a specific point.">
8+
<Header />
9+
<main>
10+
<p>TODO: Add youtube video</p>
11+
</main>
12+
</Layout>
13+
);
14+
};
15+
16+
export default Home;
54.4 KB
Loading

0 commit comments

Comments
 (0)