Cayden Website 2.0: Rewrite with t3code & hand
This commit is contained in:
parent
75a0e8f5fc
commit
243527af9f
34 changed files with 1652 additions and 1001 deletions
|
|
@ -1,74 +0,0 @@
|
|||
import fs from "fs"
|
||||
import matter from "gray-matter"
|
||||
import path from "path"
|
||||
import moment from "moment"
|
||||
import {remark} from "remark";
|
||||
import html from "remark-html"
|
||||
|
||||
import type {ArticleItem} from "@/types";
|
||||
|
||||
const articlesDirectory = path.join(process.cwd(), "articles");
|
||||
|
||||
export const getSortedArticles = (): ArticleItem[] => {
|
||||
const fileNames = fs.readdirSync(articlesDirectory);
|
||||
|
||||
const allArticlesData = fileNames.map((fileName) => {
|
||||
const id = fileName.replace(/\.md$/, "");
|
||||
|
||||
const fullPath = path.join(articlesDirectory, fileName);
|
||||
const fileContents = fs.readFileSync(fullPath, "utf8");
|
||||
|
||||
const matterResult = matter(fileContents);
|
||||
|
||||
return {
|
||||
id,
|
||||
title: matterResult.data.title,
|
||||
date: matterResult.data.date,
|
||||
category: matterResult.data.category,
|
||||
}
|
||||
})
|
||||
|
||||
return allArticlesData.sort((a, b) => {
|
||||
const format = "DD-MM-YYYY";
|
||||
const dateOne = moment(a.date, format);
|
||||
const dateTwo = moment(b.date, format);
|
||||
|
||||
return dateTwo.valueOf() - dateOne.valueOf();
|
||||
})
|
||||
}
|
||||
|
||||
export const getCategorizedArticles = (): Record<string, ArticleItem[]> => {
|
||||
const sortedArticles = getSortedArticles();
|
||||
const categorisedArticles: Record<string, ArticleItem[]> = {}
|
||||
|
||||
sortedArticles.forEach((article) => {
|
||||
if (!categorisedArticles[article.category]) {
|
||||
categorisedArticles[article.category] = []
|
||||
}
|
||||
categorisedArticles[article.category].push(article);
|
||||
})
|
||||
|
||||
return categorisedArticles;
|
||||
}
|
||||
|
||||
export const getArticleData = async (id: string) => {
|
||||
const fullPath = path.join(articlesDirectory, `${id}.md`);
|
||||
|
||||
const fileContents = fs.readFileSync(fullPath, "utf8");
|
||||
|
||||
const matterResult = matter(fileContents);
|
||||
|
||||
const processedContent = await remark()
|
||||
.use(html)
|
||||
.process(matterResult.content)
|
||||
|
||||
const contentHtml = processedContent.toString();
|
||||
|
||||
return {
|
||||
id,
|
||||
contentHtml,
|
||||
title: matterResult.data.title,
|
||||
category: matterResult.data.category,
|
||||
date: moment(matterResult.data.date, "DD-MM-YYYY").format("MMMM Do YYYY")
|
||||
}
|
||||
}
|
||||
70
lib/site.ts
Normal file
70
lib/site.ts
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
export type Project = {
|
||||
title: string;
|
||||
blurb: string;
|
||||
stack: string;
|
||||
};
|
||||
|
||||
export type Feat = {
|
||||
title: string;
|
||||
detail: string;
|
||||
};
|
||||
|
||||
export const site = {
|
||||
name: 'Cayden',
|
||||
role: 'Web Developer',
|
||||
tagline:
|
||||
"I'm a proven people leader building fast, dependable web software for clinical floors and fleet operations.",
|
||||
gitlab: 'https://gitlab.com/caydens',
|
||||
email: 'hi@caydens.dev',
|
||||
};
|
||||
|
||||
export const nav = [
|
||||
{ label: 'About', href: '#about' },
|
||||
{ label: 'Work', href: '#work' },
|
||||
{ label: 'Leadership', href: '#feats' },
|
||||
{ label: 'Contact', href: '#contact' },
|
||||
];
|
||||
|
||||
export const stack = ['TypeScript', 'React', 'Next.js', 'Python', 'JavaScript'];
|
||||
|
||||
export const about = [
|
||||
'I engineer responsive, high-performance web applications where speed and clarity are paramount, specializing in touch-first EHR interfaces and live fleet telemetry for mobile medical workstations. I bridge the gap between human workflows and technical architecture to deliver interfaces that feel natural, comfortable, and precise.',
|
||||
"Outside of software engineering, I directed one of the Southeast’s largest interest-driven communities, producing 250-attendee live events, speaking at regional conventions, and coordinating partnerships with major streaming platforms.",
|
||||
];
|
||||
|
||||
export const projects: Project[] = [
|
||||
{
|
||||
title: 'Fleet Management & Tracking',
|
||||
blurb: 'Empower high-stakes healthcare environments with real-time tracking, telemetry, and remote management for EHR devices.',
|
||||
stack: 'TypeScript · Next.js · SQL · Rust',
|
||||
},
|
||||
{
|
||||
title: 'Leadership Training Platforms',
|
||||
blurb: 'Prepare corporate leaders for critical decision-making through dynamic, real-world simulations of routine and high-stress management.',
|
||||
stack: 'React · Tailwind CSS',
|
||||
},
|
||||
{
|
||||
title: 'Battery Management Tooling',
|
||||
blurb: 'Validated configuration tooling for programming power delivery controllers in multi-cell battery packs.',
|
||||
stack: 'Next.js · Python · Embedded',
|
||||
},
|
||||
];
|
||||
|
||||
export const feats: Feat[] = [
|
||||
{
|
||||
title: 'Live event production',
|
||||
detail: 'Produced gatherings of up to 250 attendees and coordinated cross-country talent travel.',
|
||||
},
|
||||
{
|
||||
title: 'Community direction',
|
||||
detail: "Led one of the Southern USA's largest interest-driven communities.",
|
||||
},
|
||||
{
|
||||
title: 'Media partnerships',
|
||||
detail: 'Negotiated talent placements with global streaming networks.',
|
||||
},
|
||||
{
|
||||
title: 'Public speaking',
|
||||
detail: 'Regular convention panelist on community and operations leadership.',
|
||||
},
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue