From facafe09971ab95cff479aed2a8d0567f11cd693 Mon Sep 17 00:00:00 2001 From: Ephraim Atta-Duncan Date: Thu, 21 Mar 2024 01:39:14 +0000 Subject: [PATCH] feat: place card titles in the box --- .../src/app/(marketing)/open/bar-metrics.tsx | 15 +++++---- .../src/app/(marketing)/open/cap-table.tsx | 10 +++--- .../app/(marketing)/open/funding-raised.tsx | 11 ++++--- .../monthly-completed-documents-chart.tsx | 11 +++---- .../open/monthly-new-users-chart.tsx | 11 +++---- .../open/monthly-total-users-chart.tsx | 11 +++---- .../src/app/(marketing)/open/page.tsx | 31 ++++++++++--------- .../open/total-signed-documents-chart.tsx | 11 +++---- .../src/app/(marketing)/open/typefully.tsx | 11 ++++--- .../src/components/(marketing)/callout.tsx | 2 +- .../src/components/(marketing)/hero.tsx | 2 +- 11 files changed, 62 insertions(+), 64 deletions(-) diff --git a/apps/marketing/src/app/(marketing)/open/bar-metrics.tsx b/apps/marketing/src/app/(marketing)/open/bar-metrics.tsx index 940adb8fc..fb9c61f11 100644 --- a/apps/marketing/src/app/(marketing)/open/bar-metrics.tsx +++ b/apps/marketing/src/app/(marketing)/open/bar-metrics.tsx @@ -1,11 +1,10 @@ 'use client'; -import { HTMLAttributes } from 'react'; +import type { HTMLAttributes } from 'react'; import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts'; import { formatMonth } from '@documenso/lib/client-only/format-month'; -import { cn } from '@documenso/ui/lib/utils'; export type BarMetricProps> = HTMLAttributes & { data: T; @@ -34,13 +33,13 @@ export const BarMetric = -
-

{title}

- {extraInfo} -
+
+
+
+

{title}

