Skip to content

Commit 5907976

Browse files
committed
feat: improve docs landing page
1 parent 60e93ef commit 5907976

10 files changed

Lines changed: 2231 additions & 1835 deletions

File tree

docs/.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.13.1
1+
20.18.1

docs/docs/extensions/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,11 @@ player. Here is a list of supported types:
7373
- Double
7474
- Integer
7575
- String
76+
- World
7677
- ConditionCompare
7778

7879
All these types are the native Java types, except `ConditionCompare`, which is used to define a comparison between 2
79-
values. This could be EQUAL, LESS_THEN, BIGGER_OR_EQUAL_THEN,... The different choices are available on the class
80+
values. This could be `EQUAL`, `LESS_THAN`, `GREATER_OR_EQUAL_THAN`,... The different choices are available on the class
8081
itself. A good example of this is
8182
available [here](https://github.com/titivermeesch/CommandTimer_PlayerConditions/blob/master/src/main/java/me/playbosswar/cmtplayerconditions/conditions/PlayerTimeInWorldCondition.java)
8283

docs/docs/intro.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Clicking the paper will create a fresh task for you.
2727
| `/cmt execute <task>` | Instantly execute the specified task | `commandtimer.execute` |
2828
| `/cmt schedule` | Schedule a one-time [ad-hoc command](configuration/adhoc-commands) | `commandtimer.schedule` |
2929
| `/cmt reload` | Reload the plugin. Extensions will not be reloaded. **It is not recommended to use this command** | `commandtimer.manage` |
30+
| `/cmt migrateToDatabase` | Migrate JSON task files to database storage. Requires database to be enabled in config | `commandtimer.manage` |
31+
| `/cmt rollback <version>`| Rollback database/configuration to a specific version. Requires server restart after completion | `commandtimer.manage` |
3032

3133
## Configuration file
3234

docs/docs/jsonschema.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ following this JSON schema
2828

2929
## Command
3030

31-
| Field | Description | Type |
32-
|------------|------------------------------------------------------------------------------------------------|------------------------------------------|
33-
| `command` | Command to execute. Do not include `/` in front of the command | `string` |
34-
| `gender` | Gender of the command | [Gender](configuration/commands#genders) |
35-
| `interval` | Defined the iteration interval between each command when the execution iterates over all users | [Interval](#interval) |
31+
| Field | Description | Type |
32+
|---------------|------------------------------------------------------------------------------------------------|------------------------------------------|
33+
| `command` | Command to execute. Do not include `/` in front of the command | `string` |
34+
| `gender` | Gender of the command | [Gender](configuration/commands#genders) |
35+
| `interval` | Defined the iteration interval between each command when the execution iterates over all users | [Interval](#interval) |
36+
| `delay` | Individual command delay used with the `ORDERED` [execution mode](configuration/commands#execution-modes) | [Interval](#interval) |
37+
| `description` | Optional description or notes for the command | `string` |
3638

3739
## Interval
3840

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import React from 'react';
2+
import clsx from 'clsx';
3+
import Link from '@docusaurus/Link';
4+
import styles from './HomepageFeatures.module.css';
5+
6+
const FeatureList = [
7+
{
8+
title: 'Schedule Commands',
9+
icon: '\u23F0',
10+
description: 'Set up commands to run on intervals, at specific times of day, or on specific dates. Full control over when and how your commands execute.',
11+
link: '/docs/configuration/commands',
12+
},
13+
{
14+
title: 'Powerful Conditions',
15+
icon: '\u2699\uFE0F',
16+
description: 'Execute commands only when specific conditions are met. Filter by player count, time of day, weather, permissions, and more.',
17+
link: '/docs/configuration/conditions',
18+
},
19+
{
20+
title: 'Task Management',
21+
icon: '\uD83D\uDCCB',
22+
description: 'Organize commands into tasks with their own schedules and settings. Manage everything through an intuitive in-game GUI.',
23+
link: '/docs/configuration/commands',
24+
},
25+
{
26+
title: 'Extensible',
27+
icon: '\uD83E\uDDE9',
28+
description: 'Extend functionality with custom extensions. Add new conditions, execution modes, and placeholders to fit your server needs.',
29+
link: '/docs/extensions/',
30+
},
31+
{
32+
title: 'Placeholders',
33+
icon: '\uD83D\uDD04',
34+
description: 'Use dynamic placeholders in your commands. Supports PlaceholderAPI and built-in placeholders for flexible command templates.',
35+
link: '/docs/placeholders',
36+
},
37+
{
38+
title: 'Developer API',
39+
icon: '\uD83D\uDEE0\uFE0F',
40+
description: 'Integrate CommandTimer into your own plugins with a clean API. Available through Maven and Gradle for easy setup.',
41+
link: '/docs/developers/',
42+
},
43+
];
44+
45+
function Feature({ title, icon, description, link }) {
46+
return (
47+
<div className={clsx('col col--4', styles.featureCol)}>
48+
<Link to={link} className={styles.featureCard}>
49+
<div className={styles.featureIcon}>{icon}</div>
50+
<h3 className={styles.featureTitle}>{title}</h3>
51+
<p className={styles.featureDescription}>{description}</p>
52+
</Link>
53+
</div>
54+
);
55+
}
56+
57+
export default function HomepageFeatures() {
58+
return (
59+
<section className={styles.features}>
60+
<div className="container">
61+
<div className={clsx('row', styles.featureRow)}>
62+
{FeatureList.map((props, idx) => (
63+
<Feature key={idx} {...props} />
64+
))}
65+
</div>
66+
</div>
67+
</section>
68+
);
69+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
.features {
2+
padding: 3rem 0;
3+
}
4+
5+
.featureRow {
6+
row-gap: 1.5rem;
7+
}
8+
9+
.featureCol {
10+
padding: 0 0.75rem;
11+
}
12+
13+
.featureCard {
14+
display: flex;
15+
flex-direction: column;
16+
align-items: center;
17+
text-align: center;
18+
padding: 1.5rem;
19+
border-radius: 12px;
20+
transition: transform 0.2s ease, box-shadow 0.2s ease;
21+
text-decoration: none !important;
22+
color: inherit !important;
23+
height: 100%;
24+
background: var(--ifm-card-background-color, #fff);
25+
border: 1px solid var(--ifm-color-emphasis-200);
26+
}
27+
28+
.featureCard:hover {
29+
transform: translateY(-4px);
30+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
31+
text-decoration: none !important;
32+
color: inherit !important;
33+
}
34+
35+
[data-theme='dark'] .featureCard {
36+
background: var(--ifm-card-background-color, #1b1b1d);
37+
}
38+
39+
[data-theme='dark'] .featureCard:hover {
40+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
41+
}
42+
43+
.featureIcon {
44+
font-size: 2.5rem;
45+
margin-bottom: 0.75rem;
46+
}
47+
48+
.featureTitle {
49+
font-size: 1.2rem;
50+
margin-bottom: 0.5rem;
51+
}
52+
53+
.featureDescription {
54+
font-size: 0.9rem;
55+
color: var(--ifm-color-emphasis-700);
56+
line-height: 1.5;
57+
margin: 0;
58+
}

docs/src/css/custom.css

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@
77
/* You can override the default Infima variables here. */
88
:root {
99
--ifm-color-primary: #EEC74A;
10-
--ifm-color-primary-dark: #29784c;
11-
--ifm-color-primary-darker: #277148;
12-
--ifm-color-primary-darkest: #205d3b;
13-
--ifm-color-primary-light: #33925d;
14-
--ifm-color-primary-lighter: #359962;
15-
--ifm-color-primary-lightest: #3cad6e;
10+
--ifm-color-primary-dark: #ebbf2f;
11+
--ifm-color-primary-darker: #e9ba21;
12+
--ifm-color-primary-darkest: #c49b10;
13+
--ifm-color-primary-light: #f1cf65;
14+
--ifm-color-primary-lighter: #f3d473;
15+
--ifm-color-primary-lightest: #f7e09b;
1616
--ifm-code-font-size: 95%;
1717
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
1818
}
1919

2020
/* For readability concerns, you should choose a lighter palette in dark mode. */
2121
[data-theme='dark'] {
2222
--ifm-color-primary: #EEC74A;
23-
--ifm-color-primary-dark: #21af90;
24-
--ifm-color-primary-darker: #1fa588;
25-
--ifm-color-primary-darkest: #1a8870;
26-
--ifm-color-primary-light: #29d5b0;
27-
--ifm-color-primary-lighter: #32d8b4;
28-
--ifm-color-primary-lightest: #4fddbf;
23+
--ifm-color-primary-dark: #ebbf2f;
24+
--ifm-color-primary-darker: #e9ba21;
25+
--ifm-color-primary-darkest: #c49b10;
26+
--ifm-color-primary-light: #f1cf65;
27+
--ifm-color-primary-lighter: #f3d473;
28+
--ifm-color-primary-lightest: #f7e09b;
2929
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
3030
}

docs/src/pages/index.js

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,74 @@ import clsx from 'clsx';
33
import Link from '@docusaurus/Link';
44
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
55
import Layout from '@theme/Layout';
6+
import HomepageFeatures from '@site/src/components/HomepageFeatures';
67

78
import styles from './index.module.css';
89

910
function HomepageHeader() {
1011
const {siteConfig} = useDocusaurusContext();
1112
return (
12-
<header className={clsx('hero hero--primary', styles.heroBanner)}>
13+
<header className={clsx('hero', styles.heroBanner)}>
1314
<div className="container">
15+
<img
16+
src="img/logo.jpg"
17+
alt="CommandTimer Logo"
18+
className={styles.heroLogo}
19+
/>
1420
<h1 className="hero__title">{siteConfig.title}</h1>
1521
<p className="hero__subtitle">{siteConfig.tagline}</p>
1622
<div className={styles.buttons}>
1723
<Link
18-
className="button button--secondary button--lg"
24+
className="button button--primary button--lg"
1925
to="/docs/intro">
20-
🚀 Get Started
26+
Get Started
27+
</Link>
28+
<Link
29+
className="button button--outline button--lg"
30+
to="https://github.com/titivermeesch/CommandTimer">
31+
View on GitHub
2132
</Link>
2233
</div>
2334
</div>
2435
</header>
2536
);
2637
}
2738

39+
function QuickStart() {
40+
return (
41+
<section className={styles.quickStart}>
42+
<div className="container">
43+
<h2 className={styles.sectionTitle}>Quick Start</h2>
44+
<div className={styles.steps}>
45+
<div className={styles.step}>
46+
<div className={styles.stepNumber}>1</div>
47+
<h3>Install the Plugin</h3>
48+
<p>Download CommandTimer and drop it into your server's plugins folder.</p>
49+
</div>
50+
<div className={styles.step}>
51+
<div className={styles.stepNumber}>2</div>
52+
<h3>Create a Task</h3>
53+
<p>Use <code>/cmt</code> to open the GUI and create your first task.</p>
54+
</div>
55+
<div className={styles.step}>
56+
<div className={styles.stepNumber}>3</div>
57+
<h3>Add Commands</h3>
58+
<p>Configure commands, set schedules, and let CommandTimer handle the rest.</p>
59+
</div>
60+
</div>
61+
</div>
62+
</section>
63+
);
64+
}
65+
2866
export default function Home() {
2967
return (
30-
<Layout
31-
description="Schedule commands like you want">
32-
<HomepageHeader/>
68+
<Layout description="Schedule commands like you want">
69+
<HomepageHeader />
70+
<main>
71+
<HomepageFeatures />
72+
<QuickStart />
73+
</main>
3374
</Layout>
3475
);
3576
}

0 commit comments

Comments
 (0)