From 2f80aa1a5b757416536d31b022dada6694a0b284 Mon Sep 17 00:00:00 2001 From: Leo dev Date: Fri, 26 Jul 2024 04:11:14 +0200 Subject: [PATCH] changes --- pages/components/home.tsx | 6 ++++- pages/docs/_meta.json | 3 +-- .../docs/{declarations.mdx => functions.mdx} | 12 +++++----- pages/docs/structs.mdx | 23 +++++++++++++++++++ pages/index.mdx | 3 +++ public/background.svg | 6 +++++ theme.config.tsx | 2 +- 7 files changed, 45 insertions(+), 10 deletions(-) rename pages/docs/{declarations.mdx => functions.mdx} (55%) create mode 100644 pages/docs/structs.mdx create mode 100644 public/background.svg diff --git a/pages/components/home.tsx b/pages/components/home.tsx index 850fa7c..af4bfa3 100644 --- a/pages/components/home.tsx +++ b/pages/components/home.tsx @@ -1,5 +1,9 @@ +import Image from 'next/image'; import styles from './Home.module.css'; export default function Home() { - return
+ return <> +

Wyst

+

A Modern Low Level Language

+ } \ No newline at end of file diff --git a/pages/docs/_meta.json b/pages/docs/_meta.json index 646b3a9..d3673f1 100644 --- a/pages/docs/_meta.json +++ b/pages/docs/_meta.json @@ -1,4 +1,3 @@ { - "index": "Introduction", - "declarations": "Declarations" + "index": "Introduction" } diff --git a/pages/docs/declarations.mdx b/pages/docs/functions.mdx similarity index 55% rename from pages/docs/declarations.mdx rename to pages/docs/functions.mdx index f6b91ea..eeafb58 100644 --- a/pages/docs/declarations.mdx +++ b/pages/docs/functions.mdx @@ -1,11 +1,11 @@ -# Variables -```c -int x = 20; -``` - -# Functions +# Defining functions ```c int my_func(int x) { printf("the number is: %d", x) } ``` + +# Calling functions +```c +my_func(69); +``` \ No newline at end of file diff --git a/pages/docs/structs.mdx b/pages/docs/structs.mdx new file mode 100644 index 0000000..de9450b --- /dev/null +++ b/pages/docs/structs.mdx @@ -0,0 +1,23 @@ +# Defining a structure +```c +struct Point { + int x; + int y; + int z; +} +``` + +# Using a structure as a variable +```rust +Point my_point { x: 0, y: 10, z: 20 }; +``` + +# Using a structure +```rust +Point { x: 30, y: 40, z: 50 } +``` + +# Getting items from a structure +```rust +my_point.x +``` \ No newline at end of file diff --git a/pages/index.mdx b/pages/index.mdx index e69de29..328cb4b 100644 --- a/pages/index.mdx +++ b/pages/index.mdx @@ -0,0 +1,3 @@ +import Home from './components/home' + + \ No newline at end of file diff --git a/public/background.svg b/public/background.svg new file mode 100644 index 0000000..bccc442 --- /dev/null +++ b/public/background.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/theme.config.tsx b/theme.config.tsx index 0004fe6..a00a1f3 100644 --- a/theme.config.tsx +++ b/theme.config.tsx @@ -15,7 +15,7 @@ const config: DocsThemeConfig = { return { titleTemplate: '%s - Wyst' } - } + }, } export default config