Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support sns icon #139

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ import type { BlogState, DateFormat, Post } from "./types.d.ts";
const socialAppIcons = new Map([
["github.com", IconGithub],
["twitter.com", IconTwitter],
["x.com", IconX],
["instagram.com", IconInstagram],
["linkedin.com", IconLinkedin],
["mastodon.social", IconMastodon],
["bsky.app", IconBlueSky],
]);

interface IndexProps {
Expand Down Expand Up @@ -391,6 +393,22 @@ function IconTwitter() {
);
}

export function IconX() {
return (
<svg
className="inline-block w-5 h-5"
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M 11.522465,8.775687 17.474838,2 H 16.064813 L 10.894188,7.8820317 6.7674937,2 H 2.006661 L 8.248393,10.895521 2.006661,18 H 3.416686 L 8.8734721,11.787044 13.232506,18 h 4.760833 M 3.9255952,3.0412656 H 6.0917901 L 16.063747,17.009892 H 13.89702"
fill="currentColor"
/>
</svg>
);
}

function IconInstagram() {
return (
<svg
Expand Down Expand Up @@ -438,3 +456,19 @@ function IconMastodon() {
</svg>
);
}

export function IconBlueSky() {
return (
<svg
className="inline-block w-5 h-5"
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M 9.993191,9.1994727 C 9.26695,7.7923807 7.297021,5.1642957 5.463262,3.8706787 3.706667,2.6315297 3.034894,2.8448627 2.599149,3.0445797 2.0907801,3.2760687 2,4.0567777 2,4.5152177 c 0,0.45844 0.249645,3.767376 0.417589,4.316596 0.544681,1.8246813 2.473759,2.4419863 4.253049,2.2422693 0.09078,-0.01362 0.181561,-0.02723 0.27688,-0.03631 -0.09078,0.01362 -0.1861,0.02723 -0.27688,0.03631 -2.60539,0.385816 -4.9248224,1.334468 -1.883688,4.716029 3.34071,3.458723 4.579859,-0.739858 5.21532,-2.873192 0.63546,2.128795 1.366241,6.177589 5.151773,2.873192 C 18,12.91692 15.934752,11.459899 13.329362,11.074083 c -0.09078,-0.0091 -0.1861,-0.0227 -0.27688,-0.03631 0.09532,0.01362 0.1861,0.0227 0.27688,0.03631 1.77929,0.199717 3.712908,-0.417588 4.253049,-2.2422693 C 17.745816,8.2780547 18,4.9736577 18,4.5152177 c 0,-0.45844 -0.09078,-1.239149 -0.599149,-1.470638 -0.440284,-0.199717 -1.107518,-0.41305 -2.864113,0.826099 -1.847376,1.298156 -3.817305,3.921702 -4.543547,5.328794 z"
fill="currentColor"
/>
</svg>
);
}