Update projects structure

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-03-30 18:29:50 +02:00
parent 385e46ecdf
commit ac552902df
17 changed files with 251 additions and 630 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ import { House, FolderOpen } from "@lucide/astro";
<House class="size-5" />
Go Home
</a>
<a href="/#projects" class="btn btn-outline gap-2">
<a href="/projects" class="btn btn-outline gap-2">
<FolderOpen class="size-5" />
View Projects
</a>
@@ -44,7 +44,7 @@ import { House, FolderOpen } from "@lucide/astro";
<div class="flex gap-3 justify-center flex-wrap text-sm">
<a href="/blog" class="link link-hover">Blog</a>
<span class="text-base-content/30">•</span>
<a href="/#about" class="link link-hover">About</a>
<a href="/projects" class="link link-hover">All my Projects</a>
</div>
</div>
</div>
+2 -2
View File
@@ -30,7 +30,7 @@ import { House, FolderOpen } from "@lucide/astro";
<House class="size-5" />
Go Home
</a>
<a href="/#projects" class="btn btn-outline gap-2">
<a href="/projects" class="btn btn-outline gap-2">
<FolderOpen class="size-5" />
View Projects
</a>
@@ -44,7 +44,7 @@ import { House, FolderOpen } from "@lucide/astro";
<div class="flex gap-3 justify-center flex-wrap text-sm">
<a href="/blog" class="link link-hover">Blog</a>
<span class="text-base-content/30">•</span>
<a href="/#about" class="link link-hover">About</a>
<a href="/projects" class="link link-hover">All my Projects</a>
</div>
</div>
</div>
-28
View File
@@ -1,28 +0,0 @@
---
import { getCollection, render } from "astro:content";
import ProjectLayout from "../../layouts/ProjectLayout.astro";
export async function getStaticPaths() {
const projectEntries = await getCollection("projects");
return projectEntries.map((entry) => ({
params: { slug: entry.id },
props: { entry },
}));
}
const { entry } = Astro.props;
const { Content } = await render(entry);
---
<ProjectLayout
title={entry.data.title}
description={entry.data.description}
image={entry.data.image}
tags={entry.data.tags}
demoLink={entry.data.demoLink}
url={entry.data.url}
sourceLink={entry.data.sourceLink}
>
<Content />
</ProjectLayout>
+8 -24
View File
@@ -1,11 +1,10 @@
---
import Layout from "../../layouts/Layout.astro";
import { getCollection } from "astro:content";
import ProjectCard from "../../components/ProjectCard.astro";
import GiteaProjectCard from "../../components/GiteaProjectCard.astro";
import { ChevronLeft } from "@lucide/astro";
import { ArrowRight } from "lucide-astro";
import { fetchGiteaRepos } from "../../lib/gitea";
const projects = await getCollection("projects");
const repos = await fetchGiteaRepos();
---
<Layout
@@ -13,17 +12,14 @@ const projects = await getCollection("projects");
description="Explore my latest projects and work"
>
<main class="max-w-6xl mx-auto px-4 py-20">
<!-- Header -->
<div class="text-center mb-16">
<h1 class="text-5xl font-bold mb-4">Projects</h1>
<p class="text-xl text-base-content/70">
I enjoy the challenge of reimagining existing programs & scripts in my
own unique way. By creating these projects from scratch, I can ensure
complete control over every aspect of their design and functionality.
own unique way.
</p>
</div>
<!-- Back to Home -->
<div class="mb-8">
<a href="/" class="btn btn-ghost btn-sm">
<ChevronLeft size={18} />
@@ -31,32 +27,20 @@ const projects = await getCollection("projects");
</a>
</div>
<!-- Projects Grid -->
{
projects.length === 0 ? (
repos.length === 0 ? (
<div class="text-center py-20">
<p class="text-2xl text-base-content/60">
No projects yet. Check back soon!
No projects found. Check back soon!
</p>
</div>
) : (
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
{projects.map((project) => (
<ProjectCard project={project} />
{repos.map((repo) => (
<GiteaProjectCard repo={repo} />
))}
</div>
)
}
<div class="text-center mt-12">
<a
href="https://github.com/anotherhadi"
target="_blank"
class="btn btn-ghost gap-2"
>
View All Projects
<ArrowRight class="size-4" />
</a>
</div>
</main>
</Layout>