diff --git a/README.md b/README.md index 1c55bff..e564056 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ Personal website and central hub for my projects, systems, and self-hosted servi This site is not just a portfolio — it acts as an entry point into a larger ecosystem of applications, infrastructure, and experiments. ---- - ## Overview The site is divided into three conceptual layers: @@ -38,8 +36,6 @@ Dedicated pages for deeper content: - About — personal background and context - CV — formal resume (if applicable) ---- - ## Philosophy This site is intentionally minimal and system-oriented. @@ -53,8 +49,6 @@ Instead of a traditional portfolio, it focuses on: It evolves alongside my personal development and technical interests. ---- - ## Stack - React @@ -63,8 +57,6 @@ It evolves alongside my personal development and technical interests. - Catppuccin theme - Self-hosted backend services (Forgejo, Nextcloud, etc.) ---- - ## Status This site is continuously evolving and serves as both a portfolio and experimental environment. diff --git a/frontend/package.json b/frontend/package.json index 9ac9bcb..37a0674 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -14,8 +14,6 @@ "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": { diff --git a/frontend/src.zip b/frontend/src.zip deleted file mode 100644 index 6b6f33f..0000000 Binary files a/frontend/src.zip and /dev/null differ diff --git a/frontend/src/components/ProjectsReadme.jsx b/frontend/src/components/ProjectsReadme.jsx index 92c40f0..09ab4bd 100644 --- a/frontend/src/components/ProjectsReadme.jsx +++ b/frontend/src/components/ProjectsReadme.jsx @@ -1,31 +1,149 @@ import { useEffect, useState } from "react"; import ReactMarkdown from "react-markdown"; -const fetchREADME = async (url) => { +const fetchREADME = async (repoUrl) => { try { - const response = await fetch(url); + let rawUrl = repoUrl; + + if (repoUrl.includes("/src/branch/")) { + rawUrl = repoUrl.replace("/src/branch/", "/raw/branch/"); + } else if ( + repoUrl.includes("github.com") && + !repoUrl.includes("raw.githubusercontent.com") + ) { + rawUrl = repoUrl + .replace("github.com", "raw.githubusercontent.com") + .replace("/blob/", "/"); + } + + const response = await fetch(rawUrl); if (!response.ok) throw new Error("Failed to fetch README"); return await response.text(); } catch (error) { console.error(error); - return "Error fetching README."; + return "Error fetching README. Make sure the URL points to a raw markdown file."; } }; -export default function ProjectsReadme() { +export default function ProjectsReadme({ + repoUrl, +}) { const [readmeContent, setReadmeContent] = useState(""); + const [isLoading, setIsLoading] = useState(true); useEffect(() => { - fetchREADME( - // "https://git.aramjonghu.nl/AramJonghu/aramjonghu-site/src/branch/master/README.md", - "../../../README.md", - ).then((content) => setReadmeContent(content)); - }, []); + setIsLoading(true); + fetchREADME(repoUrl).then((content) => { + setReadmeContent(content); + setIsLoading(false); + }); + }, [repoUrl]); return ( -
-

README Content

- {readmeContent} +
+ {isLoading ? ( +
+
+
+
+
+ ) : ( +
+ + {children} + + ); + } + return ( + + {children} + + ); + }, + pre({ children, ...props }) { + return ( +
+                                        {children}
+                                    
+ ); + }, + h1: ({ children }) => ( +

+ {children} +

+ ), + h2: ({ children }) => ( +

+ {children} +

+ ), + h3: ({ children }) => ( +

+ {children} +

+ ), + p: ({ children }) => ( +

{children}

+ ), + ul: ({ children }) => ( +
    + {children} +
+ ), + ol: ({ children }) => ( +
    + {children} +
+ ), + li: ({ children }) => ( +
  • {children}
  • + ), + a: ({ children, href }) => ( + + {children} + + ), + blockquote: ({ children }) => ( +
    + {children} +
    + ), + img: ({ src, alt }) => ( + {alt} + ), + }} + > + {readmeContent} +
    +
    + )}
    ); } diff --git a/frontend/src/pages/Home.jsx b/frontend/src/pages/Home.jsx index 8c694bd..8923ff3 100644 --- a/frontend/src/pages/Home.jsx +++ b/frontend/src/pages/Home.jsx @@ -2,22 +2,71 @@ import { useState } from "react"; import ProjectsReadme from "../components/ProjectsReadme"; export default function Home() { - const [active, setActive] = useState("projects"); + const projectList = [ + { + id: "site", + name: "aramjonghu-site", + url: "https://git.aramjonghu.nl/AramJonghu/aramjonghu-site/raw/branch/master/README.md", + }, + { + id: "game", + name: "Game (Gameron the Lost Level)", + url: "https://git.aramjonghu.nl/AramJonghu/gameron-the-lost-level/src/branch/master/README.md", + }, + { + id: "nvim", + name: "Nvim Config", + url: "https://git.aramjonghu.nl/AramJonghu/nvim/src/branch/main/README.md", + }, + ]; + + const [projIdx, setProjIdx] = useState(0); + const prevProject = () => + setProjIdx((i) => (i - 1 + projectList.length) % projectList.length); + const nextProject = () => setProjIdx((i) => (i + 1) % projectList.length); + + const [activeTab, setActiveTab] = useState("about"); + const sections = [ { id: "projects", title: "Projects", - content: , + content: ( + <> +

    + Projects +

    +
    + + + {projectList[projIdx].name} ({projIdx + 1}/ + {projectList.length}) + + +
    + + + ), }, { id: "systems", title: "Systems", - content: "Systems content", + content:

    Systems content goes here.

    , }, { id: "about", title: "About", - content: "About content", + content:

    About content goes here.

    , }, ]; @@ -36,13 +85,15 @@ export default function Home() { personal tooling.

    -
    +
    {sections.map((section) => (