lukeonline - commit 49a672a
refactor: Heading component49a672a8fbb5835d9d54f57adad1f979ecade108Luke Jones<luke.jones.2567@gmail.com>2026-07-19T21:07:38+01:00diff --git a/src/components/Heading.astro b/src/components/Heading.astro
new file mode 100644
index 0000000..6c184d5
--- /dev/null
+++ b/src/components/Heading.astro
@@ -0,0 +1,9 @@
+---
+const { level } = Astro.props;
+---
+{level === 1 && <h1 class="text-2xl font-bold"><slot/></h1>}
+{level === 2 && <h2><slot/></h2>}
+{level === 3 && <h3><slot/></h3>}
+{level === 4 && <h4><slot/></h4>}
+{level === 5 && <h5><slot/></h5>}
+{level === 6 && <h6><slot/></h6>}
diff --git a/src/pages/about/index.astro b/src/pages/about/index.astro
index fb84790..f102efc 100644
--- a/src/pages/about/index.astro
+++ b/src/pages/about/index.astro
@@ -1,10 +1,11 @@
---
import Base from "../../layouts/Base.astro";
+import Heading from "../../components/Heading.astro";
const title = "About";
---
<Base title={title}>
- <h1>About</h1>
+ <Heading level={1}>About</Heading>
<p>My name is Luke Jones. I'm a student at Aberystwyth University,
studying for a BSc in Computer Science with an Integrated Year in