From e7095aaa6617cb3755eb4b36f747a0498fd9b882 Mon Sep 17 00:00:00 2001 From: Mackie Date: Mon, 25 May 2026 03:15:30 +0800 Subject: [PATCH] footers --- src/blocks/Skills/Component.ts | 80 ++++++++++++++++++++++++++++++++++ src/blocks/Skills/config.ts | 71 ++++++++++++++++++++++++++++++ src/collections/Pages/index.ts | 3 +- 3 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 src/blocks/Skills/Component.ts create mode 100644 src/blocks/Skills/config.ts diff --git a/src/blocks/Skills/Component.ts b/src/blocks/Skills/Component.ts new file mode 100644 index 0000000..0f53700 --- /dev/null +++ b/src/blocks/Skills/Component.ts @@ -0,0 +1,80 @@ +import React from 'react' +import { cn } from '@/utilities/ui' + +type SkillCategory = { + title: string + icon: string + tags: { tag: string }[] +} + +type SkillsBlockProps = { + heading?: string + keySkills?: { skill: string }[] + categories?: SkillCategory[] +} + +export function SkillsBlock({ heading, keySkills, categories }: SkillsBlockProps) { + return ( +
+ {/* Heading */} + {heading && ( +

+ {heading} +

+ )} + + {/* Key skills pills */} + {Array.isArray(keySkills) && keySkills.length > 0 && ( +
+ {keySkills.map(({ skill }, i) => ( + + {skill} + + ))} +
+ )} + + {/* Categories grid */} + {Array.isArray(categories) && categories.length > 0 && ( +
+ {categories.map((cat, i) => { + const isLastRow = i >= categories.length - (categories.length % 3 || 3) + const isLastCol = (i + 1) % 3 === 0 + return ( +
+