Skip to content

Commit 417d48a

Browse files
committed
add website
1 parent fff4c35 commit 417d48a

File tree

14 files changed

+21653
-13
lines changed

14 files changed

+21653
-13
lines changed

examples/styled/README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@ import { ImageFocalPoint } from '@lemoncode/react-image-focal-point';
1313
const App = () => {
1414
return (
1515
<ImageFocalPoint
16-
src="your-image-src"
17-
onChange={(newFocalPoint) => {
18-
// Whatever you want to do when the user clicks on the image
19-
}}
20-
/>
16+
src="your-image-src"
17+
onChange={newFocalPoint => {
18+
// Whatever you want to do when the user clicks on the image
19+
}}
20+
/>
2121
);
22-
}
23-
22+
};
2423
```
2524

2625
Create a css file and provide some styles to the root component:
@@ -32,7 +31,6 @@ _app.css_
3231
width: 500px;
3332
height: 500px;
3433
}
35-
3634
```
3735

3836
Use it:
@@ -119,4 +117,3 @@ const App = () => {
119117
height="36"
120118
/>
121119
</a>
122-

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
"workspaces": [
55
"packages/**/*",
66
"examples/**/*",
7-
"docs/**/*"
7+
"website"
88
],
99
"scripts": {
1010
"build": "turbo run build",
1111
"start": "turbo run start --continue --filter=./examples/**/* --filter=./packages/**/*",
12-
"start:e2e": "turbo run start --continue --filter=./packages/**/*",
12+
"start:docs": "turbo run start --continue --filter=./website",
1313
"test": "turbo run test",
1414
"test:e2e": "turbo run test:e2e",
1515
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * from './image-focal-point.component';
2-
export * from './image-focal-point.vm';
1+
export { ImageFocalPoint, type ImageFocalPointProps } from './image-focal-point.component';
2+
export type { FocalPoint } from './image-focal-point.vm';

website/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

website/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

website/docusaurus.config.js

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
// @ts-check
2+
// Note: type annotations allow type checking and IDEs autocompletion
3+
4+
const lightCodeTheme = require('prism-react-renderer/themes/github');
5+
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
6+
7+
/** @type {import('@docusaurus/types').Config} */
8+
const config = {
9+
title: 'React Image Focal Point',
10+
tagline: 'Image focal point component for React',
11+
favicon: 'img/favicon.ico',
12+
13+
// Set the production url of your site here
14+
// TODO.
15+
url: 'https://your-docusaurus-test-site.com',
16+
baseUrl: '/',
17+
organizationName: 'lemoncode',
18+
projectName: 'react-image-focal-point',
19+
onBrokenLinks: 'throw',
20+
onBrokenMarkdownLinks: 'warn',
21+
i18n: {
22+
defaultLocale: 'en',
23+
locales: ['en'],
24+
},
25+
presets: [
26+
[
27+
'classic',
28+
/** @type {import('@docusaurus/preset-classic').Options} */
29+
({
30+
docs: {
31+
path: '../docs',
32+
sidebarPath: require.resolve('./sidebars.js'),
33+
remarkPlugins: [require('@docusaurus/remark-plugin-npm2yarn')],
34+
showLastUpdateTime: true,
35+
},
36+
blog: false,
37+
theme: {
38+
customCss: require.resolve('./src/css/custom.css'),
39+
},
40+
}),
41+
],
42+
],
43+
44+
themeConfig:
45+
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
46+
({
47+
// TODO: Update image
48+
image: 'img/docusaurus-social-card.jpg',
49+
navbar: {
50+
title: 'React Image Focal Point',
51+
logo: {
52+
alt: 'React Image Focal Point Logo',
53+
src: 'img/logo.svg',
54+
},
55+
items: [
56+
{
57+
type: 'doc',
58+
docId: 'getting-started',
59+
position: 'left',
60+
label: 'Docs',
61+
},
62+
{
63+
type: 'doc',
64+
docId: 'examples/basic',
65+
position: 'left',
66+
label: 'Examples',
67+
},
68+
{
69+
href: 'https://github.com/Lemoncode/react-image-focal-point',
70+
label: 'GitHub',
71+
position: 'right',
72+
},
73+
],
74+
},
75+
footer: {
76+
style: 'dark',
77+
links: [
78+
{
79+
title: 'Docs',
80+
items: [
81+
{
82+
label: 'Getting Started',
83+
to: '/docs/getting-started',
84+
},
85+
],
86+
},
87+
{
88+
title: 'Community',
89+
items: [
90+
{
91+
label: 'Twitter',
92+
href: 'https://twitter.com/lemoncoders',
93+
},
94+
],
95+
},
96+
{
97+
title: 'More',
98+
items: [
99+
{
100+
// TODO: Update blog link
101+
label: 'Blog',
102+
to: '/',
103+
},
104+
{
105+
label: 'GitHub',
106+
href: 'https://github.com/Lemoncode/react-image-focal-point',
107+
},
108+
],
109+
},
110+
],
111+
copyright: `Copyright © ${new Date().getFullYear()} Lemoncode S.L.`,
112+
},
113+
prism: {
114+
theme: lightCodeTheme,
115+
darkTheme: darkCodeTheme,
116+
},
117+
}),
118+
};
119+
120+
module.exports = config;

0 commit comments

Comments
 (0)