Skip to content

Cleanup #366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions app/_components/mdx-component/code-sandbox-wrapper.tsx

This file was deleted.

18 changes: 0 additions & 18 deletions app/_components/mdx-component/iframe.tsx

This file was deleted.

8 changes: 1 addition & 7 deletions app/_components/mdx-component/mdx-component.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { cn } from "@/_lib/helpers";
import { MDXContent } from "@content-collections/mdx/react";
import Callout from "./callout";
import CodeSandboxWrapper from "./code-sandbox-wrapper";
import Iframe from "./iframe";
import PostImage from "./post-image";
import Video from "./video";

type MDXComponentProps = {
mdx: string;
Expand All @@ -21,10 +18,7 @@ const MDXComponent = ({ mdx, className }: MDXComponentProps) => {
className,
)}
>
<MDXContent
code={mdx}
components={{ Callout, CodeSandboxWrapper, Iframe, PostImage, Video }}
/>
<MDXContent code={mdx} components={{ Callout, PostImage }} />
</div>
);
};
Expand Down
37 changes: 0 additions & 37 deletions app/_components/mdx-component/video.tsx

This file was deleted.

Binary file modified app/favicon.ico
Binary file not shown.
Binary file modified app/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import NavLink from "./nav-link";
import "./syntax-highlighting.css";
import ThemeSwitcher from "./theme-switcher";