+ {extraInfo} +
-
diff --git a/apps/marketing/src/app/(marketing)/open/cap-table.tsx b/apps/marketing/src/app/(marketing)/open/cap-table.tsx index ba6a12dc4..05c122aa5 100644 --- a/apps/marketing/src/app/(marketing)/open/cap-table.tsx +++ b/apps/marketing/src/app/(marketing)/open/cap-table.tsx @@ -5,8 +5,6 @@ import { useEffect, useState } from 'react'; import { Cell, Legend, Pie, PieChart, Tooltip } from 'recharts'; -import { cn } from '@documenso/ui/lib/utils'; - import { CAP_TABLE } from './data'; const COLORS = ['#7fd843', '#a2e771', '#c6f2a4']; @@ -49,10 +47,12 @@ export const CapTable = ({ className, ...props }: CapTableProps) => { setIsSSR(false); }, []); return ( -
-

Cap Table

+
+
+
+

Cap Table

+
-
{!isSSR && ( & { data: Record[]; @@ -18,10 +17,12 @@ export const FundingRaised = ({ className, data, ...props }: FundingRaisedProps) })); return ( -
-

Total Funding Raised

+
+
+
+

Total Funding Raised

+
-
diff --git a/apps/marketing/src/app/(marketing)/open/monthly-completed-documents-chart.tsx b/apps/marketing/src/app/(marketing)/open/monthly-completed-documents-chart.tsx index 77059f80a..9626838ed 100644 --- a/apps/marketing/src/app/(marketing)/open/monthly-completed-documents-chart.tsx +++ b/apps/marketing/src/app/(marketing)/open/monthly-completed-documents-chart.tsx @@ -4,7 +4,6 @@ import { DateTime } from 'luxon'; import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts'; import type { GetUserMonthlyGrowthResult } from '@documenso/lib/server-only/user/get-user-monthly-growth'; -import { cn } from '@documenso/ui/lib/utils'; export type MonthlyCompletedDocumentsChartProps = { className?: string; @@ -23,12 +22,12 @@ export const MonthlyCompletedDocumentsChart = ({ }); return ( -
-
-

Completed Documents per Month

-
+
+
+
+

Completed Documents per Month

+
-
diff --git a/apps/marketing/src/app/(marketing)/open/monthly-new-users-chart.tsx b/apps/marketing/src/app/(marketing)/open/monthly-new-users-chart.tsx index 0df73e30c..fe7941336 100644 --- a/apps/marketing/src/app/(marketing)/open/monthly-new-users-chart.tsx +++ b/apps/marketing/src/app/(marketing)/open/monthly-new-users-chart.tsx @@ -4,7 +4,6 @@ import { DateTime } from 'luxon'; import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts'; import type { GetUserMonthlyGrowthResult } from '@documenso/lib/server-only/user/get-user-monthly-growth'; -import { cn } from '@documenso/ui/lib/utils'; export type MonthlyNewUsersChartProps = { className?: string; @@ -20,12 +19,12 @@ export const MonthlyNewUsersChart = ({ className, data }: MonthlyNewUsersChartPr }); return ( -
-
-

New Users

-
+
+
+
+

New Users

+
-
diff --git a/apps/marketing/src/app/(marketing)/open/monthly-total-users-chart.tsx b/apps/marketing/src/app/(marketing)/open/monthly-total-users-chart.tsx index 96ce34556..6ab5572ec 100644 --- a/apps/marketing/src/app/(marketing)/open/monthly-total-users-chart.tsx +++ b/apps/marketing/src/app/(marketing)/open/monthly-total-users-chart.tsx @@ -4,7 +4,6 @@ import { DateTime } from 'luxon'; import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts'; import type { GetUserMonthlyGrowthResult } from '@documenso/lib/server-only/user/get-user-monthly-growth'; -import { cn } from '@documenso/ui/lib/utils'; export type MonthlyTotalUsersChartProps = { className?: string; @@ -20,12 +19,12 @@ export const MonthlyTotalUsersChart = ({ className, data }: MonthlyTotalUsersCha }); return ( -
-
-

Total Users

-
+
+
+
+

Total Users

+
-
diff --git a/apps/marketing/src/app/(marketing)/open/page.tsx b/apps/marketing/src/app/(marketing)/open/page.tsx index ea7ffda14..31990519e 100644 --- a/apps/marketing/src/app/(marketing)/open/page.tsx +++ b/apps/marketing/src/app/(marketing)/open/page.tsx @@ -11,6 +11,7 @@ import { CallToAction } from '~/components/(marketing)/call-to-action'; import { BarMetric } from './bar-metrics'; import { CapTable } from './cap-table'; import { FundingRaised } from './funding-raised'; +import { MetricCard } from './metric-card'; import { MonthlyCompletedDocumentsChart } from './monthly-completed-documents-chart'; import { MonthlyNewUsersChart } from './monthly-new-users-chart'; import { MonthlyTotalUsersChart } from './monthly-total-users-chart'; @@ -128,17 +129,17 @@ const fetchEarlyAdopters = async () => { export default async function OpenPage() { const [ - // { forks_count: forksCount, stargazers_count: stargazersCount }, - // { total_count: openIssues }, - // { total_count: mergedPullRequests }, + { forks_count: forksCount, stargazers_count: stargazersCount }, + { total_count: openIssues }, + { total_count: mergedPullRequests }, STARGAZERS_DATA, EARLY_ADOPTERS_DATA, MONTHLY_USERS, MONTHLY_COMPLETED_DOCUMENTS, ] = await Promise.all([ - // fetchGithubStats(), - // fetchOpenIssues(), - // fetchMergedPullRequests(), + fetchGithubStats(), + fetchOpenIssues(), + fetchMergedPullRequests(), fetchStargazers(), fetchEarlyAdopters(), getUserMonthlyGrowth(), @@ -166,7 +167,7 @@ export default async function OpenPage() {
- {/*
+
-
*/} +
@@ -206,7 +207,7 @@ export default async function OpenPage() { data={STARGAZERS_DATA} metricKey="stars" - title="Github: Total Stars" + title="GitHub: Total Stars" label="Stars" className="col-span-12 lg:col-span-6" /> @@ -214,27 +215,27 @@ export default async function OpenPage() { data={STARGAZERS_DATA} metricKey="mergedPRs" - title="Github: Total Merged PRs" + title="GitHub: Total Merged PRs" label="Merged PRs" - chartHeight={300} + chartHeight={400} className="col-span-12 lg:col-span-6" /> data={STARGAZERS_DATA} metricKey="forks" - title="Github: Total Forks" + title="GitHub: Total Forks" label="Forks" - chartHeight={300} + chartHeight={400} className="col-span-12 lg:col-span-6" /> data={STARGAZERS_DATA} metricKey="openIssues" - title="Github: Total Open Issues" + title="GitHub: Total Open Issues" label="Open Issues" - chartHeight={300} + chartHeight={400} className="col-span-12 lg:col-span-6" /> diff --git a/apps/marketing/src/app/(marketing)/open/total-signed-documents-chart.tsx b/apps/marketing/src/app/(marketing)/open/total-signed-documents-chart.tsx index 239d15de9..c2b7561de 100644 --- a/apps/marketing/src/app/(marketing)/open/total-signed-documents-chart.tsx +++ b/apps/marketing/src/app/(marketing)/open/total-signed-documents-chart.tsx @@ -4,7 +4,6 @@ import { DateTime } from 'luxon'; import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts'; import type { GetUserMonthlyGrowthResult } from '@documenso/lib/server-only/user/get-user-monthly-growth'; -import { cn } from '@documenso/ui/lib/utils'; export type TotalSignedDocumentsChartProps = { className?: string; @@ -20,12 +19,12 @@ export const TotalSignedDocumentsChart = ({ className, data }: TotalSignedDocume }); return ( -
-
-

Total Signed Documents

-
+
+
+
+

Total Signed Documents

+
-
diff --git a/apps/marketing/src/app/(marketing)/open/typefully.tsx b/apps/marketing/src/app/(marketing)/open/typefully.tsx index a233904db..4f298fbb3 100644 --- a/apps/marketing/src/app/(marketing)/open/typefully.tsx +++ b/apps/marketing/src/app/(marketing)/open/typefully.tsx @@ -6,18 +6,19 @@ import Link from 'next/link'; import { FaXTwitter } from 'react-icons/fa6'; -import { cn } from '@documenso/ui/lib/utils'; import { Button } from '@documenso/ui/primitives/button'; export type TypefullyProps = HTMLAttributes; export const Typefully = ({ className, ...props }: TypefullyProps) => { return ( -
-

Twitter Stats

+
+
+
+

Twitter Stats

+
-
-
+

Documenso on X

diff --git a/apps/marketing/src/components/(marketing)/callout.tsx b/apps/marketing/src/components/(marketing)/callout.tsx index faa486c46..dfd358c71 100644 --- a/apps/marketing/src/components/(marketing)/callout.tsx +++ b/apps/marketing/src/components/(marketing)/callout.tsx @@ -53,7 +53,7 @@ export const Callout = ({ starCount }: CalloutProps) => { >