Skip to content

Commit

Permalink
feat: add home page
Browse files Browse the repository at this point in the history
  • Loading branch information
roflmuffin committed Oct 17, 2023
1 parent 7bd7baf commit 14bbc9d
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default defineConfig({
},
}),
],
base: '/',
site: 'https://docs.cssharp.dev',
markdown: {
shikiConfig: {
Expand Down
43 changes: 43 additions & 0 deletions docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: CounterStrikeSharp
description: Write Counter-Strike 2 server plugins in C#.
template: splash
hero:
tagline: <code class="csharp">CounterStrikeSharp</code> is a simpler way to write CS2 server plugins.
actions:
- text: Get started
link: ./guides/getting-started/
icon: right-arrow
variant: primary
- text: Browse source
link: https://github.com/roflmuffin/CounterStrikeSharp/
icon: github
---
```csharp
using CounterStrikeSharp.API.Core;

namespace HelloWorldPlugin;
public class HelloWorldPlugin : BasePlugin
{
public override string ModuleName => "Hello World Plugin";

public override string ModuleVersion => "0.0.1";

public override void Load(bool hotReload)
{
Console.WriteLine("Hello World!");
}

[GameEventHandler]
public void OnPlayerConnect(EventPlayerConnect @event)
{
Log($"Player {@event.Name} has connected!");
}

[ConsoleCommand("issue_warning", "Issue warning to player")]
public void OnCommand(int client, CommandInfo command)
{
Log("You shouldn't be doing that!");
}
}
```
15 changes: 15 additions & 0 deletions docs/src/styles/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,19 @@
--sl-font: 'DM Sans', serif;
--sl-font-mono: 'Jetbrains Mono', monospace;
--sl-text-code-sm: 1rem;
}

.hero {
grid-template-columns: 1fr;
}

.hero .copy {
align-items: center;
}

.hero .actions {
justify-content: center;
}

.hero {
}

0 comments on commit 14bbc9d

Please sign in to comment.