Skip to content

Commit

Permalink
Merge pull request #115 from image-js/113-documentation-home-page
Browse files Browse the repository at this point in the history
docs: add documentation home page
  • Loading branch information
EscapedGibbon authored Jul 1, 2024
2 parents 581fbe4 + 65e9be7 commit c21ffbe
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 106 deletions.
39 changes: 27 additions & 12 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function demoLoaderPlugin() {
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'ImageJS',
tagline: 'Dinosaurs are cool',
tagline: 'Advanced image processing and manipulation in JavaScript.',
favicon: 'img/favicon.ico',

// Set the production url of your site here
Expand Down Expand Up @@ -125,7 +125,7 @@ const config = {
{
href: 'https://image-js.github.io/image-js-typescript/',
label: 'API reference',
position: 'right',
position: 'left',
},
],
},
Expand All @@ -136,25 +136,33 @@ const config = {
title: 'Docs',
items: [
{
label: 'Tutorial',
label: 'Getting started',
to: '/docs/Getting started',
},
{
label: 'Basics',
to: '/docs/Basics',
},
{
label: 'Features',
to: '/docs/Features',
},
],
},
{
title: 'Community',
title: 'Learn',
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
label: 'Tutorials',
to: '/docs/Tutorials',
},
{
label: 'Discord',
href: 'https://discordapp.com/invite/docusaurus',
label: 'Useful tips',
to: '/docs/Useful tips',
},
{
label: 'Twitter',
href: 'https://twitter.com/docusaurus',
label: 'Glossary',
to: '/docs/Glossary',
},
],
},
Expand All @@ -163,12 +171,19 @@ const config = {
items: [
{
label: 'GitHub',
href: 'https://github.com/facebook/docusaurus',
href: 'https://github.com/image-js/image-js-typescript',
},
{
label: 'API reference',
href: 'https://image-js.github.io/image-js-typescript/',
},
{
label: 'Zakodium',
href: 'https://www.zakodium.com/',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
Expand Down
75 changes: 0 additions & 75 deletions src/components/HomepageFeatures/index.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions src/components/HomepageFeatures/styles.module.css

This file was deleted.

13 changes: 13 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}
#frontPage {
width: 100%;
height: 100%;
}
.frontPage__text {
margin: auto;
max-width: 45%;
padding: 1em;
}

.main-wrapper {
flex: 1 0 0;
}

button {
background: none;
Expand Down
2 changes: 2 additions & 0 deletions src/pages/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

.buttons {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
}
25 changes: 17 additions & 8 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import Layout from '@theme/Layout';
import clsx from 'clsx';
import React from 'react';
Expand All @@ -10,16 +9,27 @@ import styles from './index.module.css';
function HomepageHeader() {
const { siteConfig } = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<header
id="frontPage"
className={clsx('hero hero--primary', styles.heroBanner)}
>
<div className="container">
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<p className="frontPage__text">
ImageJS is a JavaScript library designed to facilitate image
processing and manipulation. It provides a wide range of features for
developers to enhance, analyze, and transform images seamlessly. It
includes functions for common tasks such as resizing, cropping,
filtering, and color adjustments.
</p>

<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/Getting started"
to="docs/Getting started"
>
Docusaurus Tutorial - 5min ⏱️
Let&apos;s get started
</Link>
</div>
</div>
Expand All @@ -31,12 +41,11 @@ export default function Home(): JSX.Element {
const { siteConfig } = useDocusaurusContext();
return (
<Layout
title={`Hello from ${siteConfig.title}`}
title={`Welcome to ${siteConfig.title}`}
description="Description will go into a meta tag in <head />"
>
<HomepageHeader />
<main>
<HomepageFeatures />
<main className="main-wrapper">
<HomepageHeader />
</main>
</Layout>
);
Expand Down

0 comments on commit c21ffbe

Please sign in to comment.