-
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f13e47
commit faa418c
Showing
4 changed files
with
96 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
web/next-example/src/components/landing/GithubSponsorButton/GithubSponsorButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
|
||
export const GithubSponsorButton = () => { | ||
return ( | ||
<a | ||
href="https://github.com/sponsors/Darginec05" | ||
target="_blank" | ||
title="Sponsor Yoopta-Editor" | ||
rel="noopener noreferrer" | ||
className="inline-flex md:mt-0 mt-2 ml-0 md:ml-2 items-center text-sm px-4 py-2 bg-[#e8279a] hover:bg-pink-700 focus:outline-none focus:ring-2 focus:ring-pink-500 focus:ring-offset-2 rounded-md shadow-md transition duration-150 ease-in-out hover:ring-2 hover:ring-primary hover:ring-offset-2" | ||
> | ||
<span className="mr-2"> | ||
<svg | ||
aria-hidden="true" | ||
height="16" | ||
viewBox="0 0 16 16" | ||
version="1.1" | ||
width="16" | ||
className="text-[#fff] fill-[#fff]" | ||
> | ||
<path d="m8 14.25.345.666a.75.75 0 0 1-.69 0l-.008-.004-.018-.01a7.152 7.152 0 0 1-.31-.17 22.055 22.055 0 0 1-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.066 22.066 0 0 1-3.744 2.584l-.018.01-.006.003h-.002ZM4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.58 20.58 0 0 0 8 13.393a20.58 20.58 0 0 0 3.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.749.749 0 0 1-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5Z"></path> | ||
</svg> | ||
</span> | ||
<span>Sponsor</span> | ||
</a> | ||
); | ||
}; |
49 changes: 46 additions & 3 deletions
49
web/next-example/src/components/landing/GithubSponsors/GithubSponsors.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,51 @@ | ||
export const GithubSponsors = () => { | ||
import { Sponsors } from '@/api/request'; | ||
import { PlusIcon } from 'lucide-react'; | ||
|
||
type Props = { | ||
sponsors: Sponsors; | ||
}; | ||
|
||
export const GithubSponsors = ({ sponsors }: Props) => { | ||
return ( | ||
<div> | ||
<h1>Github Sponsors</h1> | ||
<p>Support us on Github Sponsors</p> | ||
<h4 className="text-center mt-4 text-lg font-semibold">Sponsors 💖</h4> | ||
<div className="w-full flex-wrap flex justify-center py-2"> | ||
{sponsors.current.map((sponsor) => ( | ||
<a | ||
key={sponsor.username} | ||
href={`https://github.com/${sponsor.username}`} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className="flex items-center justify-center w-18 h-18 rounded-full shadow-lg m-2" | ||
> | ||
<img src={sponsor.avatar} alt={`${sponsor.username} avatar`} className="w-14 h-14 rounded-full" /> | ||
</a> | ||
))} | ||
</div> | ||
<div className="w-full flex-wrap flex justify-center"> | ||
{sponsors.past.map((sponsor) => ( | ||
<a | ||
key={sponsor.username} | ||
href={`https://github.com/${sponsor.username}`} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className="flex items-center justify-center w-18 h-18 rounded-full shadow-lg m-2" | ||
> | ||
<img src={sponsor.avatar} alt={`${sponsor.username} avatar`} className="w-14 h-14 rounded-full" /> | ||
</a> | ||
))} | ||
</div> | ||
<div className="w-full flex-wrap flex justify-center"> | ||
<a | ||
href="https://github.com/sponsors/Darginec05" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
title="Become sponsor" | ||
className="flex items-center justify-center w-18 h-18 bg-[#181c21] rounded-full shadow-lg m-2" | ||
> | ||
<PlusIcon size={30} color="#1f6feb" className="w-14 h-14 rounded-full animate-pulse" /> | ||
</a> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters