Skip to content

Commit c21ffbe

Browse files
Merge pull request #115 from image-js/113-documentation-home-page
docs: add documentation home page
2 parents 581fbe4 + 65e9be7 commit c21ffbe

File tree

6 files changed

+59
-106
lines changed

6 files changed

+59
-106
lines changed

docusaurus.config.js

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async function demoLoaderPlugin() {
4242
/** @type {import('@docusaurus/types').Config} */
4343
const config = {
4444
title: 'ImageJS',
45-
tagline: 'Dinosaurs are cool',
45+
tagline: 'Advanced image processing and manipulation in JavaScript.',
4646
favicon: 'img/favicon.ico',
4747

4848
// Set the production url of your site here
@@ -125,7 +125,7 @@ const config = {
125125
{
126126
href: 'https://image-js.github.io/image-js-typescript/',
127127
label: 'API reference',
128-
position: 'right',
128+
position: 'left',
129129
},
130130
],
131131
},
@@ -136,25 +136,33 @@ const config = {
136136
title: 'Docs',
137137
items: [
138138
{
139-
label: 'Tutorial',
139+
label: 'Getting started',
140140
to: '/docs/Getting started',
141141
},
142+
{
143+
label: 'Basics',
144+
to: '/docs/Basics',
145+
},
146+
{
147+
label: 'Features',
148+
to: '/docs/Features',
149+
},
142150
],
143151
},
144152
{
145-
title: 'Community',
153+
title: 'Learn',
146154
items: [
147155
{
148-
label: 'Stack Overflow',
149-
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
156+
label: 'Tutorials',
157+
to: '/docs/Tutorials',
150158
},
151159
{
152-
label: 'Discord',
153-
href: 'https://discordapp.com/invite/docusaurus',
160+
label: 'Useful tips',
161+
to: '/docs/Useful tips',
154162
},
155163
{
156-
label: 'Twitter',
157-
href: 'https://twitter.com/docusaurus',
164+
label: 'Glossary',
165+
to: '/docs/Glossary',
158166
},
159167
],
160168
},
@@ -163,12 +171,19 @@ const config = {
163171
items: [
164172
{
165173
label: 'GitHub',
166-
href: 'https://github.com/facebook/docusaurus',
174+
href: 'https://github.com/image-js/image-js-typescript',
175+
},
176+
{
177+
label: 'API reference',
178+
href: 'https://image-js.github.io/image-js-typescript/',
179+
},
180+
{
181+
label: 'Zakodium',
182+
href: 'https://www.zakodium.com/',
167183
},
168184
],
169185
},
170186
],
171-
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
172187
},
173188
prism: {
174189
theme: lightCodeTheme,

src/components/HomepageFeatures/index.tsx

Lines changed: 0 additions & 75 deletions
This file was deleted.

src/components/HomepageFeatures/styles.module.css

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/css/custom.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@
2828
--ifm-color-primary-lightest: #4fddbf;
2929
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
3030
}
31+
#frontPage {
32+
width: 100%;
33+
height: 100%;
34+
}
35+
.frontPage__text {
36+
margin: auto;
37+
max-width: 45%;
38+
padding: 1em;
39+
}
40+
41+
.main-wrapper {
42+
flex: 1 0 0;
43+
}
3144

3245
button {
3346
background: none;

src/pages/index.module.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
.buttons {
2020
display: flex;
21+
flex-direction: column;
2122
align-items: center;
2223
justify-content: center;
24+
gap: 10px;
2325
}

src/pages/index.tsx

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import Link from '@docusaurus/Link';
22
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
3-
import HomepageFeatures from '@site/src/components/HomepageFeatures';
43
import Layout from '@theme/Layout';
54
import clsx from 'clsx';
65
import React from 'react';
@@ -10,16 +9,27 @@ import styles from './index.module.css';
109
function HomepageHeader() {
1110
const { siteConfig } = useDocusaurusContext();
1211
return (
13-
<header className={clsx('hero hero--primary', styles.heroBanner)}>
12+
<header
13+
id="frontPage"
14+
className={clsx('hero hero--primary', styles.heroBanner)}
15+
>
1416
<div className="container">
1517
<h1 className="hero__title">{siteConfig.title}</h1>
1618
<p className="hero__subtitle">{siteConfig.tagline}</p>
19+
<p className="frontPage__text">
20+
ImageJS is a JavaScript library designed to facilitate image
21+
processing and manipulation. It provides a wide range of features for
22+
developers to enhance, analyze, and transform images seamlessly. It
23+
includes functions for common tasks such as resizing, cropping,
24+
filtering, and color adjustments.
25+
</p>
26+
1727
<div className={styles.buttons}>
1828
<Link
1929
className="button button--secondary button--lg"
20-
to="/docs/Getting started"
30+
to="docs/Getting started"
2131
>
22-
Docusaurus Tutorial - 5min ⏱️
32+
Let&apos;s get started
2333
</Link>
2434
</div>
2535
</div>
@@ -31,12 +41,11 @@ export default function Home(): JSX.Element {
3141
const { siteConfig } = useDocusaurusContext();
3242
return (
3343
<Layout
34-
title={`Hello from ${siteConfig.title}`}
44+
title={`Welcome to ${siteConfig.title}`}
3545
description="Description will go into a meta tag in <head />"
3646
>
37-
<HomepageHeader />
38-
<main>
39-
<HomepageFeatures />
47+
<main className="main-wrapper">
48+
<HomepageHeader />
4049
</main>
4150
</Layout>
4251
);

0 commit comments

Comments
 (0)