Skip to content

Commit afc0a4e

Browse files
Sainanwell-in-that-case
authored andcommitted
Revert "Remove splash page"
This reverts commit 8134939.
1 parent 662b910 commit afc0a4e

File tree

4 files changed

+65
-5
lines changed

4 files changed

+65
-5
lines changed

docs/Introduction.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
sidebar_position: 0
3-
slug: /
43
---
54

65
# What is Pluto?

docusaurus.config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const config = {
88
title: 'Pluto',
99
tagline: 'A superset of Lua 5.4 — with unique features, optimizations, and improvements.',
1010
url: 'https://pluto-lang.org',
11-
baseUrl: '/docs/',
11+
baseUrl: '/',
1212
onBrokenLinks: 'warn',
1313
onBrokenMarkdownLinks: 'warn',
1414
favicon: 'img/logo.png',
@@ -33,9 +33,6 @@ const config = {
3333
/** @type {import('@docusaurus/preset-classic').Options} */
3434
({
3535
docs: {
36-
path: './docs',
37-
routeBasePath: '/',
38-
breadcrumbs: false,
3936
sidebarPath: require.resolve('./sidebars.js'),
4037
},
4138
theme: {

src/pages/index.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import React from 'react';
2+
import clsx from 'clsx';
3+
import Link from '@docusaurus/Link';
4+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
5+
import Layout from '@theme/Layout';
6+
import HomepageFeatures from '@site/src/components/HomepageFeatures';
7+
8+
import styles from './index.module.css';
9+
10+
function HomepageHeader() {
11+
const {siteConfig} = useDocusaurusContext();
12+
return (
13+
<header className={clsx('hero hero--primary', styles.heroBanner)}>
14+
<div className="container">
15+
<h1 className="hero__title">{siteConfig.title}</h1>
16+
<p className="hero__subtitle">{siteConfig.tagline}</p>
17+
<div className={styles.buttons}>
18+
<Link
19+
className="button button--secondary button--lg"
20+
to="/docs/Introduction">
21+
Learn More
22+
</Link>
23+
</div>
24+
</div>
25+
</header>
26+
);
27+
}
28+
29+
export default function Home() {
30+
const {siteConfig} = useDocusaurusContext();
31+
return (
32+
<Layout
33+
title={`${siteConfig.title}, a modern Lua dialect.`}
34+
description="The official website for Pluto, a modern Lua dialect.">
35+
<HomepageHeader />
36+
<main>
37+
<HomepageFeatures />
38+
</main>
39+
</Layout>
40+
);
41+
}

src/pages/index.module.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* CSS files with the .module.css suffix will be treated as CSS modules
3+
* and scoped locally.
4+
*/
5+
6+
.heroBanner {
7+
padding: 4rem 0;
8+
text-align: center;
9+
position: relative;
10+
overflow: hidden;
11+
}
12+
13+
@media screen and (max-width: 996px) {
14+
.heroBanner {
15+
padding: 2rem;
16+
}
17+
}
18+
19+
.buttons {
20+
display: flex;
21+
align-items: center;
22+
justify-content: center;
23+
}

0 commit comments

Comments
 (0)