mirror of
https://github.com/Patiun/com.gregkilmer.www.git
synced 2026-11-08 04:08:24 +00:00
Phase 5: every page of the site, the resume PDF and RSS
Landing, About, Now, Resume (with a generated PDF), Work and case studies, Inquiries and the sent page, Library and the Shelf, Workshop and craft pages, Tabletop, Blog with topics and posts, RSS, the Store, product lines, the order form and the 404, all rendered from the content service's notes. Schema: experience previousRoles, skills stack core items, page stats, make tags and deck favorite. Icon names from notes map to brand icons in one place, and HTML comments are dropped when Markdown renders. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012aSbo2D1qP8cMFQCykf7kx
This commit is contained in:
@@ -218,10 +218,11 @@ export function mediaSrc(value: string | undefined): string | undefined {
|
||||
return `/media/${encodeURIComponent(file.trim())}`;
|
||||
}
|
||||
|
||||
/** Status kinds name icons; older notes use Material names, mapped here to brand icons. */
|
||||
/** Notes name icons; older notes use Material names, mapped here to brand icons. */
|
||||
const MDI: Record<string, string> = {
|
||||
"book-open-variant": "bookshelf",
|
||||
"book-open-page-variant": "bookshelf",
|
||||
notebook: "bookshelf",
|
||||
headphones: "play",
|
||||
"television-classic": "tv",
|
||||
television: "tv",
|
||||
@@ -229,11 +230,33 @@ const MDI: Record<string, string> = {
|
||||
"dice-multiple": "dice",
|
||||
"hammer-wrench": "hammer",
|
||||
school: "graduation",
|
||||
"map-marker": "location",
|
||||
"map-marker-outline": "location",
|
||||
"briefcase-outline": "briefcase",
|
||||
paw: "dog",
|
||||
"cup-outline": "tea",
|
||||
coffee: "tea",
|
||||
"home-outline": "home",
|
||||
"heart-outline": "heart",
|
||||
"code-tags": "web",
|
||||
laptop: "monitor",
|
||||
"cards-playing": "proxy-cards",
|
||||
"cards-playing-outline": "proxy-cards",
|
||||
cards: "proxy-cards",
|
||||
"printer-3d-nozzle": "print",
|
||||
"printer-3d": "print",
|
||||
printer: "print",
|
||||
};
|
||||
|
||||
export function brandIcon(name: string | undefined): string {
|
||||
if (!name) return "favorite";
|
||||
return MDI[name] ?? name;
|
||||
/** The brand icons in @gk/ui. */
|
||||
const ICONS = new Set(
|
||||
Object.keys(import.meta.glob("../../../../packages/ui/src/assets/icons/*.svg")).map((p) => p.replace(/^.*\/(.+)\.svg$/, "$1")),
|
||||
);
|
||||
|
||||
/** A brand icon for a note's icon name, or the fallback when none matches. */
|
||||
export function brandIcon(name: string | undefined, fallback = "favorite"): string {
|
||||
const mapped = name ? (MDI[name] ?? name) : fallback;
|
||||
return ICONS.has(mapped) ? mapped : fallback;
|
||||
}
|
||||
|
||||
/** "Oct 11, 2026" from "2026-10-11". */
|
||||
|
||||
Reference in New Issue
Block a user