projects page and unicord post

This commit is contained in:
2026-08-23 22:03:49 -05:00
parent 8322e0275b
commit 30d33077ec
18 changed files with 795 additions and 106 deletions
+20
View File
@@ -0,0 +1,20 @@
export function projectEntryHref(page: {
path: string;
href?: string | null;
}) {
return page.href || `/projects${page.path}`;
}
export function isExternalHref(href: string) {
return /^https?:\/\//i.test(href);
}
export function projectOgImage(
src: string | undefined,
siteUrl: string,
fallback: string,
) {
if (!src) return fallback;
if (/^https?:\/\//i.test(src)) return src;
return `${siteUrl}${src.startsWith('/') ? src : `/${src}`}`;
}
+6 -5
View File
@@ -1,15 +1,16 @@
export const BG_THEMES = [
{ id: 'dusk', label: 'Dusk' },
{ id: 'paper', label: 'Paper' },
{ id: 'navy', label: 'Navy' },
{ id: 'midnight', label: 'Midnight' },
{ id: 'indigo', label: 'Indigo' },
{ id: 'storm', label: 'Storm' },
{ id: 'slate', label: 'Slate' },
{ id: 'ink', label: 'Ink' },
{ id: 'pine', label: 'Pine' },
{ id: 'wine', label: 'Wine' },
{ id: 'cocoa', label: 'Cocoa' },
{ id: 'paper', label: 'Paper' },
// Disabled for now, I don't like them as much
// { id: 'storm', label: 'Storm' },
// { id: 'pine', label: 'Pine' },
// { id: 'wine', label: 'Wine' },
// { id: 'cocoa', label: 'Cocoa' },
] as const;
export type BgThemeId = (typeof BG_THEMES)[number]['id'];