minor changes: (faulty)

This commit is contained in:
2026-04-26 16:16:52 +02:00
parent c9410191a9
commit 80a6fa2606
4 changed files with 38 additions and 8 deletions
+3
View File
@@ -13,6 +13,9 @@
"@tailwindcss/vite": "^4.2.2",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"react-markdown": "^10.1.0",
"remark": "^15.0.1",
"remark-html": "^16.0.1",
"tailwindcss": "^4.2.2"
},
"devDependencies": {
BIN
View File
Binary file not shown.
@@ -0,0 +1,31 @@
import { useEffect, useState } from "react";
import ReactMarkdown from "react-markdown";
const fetchREADME = async (url) => {
try {
const response = await fetch(url);
if (!response.ok) throw new Error("Failed to fetch README");
return await response.text();
} catch (error) {
console.error(error);
return "Error fetching README.";
}
};
export default function ProjectsReadme() {
const [readmeContent, setReadmeContent] = useState("");
useEffect(() => {
fetchREADME(
// "https://git.aramjonghu.nl/AramJonghu/aramjonghu-site/src/branch/master/README.md",
"../../../README.md",
).then((content) => setReadmeContent(content));
}, []);
return (
<div>
<h2>README Content</h2>
<ReactMarkdown>{readmeContent}</ReactMarkdown>
</div>
);
}
+4 -8
View File
@@ -1,13 +1,13 @@
import { useState } from "react";
import ProjectsReadme from "../components/ProjectsReadme";
export default function Home() {
const [active, setActive] = useState("projects");
const sections = [
{
id: "projects",
title: "Projects",
content: "Project content",
content: <ProjectsReadme />,
},
{
id: "systems",
@@ -25,19 +25,16 @@ export default function Home() {
<div className="text-ctp-text flex flex-col items-center justify-center px-6 py-6">
<div className="w-full max-w-6xl text-center">
<h1 className="text-4xl font-bold text-ctp-mauve">
Aram Jonghu
AramJonghu
</h1>
<p className="mt-4">
Software engineer building systems, services, and
experiments across a self-hosted environment.
</p>
<p className="mt-3">
This site acts as a hub for projects, infrastructure, and
personal tooling.
</p>
<div className="mt-10 border rounded p-4">
<div className="flex flex-wrap justify-center gap-12">
{sections.map((section) => (
@@ -52,7 +49,6 @@ export default function Home() {
</button>
))}
</div>
<div className="mt-6 text-left relative min-h-20">
{sections.map((section) => (
<div
@@ -66,7 +62,7 @@ export default function Home() {
<h2 className="text-2xl font-bold text-ctp-mauve">
{section.title}
</h2>
<p>{section.content}</p>
<div>{section.content}</div>{" "}
</div>
))}
</div>