diff --git a/src/components/header.astro b/src/components/header.astro index edc791e..af3fd09 100644 --- a/src/components/header.astro +++ b/src/components/header.astro @@ -2,6 +2,10 @@ import { Image } from "astro:assets"; import logo from "../images/logo.png"; import IconExternalLink from "./icons/external-link.astro"; +import IconYouTube from "./icons/youtube.astro"; +import IconBilibili from "./icons/bilibili.astro"; +import IconXiaohongshu from "./icons/xiaohongshu.astro"; +import { socialLinks } from "../constants"; const channels = [ { @@ -50,10 +54,34 @@ const channels = [ } -
- Posts +
+ +
+ Posts +
diff --git a/src/components/icons/bilibili.astro b/src/components/icons/bilibili.astro new file mode 100644 index 0000000..c262645 --- /dev/null +++ b/src/components/icons/bilibili.astro @@ -0,0 +1,33 @@ +--- +type Props = { + className?: string; +}; + +const { className } = Astro.props; + +let finalClassNames = []; + +if (className) { + finalClassNames.push(...className.split(" ").map((x) => x.trim())); +} + +if (!finalClassNames.some((x) => x.startsWith("h-"))) { + finalClassNames.push("h-4"); +} + +if (!finalClassNames.some((x) => x.startsWith("w-"))) { + finalClassNames.push("w-4"); +} +--- + + diff --git a/src/components/icons/xiaohongshu.astro b/src/components/icons/xiaohongshu.astro new file mode 100644 index 0000000..a12638c --- /dev/null +++ b/src/components/icons/xiaohongshu.astro @@ -0,0 +1,33 @@ +--- +type Props = { + className?: string; +}; + +const { className } = Astro.props; + +let finalClassNames = []; + +if (className) { + finalClassNames.push(...className.split(" ").map((x) => x.trim())); +} + +if (!finalClassNames.some((x) => x.startsWith("h-"))) { + finalClassNames.push("h-4"); +} + +if (!finalClassNames.some((x) => x.startsWith("w-"))) { + finalClassNames.push("w-4"); +} +--- + + diff --git a/src/components/icons/youtube.astro b/src/components/icons/youtube.astro new file mode 100644 index 0000000..188a98e --- /dev/null +++ b/src/components/icons/youtube.astro @@ -0,0 +1,33 @@ +--- +type Props = { + className?: string; +}; + +const { className } = Astro.props; + +let finalClassNames = []; + +if (className) { + finalClassNames.push(...className.split(" ").map((x) => x.trim())); +} + +if (!finalClassNames.some((x) => x.startsWith("h-"))) { + finalClassNames.push("h-4"); +} + +if (!finalClassNames.some((x) => x.startsWith("w-"))) { + finalClassNames.push("w-4"); +} +--- + + diff --git a/src/constants.ts b/src/constants.ts index f628f12..6864434 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -13,6 +13,24 @@ export const authors = [{ link: null }] +export const socialLinks = [ + { + type: 'youtube', + url: 'https://www.youtube.com/@annatarhe', + label: 'YouTube', + }, + { + type: 'bilibili', + url: 'https://space.bilibili.com/173440264', + label: 'Bilibili', + }, + { + type: 'xiaohongshu', + url: 'https://www.xiaohongshu.com/user/profile/5b23cdfb11be1002d5f82bd8', + label: '小红书', + }, +] as const; + export const evonia = { name: 'Evonia.ai', url: 'https://evoniaai.github.io/',