From d3089905d46aff671cdb4ecd7f6ca37cf94b04b1 Mon Sep 17 00:00:00 2001 From: Araozu Date: Sun, 19 May 2024 19:31:27 -0500 Subject: [PATCH] Layout for stdout/state --- src/components/InteractiveCode.astro | 26 ++++++++++++++++++++++---- src/pages/learn/basics/hello-world.mdx | 8 ++++---- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/components/InteractiveCode.astro b/src/components/InteractiveCode.astro index 58fe499..2ccf905 100644 --- a/src/components/InteractiveCode.astro +++ b/src/components/InteractiveCode.astro @@ -1,7 +1,7 @@ --- const {code} = Astro.props; -let c = trimAndDedent(code as string); +let c = trimAndDedent(code); /** * Performs the following: @@ -73,9 +73,27 @@ function trimAndDedent(input: string): string { return lines.join("\n"); } +// TODO: Apply syntax highlighting + --- -
- Interactive code :D -
{c}
+
+ thp code +
{c}
+
+
+
stdout
+
+ aaaa +
+ bbbb +
+
+
+
state
+
+ x = 20 +
+
+
diff --git a/src/pages/learn/basics/hello-world.mdx b/src/pages/learn/basics/hello-world.mdx index 9acf22b..dd9b66c 100644 --- a/src/pages/learn/basics/hello-world.mdx +++ b/src/pages/learn/basics/hello-world.mdx @@ -19,13 +19,13 @@ Then run `thp hello.thp`