refactor: Reorganize project structure and update dependencies
- Removed blog, project, and work content files - Updated package dependencies including npm and removed license metadata - Refactored component layouts and page routes - Modified appwrite service for data operations
This commit is contained in:
1 parent
7997eccb12
commit
6ab3254384
51 files changed
+2951
-3221
No files matched your search
+11
-11
@@ -81,26 +81,26 @@ const stack = [
|
||||
<div class='relative w-full h-full flex items-center justify-center'>
|
||||
<div class='p-5 text-center'>
|
||||
<img src='/api/assets/689d27a400194d326f69' alt="Quinn Marvin" class="rounded-full w-32 h-32 mx-auto mb-4 border-4 border-spaghetti-red" />
|
||||
<p class='animated text-lg md:text-xl lg:text-2xl font-semibold opacity-75 text-spaghetti-brown'>
|
||||
<p class='animated text-lg md:text-xl lg:text-2xl font-semibold opacity-75 dark:text-spaghetti-brown'>
|
||||
Hello, I am Quinn Marvin
|
||||
</p>
|
||||
<p class='animated text-2xl md:text-3xl lg:text-4xl font-bold uppercase text-spaghetti-brown'>
|
||||
<p class='animated text-2xl md:text-3xl lg:text-4xl font-bold uppercase dark:text-spaghetti-brown'>
|
||||
CEO / Creator / Innovator
|
||||
</p>
|
||||
<p class='animated text-sm md:text-base lg:text-lg opacity-75 text-spaghetti-brown'>
|
||||
<p class='animated text-sm md:text-base lg:text-lg opacity-75 dark:text-spaghetti-brown'>
|
||||
Passionate about spaghetti, noodles and all things tech.
|
||||
</p>
|
||||
<p class='animated text-sm md:text-base lg:text-lg opacity-75 mt-2 text-spaghetti-brown'>
|
||||
<p class='animated text-sm md:text-base lg:text-lg opacity-75 mt-2 dark:text-spaghetti-brown'>
|
||||
Running 2 Unraid servers with Docker container ecosystem
|
||||
</p>
|
||||
<p class='animated text-sm md:text-base lg:text-lg opacity-75 mt-1 text-spaghetti-brown'>
|
||||
<p class='animated text-sm md:text-base lg:text-lg opacity-75 mt-1 dark:text-spaghetti-brown'>
|
||||
Supporting PostgreSQL, MariaDB, MySQL, MongoDB, Redis, and Minio
|
||||
</p>
|
||||
<div id="ctaButtons" class='animated flex flex-wrap gap-4 justify-center mt-5'>
|
||||
<a href='/blog' class='py-2 px-4 rounded truncate text-xs md:text-sm lg:text-base bg-spaghetti-red dark:bg-spaghetti-red text-spaghetti-brown dark:text-spaghetti-brown hover:opacity-75 blend'>
|
||||
<a href='/blog' class='py-2 px-4 rounded truncate text-xs md:text-sm lg:text-base bg-spaghetti-red dark:bg-spaghetti-red dark:text-spaghetti-brown hover:opacity-75 blend'>
|
||||
Read my blog
|
||||
</a>
|
||||
<a href='/work' class='py-2 px-4 truncate rounded text-xs md:text-sm lg:text-base border border-spaghetti-yellow/50 dark:border-spaghetti-yellow/50 hover:bg-spaghetti-yellow/20 hover:dark:bg-spaghetti-yellow/20 blend text-spaghetti-brown dark:text-spaghetti-brown'>
|
||||
<a href='/work' class='py-2 px-4 truncate rounded text-xs md:text-sm lg:text-base border border-spaghetti-yellow/50 dark:border-spaghetti-yellow/50 hover:bg-spaghetti-yellow/20 hover:dark:bg-spaghetti-yellow/20 blend dark:text-spaghetti-brown'>
|
||||
View my work
|
||||
</a>
|
||||
</div>
|
||||
@@ -109,11 +109,11 @@ const stack = [
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="relative bg-white dark:bg-black">
|
||||
<div class="relative bg-white dark:bg-black dark:text-spaghetti-brown">
|
||||
<div class="mx-auto max-w-screen-sm p-5 space-y-24 pb-16">
|
||||
|
||||
<!-- About Section -->
|
||||
<section class="animate">
|
||||
<section class="animate dark:text-spaghetti-brown">
|
||||
<article>
|
||||
<p>Hello! I'm Quinn Marvin, a passionate CEO/Creator/Innovator with an unrelenting love for spaghetti, noodles, and all things tech.</p>
|
||||
<p>With 10+ years of experience building high-performing engineering teams and driving innovation in dynamic environments, I combine deep technical expertise with exceptional emotional intelligence and a human-centered leadership approach.</p>
|
||||
@@ -140,7 +140,7 @@ const stack = [
|
||||
<ul class="space-y-4">
|
||||
{posts.map((post) => (
|
||||
<li>
|
||||
<ArrowCard entry={post} />
|
||||
<ArrowCard entry={post} collection={'blog'} />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
@@ -189,7 +189,7 @@ const stack = [
|
||||
<ul class="space-y-4">
|
||||
{projects.map((project) => (
|
||||
<li>
|
||||
<ArrowCard entry={project} />
|
||||
<ArrowCard entry={project} collection={'projects'} />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
@@ -7,7 +7,7 @@ import ArticleBottomLayout from "@layouts/ArticleBottomLayout.astro"
|
||||
import { getProjectById } from "@lib/appwrite-service"
|
||||
|
||||
// Get the requested project
|
||||
const slug = Astro.params.slug
|
||||
const slug = Astro.params.slug || ''
|
||||
const project = await getProjectById(slug)
|
||||
.then(projectData => {
|
||||
if (projectData) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { getProjectsPaginated } from "@lib/appwrite-service"
|
||||
|
||||
|
||||
// Get page and limit from URL parameters
|
||||
const url = new URL(typeof window !== 'undefined' ? window.location.href : 'http://localhost')
|
||||
const url = new URL(typeof window !== 'undefined' ? window.location.href : 'https://home.spaghet.io')
|
||||
const pageParam = url.searchParams.get('page') || '1'
|
||||
const limitParam = url.searchParams.get('limit') || '10'
|
||||
const page = parseInt(pageParam)
|
||||
@@ -17,6 +17,7 @@ const limit = parseInt(limitParam)
|
||||
// Fetch paginated projects
|
||||
const { posts, total } = await getProjectsPaginated(page, limit)
|
||||
.then(result => {
|
||||
console.log(result)
|
||||
return result;
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
@@ -1,62 +1,12 @@
|
||||
---
|
||||
import { getBlogPosts, getProjects } from "@lib/appwrite-service"
|
||||
import PageLayout from "@layouts/PageLayout.astro"
|
||||
import TopLayout from "@layouts/TopLayout.astro"
|
||||
import BottomLayout from "@layouts/BottomLayout.astro"
|
||||
import Search from "@components/Search"
|
||||
import { SEARCH } from "@consts"
|
||||
import type { BlogPost, Project } from "@lib/appwrite-service"
|
||||
|
||||
// Get all blog posts and projects from Appwrite
|
||||
const posts = (await getBlogPosts())
|
||||
.filter(post => !post.draft)
|
||||
|
||||
const projects = (await getProjects())
|
||||
.filter(project => !project.draft)
|
||||
|
||||
// Create unified data array for search - need to convert to proper format expected by Search component
|
||||
const searchData = [
|
||||
...posts.map(post => ({
|
||||
id: post.$id,
|
||||
slug: post.$id,
|
||||
body: post.contentHtml || post.content,
|
||||
collection: "blog",
|
||||
data: {
|
||||
title: post.title,
|
||||
summary: post.summary,
|
||||
date: new Date(post.date),
|
||||
tags: post.tags,
|
||||
draft: post.draft,
|
||||
content: post.contentHtml || post.content
|
||||
},
|
||||
render: async () => ({
|
||||
Content: () => {},
|
||||
headings: [],
|
||||
remarkPluginFrontmatter: {}
|
||||
})
|
||||
})),
|
||||
...projects.map(project => ({
|
||||
id: project.$id,
|
||||
slug: project.$id,
|
||||
body: project.contentHtml || project.content,
|
||||
collection: "projects",
|
||||
data: {
|
||||
title: project.title,
|
||||
summary: project.summary,
|
||||
date: new Date(project.date),
|
||||
tags: project.tags,
|
||||
draft: project.draft,
|
||||
demoUrl: project.demoUrl,
|
||||
repoUrl: project.repoUrl,
|
||||
content: project.contentHtml || project.content
|
||||
},
|
||||
render: async () => ({
|
||||
Content: () => {},
|
||||
headings: [],
|
||||
remarkPluginFrontmatter: {}
|
||||
})
|
||||
}))
|
||||
]
|
||||
// The search page now uses client-side search with Appwrite SDK directly
|
||||
// No need to pre-load all data as the Search component handles this via API calls
|
||||
---
|
||||
|
||||
<PageLayout title={SEARCH.TITLE} description={SEARCH.DESCRIPTION}>
|
||||
@@ -67,7 +17,7 @@ const searchData = [
|
||||
</TopLayout>
|
||||
<BottomLayout>
|
||||
<div class="animate">
|
||||
<Search client:load data={searchData}/>
|
||||
<Search client:load/>
|
||||
</div>
|
||||
</BottomLayout>
|
||||
</PageLayout>
|
||||
@@ -3,27 +3,15 @@ import PageLayout from "@layouts/PageLayout.astro"
|
||||
import TopLayout from "@layouts/TopLayout.astro"
|
||||
import BottomLayout from "@layouts/BottomLayout.astro"
|
||||
import { WORK } from "@consts"
|
||||
import { getWorkExperiences } from "@lib/appwrite-service"
|
||||
import { getWorkExperiences, type WorkExperience } from "@lib/appwrite-service"
|
||||
|
||||
// Helper function to map Appwrite document to compatible format for work page
|
||||
function mapAppwriteWorkToEntry(work: any) {
|
||||
return {
|
||||
id: work.$id,
|
||||
slug: work.$id, // Using ID as slug since we don't have a proper slug field
|
||||
data: {
|
||||
company: work.company,
|
||||
role: work.role,
|
||||
dateStart: new Date(work.dateStart),
|
||||
dateEnd: work.dateEnd,
|
||||
content: work.content // This will be rendered in the component
|
||||
},
|
||||
body: work.content
|
||||
};
|
||||
type Props = {
|
||||
entry: WorkExperience
|
||||
}
|
||||
|
||||
const work = await getWorkExperiences()
|
||||
.then(workList => {
|
||||
return workList.map(mapAppwriteWorkToEntry);
|
||||
return workList;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("Error fetching work experiences:", error);
|
||||
@@ -51,20 +39,18 @@ function formatWorkDate(input: Date | string) {
|
||||
<BottomLayout>
|
||||
<ul>
|
||||
{
|
||||
work.map((entry) => (
|
||||
work.sort((a, b) => a.dateEnd > b.dateEnd ? -1 : b.dateEnd > a.dateEnd ? 1 : 0).map((entry) => (
|
||||
<li class="animate border-b border-black/10 dark:border-white/25 mt-4 py-8 first-of-type:mt-0 first-of-type:pt-0 last-of-type:border-none">
|
||||
<div class="text-sm uppercase mb-4">
|
||||
{formatWorkDate(entry.data.dateStart)} - {formatWorkDate(entry.data.dateEnd)}
|
||||
{formatWorkDate(entry.dateStart)} - {formatWorkDate(entry.dateEnd)}
|
||||
</div>
|
||||
<div class="text-black dark:text-white font-semibold">
|
||||
{entry.data.company}
|
||||
{entry.company}
|
||||
</div>
|
||||
<div class="text-sm font-semibold">
|
||||
{entry.data.role}
|
||||
{entry.role}
|
||||
</div>
|
||||
<article class="prose dark:prose-invert">
|
||||
{entry.body}
|
||||
</article>
|
||||
<article class="prose dark:prose-invert" set:html={entry.contentHtml}></article>
|
||||
</li>
|
||||
))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user