Skip to content

Commit

Permalink
small refactors, fixes, url changes etc
Browse files Browse the repository at this point in the history
  • Loading branch information
NickOvt committed Jan 22, 2025
1 parent 1f63c30 commit 739bd10
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 58 deletions.
6 changes: 5 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
},
"extends": ["prettier", "plugin:@docusaurus/recommended"],
"parserOptions": {
"ecmaVersion": 2020
"ecmaVersion": 2020,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
}
}
4 changes: 2 additions & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ const config: Config = {
title: "Community",
items: [
{
label: "Discord",
href: "https://discord.gg/j3fWEkjM",
label: "Gitter",
href: "https://gitter.im/nodemailer/wildduck",
},
],
},
Expand Down
96 changes: 43 additions & 53 deletions src/components/HomepageFeatures/index.js
Original file line number Diff line number Diff line change
@@ -1,64 +1,54 @@
import React from 'react';
import clsx from 'clsx';
import styles from './styles.module.css';
import Heading from '@theme/Heading';

const FeatureList = [
{
title: 'Easy to Use',
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
description: (
<>
Docusaurus was designed from the ground up to be easily installed and
used to get your website up and running quickly.
</>
),
},
{
title: 'Focus on What Matters',
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
description: (
<>
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
ahead and move your docs into the <code>docs</code> directory.
</>
),
},
{
title: 'Powered by React',
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
description: (
<>
Extend or customize your website layout by reusing React. Docusaurus can
be extended while reusing the same header and footer.
</>
),
},
{
title: 'Easy to Use',
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
description: <>Docusaurus was designed from the ground up to be easily installed and used to get your website up and running quickly.</>
},
{
title: 'Focus on What Matters',
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
description: (
<>
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go ahead and move your docs into the <code>docs</code> directory.
</>
)
},
{
title: 'Powered by React',
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
description: <>Extend or customize your website layout by reusing React. Docusaurus can be extended while reusing the same header and footer.</>
}
];

function Feature({Svg, title, description}) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" />
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
<p>{description}</p>
</div>
</div>
);
function Feature({ Svg, title, description }) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" />
</div>
<div className="text--center padding-horiz--md">
<Heading as="h1">{title}</Heading>
<p>{description}</p>
</div>
</div>
);
}

export default function HomepageFeatures() {
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
);
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
);
}
7 changes: 5 additions & 2 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import styles from './index.module.css';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import Heading from '@theme/Heading';

function HomepageHeader() {
const { siteConfig } = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<h1 className="hero__title">{siteConfig.title}</h1>
<Heading as="h1" className="hero__title">
{siteConfig.title}
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link className="button button--secondary button--lg" to="/docs/intro">
Expand All @@ -26,7 +29,7 @@ function HomepageHeader() {
export default function Home() {
const { siteConfig } = useDocusaurusContext();
return (
<Layout title={`Hello from ${siteConfig.title}`} description="Description will go into a meta tag in <head />">
<Layout title={`${siteConfig.title}`} description="WildDuck is a scalable no-SPOF IMAP/POP3 mail server">
<HomepageHeader />
<main>
<HomepageFeatures />
Expand Down

0 comments on commit 739bd10

Please sign in to comment.