mirror of
https://github.com/hex248/ob248.com.git
synced 2026-02-08 02:33:02 +00:00
biome setup
This commit is contained in:
@@ -3,9 +3,9 @@ import { Icon } from "astro-icon/components";
|
||||
import { AI_SUMMARY_PROMPT } from "../lib/constants";
|
||||
|
||||
interface Props {
|
||||
url: string; // anything that precedes the prompt: e.g. "https://ai.example.com/?prompt="
|
||||
title: string;
|
||||
icon: string;
|
||||
url: string; // anything that precedes the prompt: e.g. "https://ai.example.com/?prompt="
|
||||
title: string;
|
||||
icon: string;
|
||||
}
|
||||
|
||||
const { url, title, icon } = Astro.props;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { Icon } from "astro-icon/components";
|
||||
import type { AstroModule, ProjectMetadata } from "../pages/index.astro";
|
||||
|
||||
interface Props {}
|
||||
type Props = {};
|
||||
|
||||
const {} = Astro.props;
|
||||
|
||||
@@ -17,17 +17,17 @@ options.push({
|
||||
});
|
||||
|
||||
// add all individual projects to options
|
||||
Object.values(
|
||||
import.meta.glob<AstroModule>("../pages/projects/*.astro", { eager: true })
|
||||
).forEach((module) => {
|
||||
const metadata = module.metadata as ProjectMetadata;
|
||||
if (metadata && !metadata.hidden) {
|
||||
options.push({
|
||||
name: `${metadata.title}`,
|
||||
location: `/projects/${metadata.slug}`,
|
||||
});
|
||||
}
|
||||
});
|
||||
Object.values(import.meta.glob<AstroModule>("../pages/projects/*.astro", { eager: true })).forEach(
|
||||
(module) => {
|
||||
const metadata = module.metadata as ProjectMetadata;
|
||||
if (metadata && !metadata.hidden) {
|
||||
options.push({
|
||||
name: `${metadata.title}`,
|
||||
location: `/projects/${metadata.slug}`,
|
||||
});
|
||||
}
|
||||
},
|
||||
);
|
||||
---
|
||||
|
||||
<script>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import "../styles/global.css";
|
||||
import CommandPalette from "../components/CommandPalette.astro";
|
||||
import Header from "../components/Header.astro";
|
||||
|
||||
const { currentPage } = Astro.props;
|
||||
---
|
||||
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
|
||||
const weights = [
|
||||
200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 475, 500, 525, 550,
|
||||
575, 600, 625, 650, 675, 700,
|
||||
200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 575, 600, 625, 650, 675, 700,
|
||||
];
|
||||
|
||||
const sampleText = "The quick brown fox jumps over the lazy dog 0123456789.";
|
||||
|
||||
@@ -7,76 +7,76 @@ import Layout from "../layouts/Layout.astro";
|
||||
import { AI_SUMMARY_PROMPT } from "../lib/constants";
|
||||
|
||||
export interface ProjectMetadata {
|
||||
title: string;
|
||||
description: string;
|
||||
date: string;
|
||||
slug: string;
|
||||
hidden: boolean;
|
||||
image?: string;
|
||||
tags?: string[];
|
||||
type: string;
|
||||
title: string;
|
||||
description: string;
|
||||
date: string;
|
||||
slug: string;
|
||||
hidden: boolean;
|
||||
image?: string;
|
||||
tags?: string[];
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface AstroModule {
|
||||
metadata?: ProjectMetadata;
|
||||
metadata?: ProjectMetadata;
|
||||
}
|
||||
|
||||
function parseDate(dateStr: string): Date {
|
||||
// formats like "February 2024", "January - June 2024", "Q1 2023", etc
|
||||
const lower = dateStr.toLowerCase();
|
||||
// formats like "February 2024", "January - June 2024", "Q1 2023", etc
|
||||
const lower = dateStr.toLowerCase();
|
||||
|
||||
if (lower.includes("q1")) return new Date("2023-01-01");
|
||||
if (lower.includes("q2")) return new Date("2023-04-01");
|
||||
if (lower.includes("q3")) return new Date("2023-07-01");
|
||||
if (lower.includes("q4")) return new Date("2023-10-01");
|
||||
if (lower.includes("q1")) return new Date("2023-01-01");
|
||||
if (lower.includes("q2")) return new Date("2023-04-01");
|
||||
if (lower.includes("q3")) return new Date("2023-07-01");
|
||||
if (lower.includes("q4")) return new Date("2023-10-01");
|
||||
|
||||
const months: Record<string, number> = {
|
||||
january: 0,
|
||||
february: 1,
|
||||
march: 2,
|
||||
april: 3,
|
||||
may: 4,
|
||||
june: 5,
|
||||
july: 6,
|
||||
august: 7,
|
||||
september: 8,
|
||||
october: 9,
|
||||
november: 10,
|
||||
december: 11,
|
||||
};
|
||||
const months: Record<string, number> = {
|
||||
january: 0,
|
||||
february: 1,
|
||||
march: 2,
|
||||
april: 3,
|
||||
may: 4,
|
||||
june: 5,
|
||||
july: 6,
|
||||
august: 7,
|
||||
september: 8,
|
||||
october: 9,
|
||||
november: 10,
|
||||
december: 11,
|
||||
};
|
||||
|
||||
// month and year
|
||||
for (const [monthName, monthIndex] of Object.entries(months)) {
|
||||
if (lower.includes(monthName)) {
|
||||
const yearMatch = dateStr.match(/\b(20\d{2})\b/);
|
||||
if (yearMatch) {
|
||||
return new Date(parseInt(yearMatch[1]), monthIndex, 1);
|
||||
}
|
||||
// month and year
|
||||
for (const [monthName, monthIndex] of Object.entries(months)) {
|
||||
if (lower.includes(monthName)) {
|
||||
const yearMatch = dateStr.match(/\b(20\d{2})\b/);
|
||||
if (yearMatch) {
|
||||
return new Date(parseInt(yearMatch[1]), monthIndex, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// fallback: try to extract any year
|
||||
const yearMatch = dateStr.match(/\b(20\d{2})\b/);
|
||||
if (yearMatch) {
|
||||
return new Date(parseInt(yearMatch[1]), 0, 1);
|
||||
}
|
||||
// fallback: try to extract any year
|
||||
const yearMatch = dateStr.match(/\b(20\d{2})\b/);
|
||||
if (yearMatch) {
|
||||
return new Date(parseInt(yearMatch[1]), 0, 1);
|
||||
}
|
||||
|
||||
return new Date(0);
|
||||
return new Date(0);
|
||||
}
|
||||
|
||||
const isDevMode = import.meta.env.PUBLIC_DEV === "1";
|
||||
|
||||
const projects: ProjectMetadata[] = Object.values(
|
||||
import.meta.glob<AstroModule>("./projects/*.astro", { eager: true })
|
||||
import.meta.glob<AstroModule>("./projects/*.astro", { eager: true }),
|
||||
)
|
||||
.map((module) => module.metadata)
|
||||
.filter((metadata): metadata is ProjectMetadata => metadata !== undefined)
|
||||
.filter((project) => !project.hidden || isDevMode)
|
||||
.sort((a, b) => parseDate(b.date).getTime() - parseDate(a.date).getTime());
|
||||
.map((module) => module.metadata)
|
||||
.filter((metadata): metadata is ProjectMetadata => metadata !== undefined)
|
||||
.filter((project) => !project.hidden || isDevMode)
|
||||
.sort((a, b) => parseDate(b.date).getTime() - parseDate(a.date).getTime());
|
||||
|
||||
const allTags = new Set<string>();
|
||||
projects.forEach((project) => {
|
||||
project.tags?.forEach((tag) => allTags.add(tag));
|
||||
project.tags?.forEach((tag) => allTags.add(tag));
|
||||
});
|
||||
|
||||
const sortedTags = Array.from(allTags).sort((a, b) => a.localeCompare(b));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
import Demo from "../../components/Demo.astro";
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
|
||||
export const metadata = {
|
||||
title: "factor-e",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
import Demo from "../../components/Demo.astro";
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
|
||||
export const metadata = {
|
||||
title: "flackie",
|
||||
@@ -11,15 +11,7 @@ export const metadata = {
|
||||
image: "/flackie-icon.svg",
|
||||
github: "https://github.com/hex248/flackie",
|
||||
hidden: true,
|
||||
tags: [
|
||||
"Raspberry Pi",
|
||||
"Python",
|
||||
"C++",
|
||||
"CMake",
|
||||
"Electronics",
|
||||
"Pillow",
|
||||
"Image Generation",
|
||||
],
|
||||
tags: ["Raspberry Pi", "Python", "C++", "CMake", "Electronics", "Pillow", "Image Generation"],
|
||||
type: "personal",
|
||||
};
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
import Demo from "../../components/Demo.astro";
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
|
||||
export const metadata = {
|
||||
title: "glimpse",
|
||||
@@ -11,15 +11,7 @@ export const metadata = {
|
||||
url: "https://glimpse.ob248.com",
|
||||
github: "https://github.com/hex248/glimpse",
|
||||
hidden: false,
|
||||
tags: [
|
||||
"Web",
|
||||
"React",
|
||||
"TypeScript",
|
||||
"PostgreSQL",
|
||||
"Blob Storage",
|
||||
"Databases",
|
||||
"OAuth2",
|
||||
],
|
||||
tags: ["Web", "React", "TypeScript", "PostgreSQL", "Blob Storage", "Databases", "OAuth2"],
|
||||
type: "personal",
|
||||
};
|
||||
---
|
||||
|
||||
@@ -1,29 +1,18 @@
|
||||
---
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
import Demo from "../../components/Demo.astro";
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
|
||||
export const metadata = {
|
||||
title: "good morning!",
|
||||
description:
|
||||
"An app for couples or friends to share daily notices with songs and photos",
|
||||
date: "October 2025",
|
||||
slug: "good-morning",
|
||||
image: "/good-morning-icon.png",
|
||||
url: "https://gm.ob248.com",
|
||||
github: "https://github.com/hex248/good-morning",
|
||||
hidden: false,
|
||||
tags: [
|
||||
"Web",
|
||||
"React",
|
||||
"TypeScript",
|
||||
"Go",
|
||||
"PostgreSQL",
|
||||
"AWS S3",
|
||||
"Databases",
|
||||
"OAuth2",
|
||||
"Spotify API",
|
||||
],
|
||||
type: "personal",
|
||||
title: "good morning!",
|
||||
description: "An app for couples or friends to share daily notices with songs and photos",
|
||||
date: "October 2025",
|
||||
slug: "good-morning",
|
||||
image: "/good-morning-icon.png",
|
||||
url: "https://gm.ob248.com",
|
||||
github: "https://github.com/hex248/good-morning",
|
||||
hidden: false,
|
||||
tags: ["Web", "React", "TypeScript", "Go", "PostgreSQL", "AWS S3", "Databases", "OAuth2", "Spotify API"],
|
||||
type: "personal",
|
||||
};
|
||||
---
|
||||
|
||||
|
||||
@@ -1,27 +1,18 @@
|
||||
---
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
import Demo from "../../components/Demo.astro";
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
|
||||
export const metadata = {
|
||||
title: "Issue",
|
||||
description:
|
||||
"A simple project management tool for developers. Born out of frustration with Jira.",
|
||||
date: "December 2025 - Present",
|
||||
slug: "issue",
|
||||
image: "/issue-icon.svg",
|
||||
url: "https://issue.ob248.com",
|
||||
github: "https://github.com/hex248/issue",
|
||||
hidden: false,
|
||||
tags: [
|
||||
"Web",
|
||||
"React",
|
||||
"TypeScript",
|
||||
"Tauri",
|
||||
"PostgreSQL",
|
||||
"Databases",
|
||||
"Bun",
|
||||
],
|
||||
type: "personal",
|
||||
title: "Issue",
|
||||
description: "A simple project management tool for developers. Born out of frustration with Jira.",
|
||||
date: "December 2025 - Present",
|
||||
slug: "issue",
|
||||
image: "/issue-icon.svg",
|
||||
url: "https://issue.ob248.com",
|
||||
github: "https://github.com/hex248/issue",
|
||||
hidden: false,
|
||||
tags: ["Web", "React", "TypeScript", "Tauri", "PostgreSQL", "Databases", "Bun"],
|
||||
type: "personal",
|
||||
};
|
||||
---
|
||||
|
||||
|
||||
@@ -1,23 +1,15 @@
|
||||
---
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
import Demo from "../../components/Demo.astro";
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
|
||||
export const metadata = {
|
||||
title: "MIZU",
|
||||
description:
|
||||
"A discord bot card trading and collection game. (Currently inactive, 4000+ players) ",
|
||||
description: "A discord bot card trading and collection game. (Currently inactive, 4000+ players) ",
|
||||
date: "2021 - 2024",
|
||||
slug: "mizu",
|
||||
image: "/mizu-icon.svg",
|
||||
hidden: false,
|
||||
tags: [
|
||||
"Node.js",
|
||||
"TypeScript",
|
||||
"PostgreSQL",
|
||||
"AWS S3",
|
||||
"Discord API",
|
||||
"Database",
|
||||
],
|
||||
tags: ["Node.js", "TypeScript", "PostgreSQL", "AWS S3", "Discord API", "Database"],
|
||||
type: "personal",
|
||||
};
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
import Demo from "../../components/Demo.astro";
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
|
||||
export const metadata = {
|
||||
title: "PrayerBud",
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
---
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
import Demo from "../../components/Demo.astro";
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
|
||||
export const metadata = {
|
||||
title: "Shleep",
|
||||
description:
|
||||
"A couch co-op base defense game where you protect a sleepign child from nightmares.",
|
||||
description: "A couch co-op base defense game where you protect a sleepign child from nightmares.",
|
||||
date: "February - June 2023",
|
||||
slug: "shleep",
|
||||
image: "/shleep-icon.svg",
|
||||
|
||||
@@ -1,26 +1,16 @@
|
||||
---
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
import Demo from "../../components/Demo.astro";
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
|
||||
export const metadata = {
|
||||
title: "Watercooler",
|
||||
description:
|
||||
"Virtual office space for remote teams allowing quick questions and spontaneous chats.",
|
||||
description: "Virtual office space for remote teams allowing quick questions and spontaneous chats.",
|
||||
date: "March 2025",
|
||||
slug: "watercooler",
|
||||
image: "/watercooler-icon.svg",
|
||||
// github: "https://github.com/hex248/watercooler",
|
||||
hidden: true,
|
||||
tags: [
|
||||
"Web",
|
||||
"React",
|
||||
"TypeScript",
|
||||
"WebRTC",
|
||||
"LiveKit",
|
||||
"PostgreSQL",
|
||||
"OAuth2",
|
||||
"Databases",
|
||||
],
|
||||
tags: ["Web", "React", "TypeScript", "WebRTC", "LiveKit", "PostgreSQL", "OAuth2", "Databases"],
|
||||
type: "personal",
|
||||
};
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
import Demo from "../../components/Demo.astro";
|
||||
import ProjectPage from "../../components/ProjectPage.astro";
|
||||
|
||||
export const metadata = {
|
||||
title: "Wiskatron",
|
||||
|
||||
@@ -263,12 +263,7 @@ body {
|
||||
}
|
||||
|
||||
::selection {
|
||||
background-color: rgba(
|
||||
51,
|
||||
136,
|
||||
255,
|
||||
0.25
|
||||
); /* --ayu-selection with opacity */
|
||||
background-color: rgba(51, 136, 255, 0.25); /* --ayu-selection with opacity */
|
||||
color: var(--ayu-fg);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user