Skip to content

Commit f45a6bc

Browse files
Add temp event pages
1 parent 1c4d452 commit f45a6bc

7 files changed

+102
-48
lines changed

web/astro.config.mjs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,18 @@ export default defineConfig({
4040
{
4141
label: 'Functions',
4242
items: [
43-
{label: 'All functions', link: '/functions'},
44-
{label: 'Shared functions', link: 'Shared_Scripting_Functions'},
45-
{label: 'Client functions', link: 'Client_Scripting_Functions'},
46-
{label: 'Server functions', link: 'Server_Scripting_Functions'},
43+
{label: 'All functions', link: '/Scripting_Functions'},
44+
{label: 'Shared functions', link: '/Shared_Scripting_Functions'},
45+
{label: 'Client functions', link: '/Client_Scripting_Functions'},
46+
{label: 'Server functions', link: '/Server_Scripting_Functions'},
4747
]
4848
},
4949
{
5050
label: 'Events',
5151
items: [
52-
// {slug: 'Client_Scripting_Events'},
53-
// {slug: 'Server_Scripting_Events'},
52+
{label: 'All events', link: '/Scripting_Events'},
53+
{label: 'Client events', link: '/Client_Scripting_Events'},
54+
{label: 'Server events', link: '/Server_Scripting_Events'},
5455
]
5556
},
5657
{
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
3+
---
4+
<StarlightPage frontmatter={{
5+
template: 'doc',
6+
title: 'Client evebts',
7+
tableOfContents: false,
8+
}}>
9+
<p>This page lists all <strong>client-side</strong> functions available in the <a href="/lua-api">Lua API</a> organized by category.</p>
10+
11+
TODO
12+
</StarlightPage>

web/src/pages/Client_Scripting_Functions.astro

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,18 @@ const theseFunctions = functionsByTypeByCategory.client;
1010
title: 'Client functions',
1111
tableOfContents: false,
1212
}}>
13+
<p>This page lists all <strong>client-side</strong> functions available in the <a href="/lua-api">Lua API</a> organized by category.</p>
1314

14-
<p>This page lists all <strong>client-side</strong> functions available in the <a href="/lua-api">Lua API</a> organized by category.</p>
15-
16-
{Object.entries(theseFunctions).map(([category, funcs]) => (
17-
<section>
18-
<details>
19-
<summary>{category} functions</summary>
20-
<ul>
21-
{funcs.map(func => (
22-
<li><a href={`/${func.id}`}>{func.id}</a></li>
23-
))}
24-
</ul>
25-
</details>
26-
</section>
27-
))}
15+
{Object.entries(theseFunctions).map(([category, funcs]) => (
16+
<section>
17+
<details>
18+
<summary>{category} functions</summary>
19+
<ul>
20+
{funcs.map(func => (
21+
<li><a href={`/${func.id}`}>{func.id}</a></li>
22+
))}
23+
</ul>
24+
</details>
25+
</section>
26+
))}
2827
</StarlightPage>

web/src/pages/Scripting_Events.astro

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
3+
---
4+
<StarlightPage frontmatter={{
5+
template: 'doc',
6+
title: 'All events',
7+
tableOfContents: false,
8+
}}>
9+
<p>This page lists all <strong>client-side</strong> and <strong>server-side</strong> events available in the <a href="/lua-api">Lua API</a> organized by category.</p>
10+
11+
TODO
12+
</StarlightPage>
13+
14+
<style>
15+
.side-shared {
16+
color: rgb(117, 117, 255);
17+
}
18+
.side-client {
19+
color: rgb(255, 50, 50);
20+
}
21+
.side-server {
22+
color: rgb(232, 115, 0);
23+
}
24+
</style>
25+
26+
<script>
27+
document.querySelectorAll('.side-type-color').forEach(el => {
28+
const type = el.textContent || '';
29+
el.classList.add(`side-${type.toLowerCase()}`);
30+
});
31+
32+
</script>

web/src/pages/functions.astro renamed to web/src/pages/Scripting_Functions.astro

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,20 @@ const functionsByCategory = getFunctionsByCategory();
99
title: 'All functions',
1010
tableOfContents: false,
1111
}}>
12+
<p>This page lists all <strong>client-side</strong>, <strong>server-side</strong> and <strong>shared</strong> functions available in the <a href="/lua-api">Lua API</a> organized by category.</p>
1213

13-
<p>This page lists all functions available in the <a href="/lua-api">Lua API</a> organized by category.</p>
14-
15-
{Object.entries(functionsByCategory).map(([category, funcs]) => (
16-
<section>
17-
<details>
18-
<summary>{category} functions</summary>
19-
<ul>
20-
{funcs.map(func => (
21-
<li><a href={`/${func.id}`}>{func.id}</a> (<span class="side-type-color">{getFunctionType(func.data)}</span>)</li>
22-
))}
23-
</ul>
24-
</details>
25-
</section>
26-
))}
14+
{Object.entries(functionsByCategory).map(([category, funcs]) => (
15+
<section>
16+
<details>
17+
<summary>{category} functions</summary>
18+
<ul>
19+
{funcs.map(func => (
20+
<li><a href={`/${func.id}`}>{func.id}</a> (<span class="side-type-color">{getFunctionType(func.data)}</span>)</li>
21+
))}
22+
</ul>
23+
</details>
24+
</section>
25+
))}
2726
</StarlightPage>
2827

2928
<style>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
3+
---
4+
<StarlightPage frontmatter={{
5+
template: 'doc',
6+
title: 'Server functions',
7+
tableOfContents: false,
8+
}}>
9+
<p>This page lists all <strong>server-side</strong> functions available in the <a href="/lua-api">Lua API</a> organized by category.</p>
10+
11+
TODO
12+
</StarlightPage>

web/src/pages/Server_Scripting_Functions.astro

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,18 @@ const theseFunctions = functionsByTypeByCategory.server;
1010
title: 'Server functions',
1111
tableOfContents: false,
1212
}}>
13+
<p>This page lists all <strong>server-side</strong> functions available in the <a href="/lua-api">Lua API</a> organized by category.</p>
1314

14-
<p>This page lists all <strong>server-side</strong> functions available in the <a href="/lua-api">Lua API</a> organized by category.</p>
15-
16-
{Object.entries(theseFunctions).map(([category, funcs]) => (
17-
<section>
18-
<details>
19-
<summary>{category} functions</summary>
20-
<ul>
21-
{funcs.map(func => (
22-
<li><a href={`/${func.id}`}>{func.id}</a></li>
23-
))}
24-
</ul>
25-
</details>
26-
</section>
27-
))}
15+
{Object.entries(theseFunctions).map(([category, funcs]) => (
16+
<section>
17+
<details>
18+
<summary>{category} functions</summary>
19+
<ul>
20+
{funcs.map(func => (
21+
<li><a href={`/${func.id}`}>{func.id}</a></li>
22+
))}
23+
</ul>
24+
</details>
25+
</section>
26+
))}
2827
</StarlightPage>

0 commit comments

Comments
 (0)