Add CS2-SimpleAdmin documentation site

Introduces a new documentation site for CS2-SimpleAdmin using Docusaurus, including developer API references, tutorials, user guides, and module documentation. Removes the CleanModule example and updates FunCommands and ExampleModule. Also updates main plugin and API files to support new documentation and module structure.
This commit is contained in:
Dawid Bepierszcz
2025-10-20 01:27:01 +02:00
parent 21a5de6b3d
commit b0d8696756
74 changed files with 32732 additions and 279 deletions

View File

@@ -0,0 +1,64 @@
import clsx from 'clsx';
import Heading from '@theme/Heading';
import styles from './styles.module.css';
const FeatureList = [
{
title: 'Comprehensive Admin Tools',
img: require('@site/static/img/index_1.png').default,
description: (
<>
Full suite of admin commands for managing players, bans, mutes, warnings,
and server settings. Everything you need to moderate your CS2 server.
</>
),
},
{
title: 'Multi-Server Support',
img: require('@site/static/img/index_2.png').default,
description: (
<>
Manage multiple servers with synchronized admin permissions and penalties.
Share bans, mutes, and admin groups across your entire server network.
</>
),
},
{
title: 'Extensible API',
img: require('@site/static/img/index_3.png').default,
description: (
<>
Build custom modules using the public API. Create your own commands,
menus, and integrate with CS2-SimpleAdmin's permission and penalty systems.
</>
),
},
];
function Feature({img, title, description}) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<img src={img} className={styles.featureSvg} alt={title} />
</div>
<div className="text--center padding-horiz--md">
<Heading as="h3">{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>
);
}

View File

@@ -0,0 +1,11 @@
.features {
display: flex;
align-items: center;
padding: 2rem 0;
width: 100%;
}
.featureSvg {
height: 200px;
width: 200px;
}

View File

@@ -0,0 +1,30 @@
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/
/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #ff8c00;
--ifm-color-primary-dark: #e67e00;
--ifm-color-primary-darker: #d97700;
--ifm-color-primary-darkest: #b36200;
--ifm-color-primary-light: #ff9a1a;
--ifm-color-primary-lighter: #ffa328;
--ifm-color-primary-lightest: #ffb54d;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}
/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #ff9500;
--ifm-color-primary-dark: #e68600;
--ifm-color-primary-darker: #cc7700;
--ifm-color-primary-darkest: #b36200;
--ifm-color-primary-light: #ffa31a;
--ifm-color-primary-lighter: #ffad33;
--ifm-color-primary-lightest: #ffc266;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

View File

@@ -0,0 +1,52 @@
import clsx from 'clsx';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import Heading from '@theme/Heading';
import styles from './index.module.css';
function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<iframe
className={styles.videoBackground}
src="https://www.youtube.com/embed/4qEdIXLdxMo?autoplay=1&mute=1&loop=1&playlist=4qEdIXLdxMo&controls=0&showinfo=0&rel=0&modestbranding=1&playsinline=1"
title="Background Video"
frameBorder="0"
allow="autoplay; encrypted-media"
allowFullScreen
/>
<div className={styles.videoOverlay}></div>
<div className="container">
<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/user/intro">
Get Started
</Link>
</div>
</div>
</header>
);
}
export default function Home() {
const {siteConfig} = useDocusaurusContext();
return (
<Layout
title={`${siteConfig.title} - Admin Plugin for CS2`}
description="CS2-SimpleAdmin is a comprehensive administration plugin for Counter-Strike 2 servers. Manage bans, mutes, warnings, and permissions with multi-server support and extensible API.">
<HomepageHeader />
<main>
<HomepageFeatures />
</main>
</Layout>
);
}

View File

@@ -0,0 +1,97 @@
/**
* CSS files with the .module.css suffix will be treated as CSS modules
* and scoped locally.
*/
.heroBanner {
padding: 8rem 0;
text-align: center;
position: relative;
overflow: hidden;
min-height: 600px;
display: flex;
align-items: center;
justify-content: center;
}
.videoBackground {
position: absolute;
top: 50%;
left: 50%;
width: 100vw;
height: 56.25vw; /* 16:9 Aspect Ratio */
min-height: 100vh;
min-width: 177.77vh; /* 16:9 Aspect Ratio */
transform: translate(-50%, -50%);
z-index: 0;
pointer-events: none;
}
.videoOverlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
z-index: 1;
}
.heroBanner :global(.container) {
position: relative;
z-index: 999 !important;
}
.heroBanner :global(.hero__title) {
color: white !important;
text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
font-size: 3.5rem;
font-weight: bold;
margin-bottom: 1rem;
}
.heroBanner :global(.hero__subtitle) {
color: white !important;
text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
font-size: 1.5rem;
margin-bottom: 2rem;
}
.heroBanner .buttons {
position: relative;
z-index: 10;
}
@media screen and (max-width: 996px) {
.heroBanner {
padding: 4rem 2rem;
min-height: 400px;
}
.videoBackground {
width: 200vw;
height: 112.5vw;
}
.heroBanner :global(.hero__title) {
font-size: 2rem;
}
.heroBanner :global(.hero__subtitle) {
font-size: 1.2rem;
}
}
.buttons {
display: flex;
align-items: center;
justify-content: center;
position: relative;
z-index: 10;
}
.buttons :global(.button) {
position: relative;
z-index: 10;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

View File

@@ -0,0 +1,7 @@
---
title: Markdown page example
---
# Markdown page example
You don't need React to write simple standalone pages.