diff --git a/public/images/gifs/party-popper.gif b/public/images/gifs/party-popper.gif new file mode 100644 index 000000000..a95fe2e4f Binary files /dev/null and b/public/images/gifs/party-popper.gif differ diff --git a/public/images/rocket.gif b/public/images/gifs/rocket.gif similarity index 100% rename from public/images/rocket.gif rename to public/images/gifs/rocket.gif diff --git a/public/images/gifs/star.gif b/public/images/gifs/star.gif new file mode 100644 index 000000000..8ba6cd590 Binary files /dev/null and b/public/images/gifs/star.gif differ diff --git a/public/images/gifs/starstruck.gif b/public/images/gifs/starstruck.gif new file mode 100644 index 000000000..53878edc7 Binary files /dev/null and b/public/images/gifs/starstruck.gif differ diff --git a/public/images/gifs/sunglasses.gif b/public/images/gifs/sunglasses.gif new file mode 100644 index 000000000..092280cb6 Binary files /dev/null and b/public/images/gifs/sunglasses.gif differ diff --git a/src/api/leaderboard.ts b/src/api/leaderboard.ts index 09d4c0bc6..1ba6131c6 100644 --- a/src/api/leaderboard.ts +++ b/src/api/leaderboard.ts @@ -17,6 +17,9 @@ export type ListLeaderboardStatsResponse = { currentMonth: LeadeboardUserDetails[]; lifetime: LeadeboardUserDetails[]; }; + githubContributors: { + currentMonth: LeadeboardUserDetails[]; + }; }; export function leaderboardApi(context: APIContext) { diff --git a/src/components/Changelog/ChangelogLaunch.astro b/src/components/Changelog/ChangelogLaunch.astro index e4c39c3de..84ae93840 100644 --- a/src/components/Changelog/ChangelogLaunch.astro +++ b/src/components/Changelog/ChangelogLaunch.astro @@ -23,7 +23,7 @@ const formattedDate = DateTime.fromISO('2024-09-13').toFormat('dd LLL, yyyy');
- +

Changelog page is launched

We will be sharing a selected list of updates, improvements, and fixes made to diff --git a/src/components/ChangelogBanner.astro b/src/components/ChangelogBanner.astro index af2cd1b64..c6a8d25a8 100644 --- a/src/components/ChangelogBanner.astro +++ b/src/components/ChangelogBanner.astro @@ -10,7 +10,7 @@ const top10Changelogs = allChangelogs.slice(0, 10);

diff --git a/src/components/Leaderboard/LeaderboardPage.tsx b/src/components/Leaderboard/LeaderboardPage.tsx index 9c7e6e1d5..ba0da269e 100644 --- a/src/components/Leaderboard/LeaderboardPage.tsx +++ b/src/components/Leaderboard/LeaderboardPage.tsx @@ -1,11 +1,10 @@ -import { useState, type ReactNode } from 'react'; +import { type ReactNode, useState } from 'react'; import type { LeadeboardUserDetails, ListLeaderboardStatsResponse, } from '../../api/leaderboard'; import { cn } from '../../lib/classname'; -import { FolderKanban, Zap, Trophy } from 'lucide-react'; -import { RankBadgeIcon } from '../ReactIcons/RankBadgeIcon'; +import { FolderKanban, GitPullRequest, Trophy, Zap } from 'lucide-react'; import { TrophyEmoji } from '../ReactIcons/TrophyEmoji'; import { SecondPlaceMedalEmoji } from '../ReactIcons/SecondPlaceMedalEmoji'; import { ThirdPlaceMedalEmoji } from '../ReactIcons/ThirdPlaceMedalEmoji'; @@ -19,17 +18,25 @@ export function LeaderboardPage(props: LeaderboardPageProps) { return (

-
+
-
- -

Leaderboard

+
+ party-popper +
+

+ Leaderboard +

+

+ Top users based on their activity on roadmap.sh +

+
-

- Top users based on their activity on roadmap.sh -

-
+
+ + ), + emptyText: 'No contributors this month', + }, + ]} + />
@@ -88,8 +108,8 @@ function LeaderboardLane(props: LeaderboardLaneProps) { const { users: usersToShow, emptyIcon, emptyText } = activeTab; return ( -
-
+
+

{title}

{tabs.length > 1 && ( @@ -118,7 +138,7 @@ function LeaderboardLane(props: LeaderboardLaneProps) {
{usersToShow.length === 0 && emptyText && ( -
+
{emptyIcon}

{emptyText}

@@ -128,19 +148,23 @@ function LeaderboardLane(props: LeaderboardLaneProps) {
    {usersToShow.map((user, counter) => { const avatar = user?.avatar - ? `${import.meta.env.PUBLIC_AVATAR_BASE_URL}/${user.avatar}` + ? user?.avatar?.startsWith('http') + ? user?.avatar + : `${import.meta.env.PUBLIC_AVATAR_BASE_URL}/${user.avatar}` : '/images/default-avatar.png'; + const rank = counter + 1; + const isGitHubUser = avatar?.indexOf('github') > -1; return (
  • 3, @@ -153,9 +177,19 @@ function LeaderboardLane(props: LeaderboardLaneProps) { {user.name} - {user.name} + {isGitHubUser ? ( + + {user.name} + + ) : ( + {user.name} + )} {rank === 1 ? ( ) : rank === 2 ? ( @@ -167,7 +201,17 @@ function LeaderboardLane(props: LeaderboardLaneProps) { )}
    - {user.count} + {isGitHubUser ? ( + + {user.count} + + ) : ( + {user.count} + )}
  • ); })}