chore: support telegram in social links
This commit is contained in:
parent
af29690c63
commit
121353ae3d
22
src/components/icons/telegram.tsx
Normal file
22
src/components/icons/telegram.tsx
Normal file
@ -0,0 +1,22 @@
|
||||
import React from 'react';
|
||||
import type { SVGProps } from 'react';
|
||||
|
||||
/**
|
||||
* https://icon-sets.iconify.design/fa6-brands/telegram/
|
||||
*/
|
||||
export function TelegramIcon(props: SVGProps<SVGSVGElement>) {
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={496}
|
||||
height={512}
|
||||
viewBox="0 0 496 512"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M248 8C111.033 8 0 119.033 0 256s111.033 248 248 248s248-111.033 248-248S384.967 8 248 8m114.952 168.66c-3.732 39.215-19.881 134.378-28.1 178.3c-3.476 18.584-10.322 24.816-16.948 25.425c-14.4 1.326-25.338-9.517-39.287-18.661c-21.827-14.308-34.158-23.215-55.346-37.177c-24.485-16.135-8.612-25 5.342-39.5c3.652-3.793 67.107-61.51 68.335-66.746c.153-.655.3-3.1-1.154-4.384s-3.59-.849-5.135-.5q-3.283.746-104.608 69.142q-14.845 10.194-26.894 9.934c-8.855-.191-25.888-5.006-38.551-9.123c-15.531-5.048-27.875-7.717-26.8-16.291q.84-6.7 18.45-13.7q108.446-47.248 144.628-62.3c68.872-28.647 83.183-33.623 92.511-33.789c2.052-.034 6.639.474 9.61 2.885a10.45 10.45 0 0 1 3.53 6.716a43.8 43.8 0 0 1 .417 9.769"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
}
|
@ -7,6 +7,7 @@ import { GitHubIcon } from '@/components/icons/github';
|
||||
import { InstagramIcon } from '@/components/icons/instagram';
|
||||
import { LinkedInIcon } from '@/components/icons/linkedin';
|
||||
import { MastodonIcon } from '@/components/icons/mastodon';
|
||||
import { TelegramIcon } from '@/components/icons/telegram';
|
||||
import { TikTokIcon } from '@/components/icons/tiktok';
|
||||
import { XTwitterIcon } from '@/components/icons/x';
|
||||
import { YouTubeIcon } from '@/components/icons/youtube';
|
||||
@ -106,5 +107,13 @@ export function getSocialLinks(): MenuItem[] {
|
||||
});
|
||||
}
|
||||
|
||||
if (websiteConfig.metadata.social?.telegram) {
|
||||
socialLinks.push({
|
||||
title: 'Telegram',
|
||||
href: websiteConfig.metadata.social.telegram,
|
||||
icon: <TelegramIcon className="size-4 shrink-0" />,
|
||||
});
|
||||
}
|
||||
|
||||
return socialLinks;
|
||||
}
|
||||
|
1
src/types/index.d.ts
vendored
1
src/types/index.d.ts
vendored
@ -57,6 +57,7 @@ export interface SocialConfig {
|
||||
facebook?: string;
|
||||
instagram?: string;
|
||||
tiktok?: string;
|
||||
telegram?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user