From 0bdcc421caeb2c87e70ef1ede3263edcce327998 Mon Sep 17 00:00:00 2001 From: LynithDev <61880709+LynithDev@users.noreply.github.com> Date: Wed, 18 Oct 2023 19:40:13 +0200 Subject: Codeblock section --- apps/website/src/components/base/Button.astro | 2 +- apps/website/src/components/base/CodeBlock.astro | 21 +++++++++++++++++++++ apps/website/src/components/base/Header.astro | 12 +++++++++--- apps/website/src/components/base/Section.astro | 6 +++--- 4 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 apps/website/src/components/base/CodeBlock.astro (limited to 'apps/website/src/components/base') diff --git a/apps/website/src/components/base/Button.astro b/apps/website/src/components/base/Button.astro index 75dcfa0..adbc656 100644 --- a/apps/website/src/components/base/Button.astro +++ b/apps/website/src/components/base/Button.astro @@ -5,7 +5,7 @@ import type { HTMLAttributes } from "astro/types"; const styles = { primary: "bg-blue-500 text-white hover:bg-blue-400 active:bg-blue-600 disabled:bg-blue-800 disabled:text-white-1/4", - secondary: "bg-blue-100 text-blue-500 hover:bg-blue-50 active:bg-blue-200 disabled:bg-blue-50 disabled:text-blue-200", + secondary: "bg-blue-100 text-blue-500 hover:bg-blue-200 active:bg-blue-300 disabled:bg-blue-50 disabled:text-blue-200", } const sizes = { diff --git a/apps/website/src/components/base/CodeBlock.astro b/apps/website/src/components/base/CodeBlock.astro new file mode 100644 index 0000000..5991428 --- /dev/null +++ b/apps/website/src/components/base/CodeBlock.astro @@ -0,0 +1,21 @@ +--- + +--- + +
+ {`public class MyConfig {
+
+ @Switch(name = "Sub Switch", type = OptionType.SWITCH)
+ public static boolean subSwitch = false;
+
+ public MyConfig() {
+ super(new Mod("My Mod", ModType.UTIL_QOL), "config.json");
+
+ addDependency("subSwitch", () -> {
+ // TODO: Make codeblocks better lmao
+ });
+ }
+
+}`}
+
+
diff --git a/apps/website/src/components/base/Header.astro b/apps/website/src/components/base/Header.astro
index 23f5429..d35ad9f 100644
--- a/apps/website/src/components/base/Header.astro
+++ b/apps/website/src/components/base/Header.astro
@@ -2,7 +2,8 @@
import type { HTMLAttributes } from "astro/types"
const sizes = {
- "xl": "h1",
+ "xxl": "h1",
+ "xl": "h2",
"lg": "h2",
"md": "h3",
"sm": "h4",
@@ -24,7 +25,9 @@ const {
} = Astro.props;
const Element = sizes[size] as any; // Unfortunately gotta do this
-const className = (align == "inherit" ? "" : `text-${align} `) + (attr.class ? ` ${attr.class}` : "");
+const className = (align == "inherit" ? "" : `text-${align} `)
+ + (size == "xxl" ? " page-header" : "")
+ + (attr.class ? ` ${attr.class}` : "");
---