parent
d847eb0685
commit
f1f56408d5
2 changed files with 94 additions and 29 deletions
@ -1,13 +1,102 @@ |
|||||||
--- |
--- |
||||||
|
import { ChevronUp } from 'lucide-react'; |
||||||
|
import Icon from './AstroIcon.astro'; |
||||||
export interface Props { |
export interface Props { |
||||||
value: string; |
value: string; |
||||||
text: string; |
text: string; |
||||||
} |
} |
||||||
|
|
||||||
const { value, text } = Astro.props; |
const { value, text } = Astro.props; |
||||||
|
|
||||||
|
const isGitHubStars = text.toLowerCase() === 'github stars'; |
||||||
|
const isRegistered = text.toLowerCase() === 'registered users'; |
||||||
|
const isDiscordMembers = text.toLowerCase() === 'discord members'; |
||||||
--- |
--- |
||||||
|
|
||||||
<div class='flex flex-row sm:flex-col items-center justify-start sm:justify-center gap-2 sm:gap-1'> |
<div |
||||||
<p class='text-base w-[50px] sm:w-auto font-bold lowercase sm:text-5xl'>{value}</p> |
class='flex flex-row items-center justify-start sm:flex-col sm:justify-center' |
||||||
<p class='text-base leading-relaxed text-gray-500 sm:text-base'>{text}</p> |
> |
||||||
|
{ |
||||||
|
isGitHubStars && ( |
||||||
|
<p class='flex items-center text-sm text-blue-500'> |
||||||
|
<span class='rounded-md bg-blue-500 px-1 text-white'>Rank 6th</span> |
||||||
|
out of 28m! |
||||||
|
</p> |
||||||
|
) |
||||||
|
} |
||||||
|
|
||||||
|
{ |
||||||
|
isRegistered && ( |
||||||
|
<p class='flex items-center text-sm text-blue-500'> |
||||||
|
<span class='mr-1.5 rounded-md bg-blue-500 px-1 text-white'>+55k</span> |
||||||
|
every month |
||||||
|
</p> |
||||||
|
) |
||||||
|
} |
||||||
|
|
||||||
|
{ |
||||||
|
isDiscordMembers && ( |
||||||
|
<p class='flex items-center text-sm text-blue-500'> |
||||||
|
<span class='mr-1.5 rounded-md bg-blue-500 px-1 text-white'>+1.5k</span> |
||||||
|
every month |
||||||
|
</p> |
||||||
|
) |
||||||
|
} |
||||||
|
<p |
||||||
|
class='relative my-4 w-[50px] text-base font-bold lowercase sm:w-auto sm:text-5xl' |
||||||
|
> |
||||||
|
{value} |
||||||
|
</p> |
||||||
|
<p class="text-xs -mt-3 mb-5 tracking-wide text-gray-500">{text}</p> |
||||||
|
{ |
||||||
|
isGitHubStars && ( |
||||||
|
<a |
||||||
|
href='https://github.com/kamranahmedse/developer-roadmap' |
||||||
|
target='_blank' |
||||||
|
class='group mt-0 flex flex-col items-center rounded-lg border border-black bg-white px-3 py-2 text-sm hover:bg-black hover:text-white' |
||||||
|
> |
||||||
|
<div class='mb-0.5 flex items-center font-semibold'> |
||||||
|
<Icon icon='star' class='-ml-1 fill-current' /> |
||||||
|
<span class='ml-1.5 hover:block'>Star us on GitHub</span> |
||||||
|
</div> |
||||||
|
<span class='text-xs text-gray-500 group-hover:text-gray-100'> |
||||||
|
Help us reach #1 |
||||||
|
</span> |
||||||
|
</a> |
||||||
|
) |
||||||
|
} |
||||||
|
{ |
||||||
|
isRegistered && ( |
||||||
|
<a |
||||||
|
href='/signup' |
||||||
|
target='_blank' |
||||||
|
class='group mt-0 flex flex-col items-center rounded-lg border border-black bg-white px-3 py-2 text-sm hover:bg-black hover:text-white' |
||||||
|
> |
||||||
|
<div class='mb-0.5 flex items-center font-semibold'> |
||||||
|
<Icon icon='users' class='-ml-1 fill-current h-[15px]' /> |
||||||
|
<span class='ml-1 hover:block'>Register yourself</span> |
||||||
|
</div> |
||||||
|
<span class='text-xs text-gray-500 group-hover:text-gray-100'> |
||||||
|
Commit to your growth |
||||||
|
</span> |
||||||
|
</a> |
||||||
|
) |
||||||
|
} |
||||||
|
{ |
||||||
|
isDiscordMembers && ( |
||||||
|
<a |
||||||
|
href='/signup' |
||||||
|
target='_blank' |
||||||
|
class='group mt-0 flex flex-col items-center rounded-lg border border-black bg-white px-3 py-2 text-sm hover:bg-black hover:text-white' |
||||||
|
> |
||||||
|
<div class='mb-0.5 flex items-center font-semibold'> |
||||||
|
<Icon icon='discord' class='-ml-1 fill-current h-[13px]' /> |
||||||
|
<span class='ml-1 hover:block'>Join on Discord</span> |
||||||
|
</div> |
||||||
|
<span class='text-xs text-gray-500 group-hover:text-gray-100'> |
||||||
|
Join the community |
||||||
|
</span> |
||||||
|
</a> |
||||||
|
) |
||||||
|
} |
||||||
</div> |
</div> |
||||||
|
Loading…
Reference in new issue