export const revalidate = 3600;
export const metadata: Metadata = {
title: {
default: "Akhila Ariyachandra",
Expand Down
112 changes: 1 addition & 111 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,9 @@ import MDXComponent from "@/_components/mdx-component";
import BreadcrumbStructuredData from "@/_components/structured-data/breadcrumb";
import ProfileStructuredData from "@/_components/structured-data/profile";
import profilePic from "@/public/profile-pic.png";
import { allAbouts, allJobs } from "content-collections";
import dayjs from "dayjs";
import { allAbouts } from "content-collections";
import Image from "next/image";

export const revalidate = 3600;

const getPeriod = (start: string, end?: string) => {
const startDate = dayjs(start);
const endDate = dayjs(end);

const years = endDate.diff(startDate, "year");
const months = endDate.diff(startDate, "month") - years * 12;

let period = "";

if (years > 0) {
if (years === 1) {
period = "1 year";
} else {
period = `${years.toString()} years`;
}
}

if (months > 0) {
if (period) {
period += ", ";
} else {
period = "";
}

if (months === 1) {
period += "1 month";
} else {
period += `${months.toString()} months`;
}
}

if (years === 0 && months === 0) {
const days = endDate.diff(startDate, "day");

if (days === 1) {
period = "1 day";
} else {
period = `${days.toString()} days`;
}
}

return period;
};

const HomePage = () => {
const about = allAbouts[0];

Expand All @@ -75,69 +28,6 @@ const HomePage = () => {

{!!about && <MDXComponent mdx={about.mdx} />}

<hr className="my-7 sm:my-8" />

<section>
<h2 className="font-display mb-6 text-xl font-bold tracking-tighter text-zinc-800 sm:mb-7 sm:text-2xl dark:text-zinc-200">
My Career
</h2>

<div className="space-y-5 sm:space-y-6">
{allJobs
.sort((a, b) =>
dayjs(a.period.start).isBefore(b.period.start) ? 1 : -1,
)
.map((job) => (
<div key={job._meta.path}>
<div className="mb-1 flex flex-row items-center gap-2 sm:mb-2 sm:gap-3">
<Image
src={job.company.logo}
width={64}
height={64}
alt={`The company logo of ${job.company.name}`}
className="h-14 w-14 shrink-0 rounded-xs sm:h-16 sm:w-16 sm:rounded-sm"
/>

<div className="break-words">
<h3 className="font-display text-lg leading-tight font-semibold tracking-tighter text-zinc-700 sm:text-xl sm:leading-snug dark:text-zinc-300">
{job.position}
</h3>

<a
href={job.company.link}
target="_blank"
rel="noopener noreferrer"
className="text-base leading-tight font-medium text-green-700 hover:underline sm:text-lg sm:leading-snug dark:text-green-500"
>
{job.company.name}
</a>

<div className="text-sm leading-tight sm:text-base sm:leading-snug">
<span className="text-zinc-600 dark:text-zinc-400">
{`${dayjs(job.period.start).format("MMMM YYYY")} - ${
job.period.end
? dayjs(job.period.end).format("MMMM YYYY")
: "Present"
}`}
</span>
<span className="font-light text-zinc-500 dark:text-zinc-400">
{` (${getPeriod(
job.period.start.toString(),
job.period.end
? job.period.end.toString()
: undefined,
)})`}
</span>
</div>
</div>
</div>

<MDXComponent mdx={job.mdx} />
</div>
))}
</div>
</section>

<ProfileStructuredData />
<BreadcrumbStructuredData items={[{ name: "Home", route: "/" }]} />
</>
Expand Down
6 changes: 2 additions & 4 deletions bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@vercel/analytics": "^1.4.1",
"@vercel/speed-insights": "1.1.0",
"clsx": "2.1.1",
"cva": "1.0.0-beta.1",
"cva": "^1.0.0-beta.3",
"dayjs": "1.11.13",
"drizzle-orm": "0.39.1",
"geist": "1.3.1",
Expand Down Expand Up @@ -631,7 +631,7 @@

"csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],

"cva": ["cva@1.0.0-beta.1", "", { "dependencies": { "clsx": "2.0.0" }, "peerDependencies": { "typescript": ">= 4.5.5 < 6" }, "optionalPeers": ["typescript"] }, "sha512-gznFqTgERU9q4wg7jfgqtt34+RUt9S5t0xDAAEuDwQEAXEgjdDkKXpLLNjwSxsB4Ln/sqWJEH7yhE8Ny0mxd0w=="],
"cva": ["cva@1.0.0-beta.3", "", { "dependencies": { "clsx": "^2.1.1" }, "peerDependencies": { "typescript": ">= 4.5.5" }, "optionalPeers": ["typescript"] }, "sha512-CZa8pTkpEygxJRLH9aod/wfnSgK5z/0GJqG/NNehlwam+S8llqCWUXS3eCenvAiW5sTUpwTWE6bJaeeZ/b4pzA=="],

"damerau-levenshtein": ["damerau-levenshtein@1.0.8", "", {}, "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA=="],

Expand Down Expand Up @@ -1663,8 +1663,6 @@

"@upstash/core-analytics/@upstash/redis": ["@upstash/redis@1.34.3", "", { "dependencies": { "crypto-js": "^4.2.0" } }, "sha512-VT25TyODGy/8ljl7GADnJoMmtmJ1F8d84UXfGonRRF8fWYJz7+2J6GzW+a6ETGtk4OyuRTt7FRSvFG5GvrfSdQ=="],

"cva/clsx": ["clsx@2.0.0", "", {}, "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q=="],

"drizzle-kit/esbuild": ["esbuild@0.19.12", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.19.12", "@esbuild/android-arm": "0.19.12", "@esbuild/android-arm64": "0.19.12", "@esbuild/android-x64": "0.19.12", "@esbuild/darwin-arm64": "0.19.12", "@esbuild/darwin-x64": "0.19.12", "@esbuild/freebsd-arm64": "0.19.12", "@esbuild/freebsd-x64": "0.19.12", "@esbuild/linux-arm": "0.19.12", "@esbuild/linux-arm64": "0.19.12", "@esbuild/linux-ia32": "0.19.12", "@esbuild/linux-loong64": "0.19.12", "@esbuild/linux-mips64el": "0.19.12", "@esbuild/linux-ppc64": "0.19.12", "@esbuild/linux-riscv64": "0.19.12", "@esbuild/linux-s390x": "0.19.12", "@esbuild/linux-x64": "0.19.12", "@esbuild/netbsd-x64": "0.19.12", "@esbuild/openbsd-x64": "0.19.12", "@esbuild/sunos-x64": "0.19.12", "@esbuild/win32-arm64": "0.19.12", "@esbuild/win32-ia32": "0.19.12", "@esbuild/win32-x64": "0.19.12" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg=="],

"eslint-import-resolver-node/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="],
Expand Down
33 changes: 1 addition & 32 deletions content-collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,37 +73,6 @@ const About = defineCollection({
},
});

const Job = defineCollection({
name: "Job",
directory: "content/jobs",
include: "*.mdx",
schema: (z) => ({
position: z.string(),
company: z.object({
name: z.string(),
link: z.string(),
logo: z.string(),
}),
period: z.object({
start: z.string(),
end: z.string().optional(),
}),
}),
transform: async (document, context) => {
const mdx = await compileMDX(context, document, {
remarkPlugins: [smartypants, a11yEmoji, remarkGfm],
rehypePlugins: [
rehypeSlug,
[externalLinks, { target: "_blank", rel: ["noopener", "noreferrer"] }],
],
});
return {
...document,
mdx,
};
},
});

export default defineConfig({
collections: [Post, NoBodyPost, About, Job],
collections: [Post, NoBodyPost, About],
});
12 changes: 0 additions & 12 deletions content/jobs/ifs-se.mdx

This file was deleted.

12 changes: 0 additions & 12 deletions content/jobs/srilankan-ise.mdx

This file was deleted.

12 changes: 0 additions & 12 deletions content/jobs/villvay-ase.mdx

This file was deleted.

13 changes: 0 additions & 13 deletions content/jobs/villvay-atl.mdx

This file was deleted.

12 changes: 0 additions & 12 deletions content/jobs/villvay-se.mdx

This file was deleted.

14 changes: 0 additions & 14 deletions content/jobs/villvay-sse.mdx

This file was deleted.

Loading