From de8add6d07de803d466c5b7491bc558081d89101 Mon Sep 17 00:00:00 2001 From: Emil Widlund Date: Thu, 16 Jan 2025 18:21:37 +0100 Subject: [PATCH] add mobile layout --- clients/apps/web/src/app/pitch/layout.tsx | 2 +- clients/apps/web/src/app/pitch/page.tsx | 4 ++-- .../apps/web/src/components/Pitch/Footer.tsx | 4 +++- .../web/src/components/Pitch/Navigation.tsx | 22 ++++++++++++++----- .../Pitch/sections/IndexSection.tsx | 4 ++-- .../Pitch/sections/InvestorsSection.tsx | 2 +- .../src/components/Pitch/sections/Polar20.tsx | 2 +- .../components/Pitch/sections/TeamSection.tsx | 2 +- .../Pitch/sections/UsageBasedSection.tsx | 2 +- .../components/Pitch/sections/WhySection.tsx | 2 +- 10 files changed, 29 insertions(+), 17 deletions(-) diff --git a/clients/apps/web/src/app/pitch/layout.tsx b/clients/apps/web/src/app/pitch/layout.tsx index f1ad519303..4e3827fed2 100644 --- a/clients/apps/web/src/app/pitch/layout.tsx +++ b/clients/apps/web/src/app/pitch/layout.tsx @@ -4,7 +4,7 @@ export default function PitchLayout({ children: React.ReactNode }) { return ( -
+
{children}
) diff --git a/clients/apps/web/src/app/pitch/page.tsx b/clients/apps/web/src/app/pitch/page.tsx index 7addd630cf..9963ca2343 100644 --- a/clients/apps/web/src/app/pitch/page.tsx +++ b/clients/apps/web/src/app/pitch/page.tsx @@ -45,8 +45,8 @@ export default function PitchPage() { return (
-
- +
+ { return ( -
+
diff --git a/clients/apps/web/src/components/Pitch/Navigation.tsx b/clients/apps/web/src/components/Pitch/Navigation.tsx index 75c59b8520..bbce74fb31 100644 --- a/clients/apps/web/src/components/Pitch/Navigation.tsx +++ b/clients/apps/web/src/components/Pitch/Navigation.tsx @@ -1,3 +1,5 @@ +import { twMerge } from 'tailwind-merge' + export const sections = [ { title: '00. Index', @@ -29,17 +31,25 @@ export const sections = [ }, ] -export const PitchNavigation = ({ activeIndex }: { activeIndex: number }) => { +export const PitchNavigation = ({ + activeIndex, + setIndex, +}: { + activeIndex: number + setIndex: (index: number) => void +}) => { return ( -
+
Polar Software Inc. -
    +
      {sections.map((section, index) => (
    • setIndex(index)} + className={twMerge( + 'hover:bg-polar-200 cursor-pointer px-1 hover:text-black', + index === activeIndex ? 'bg-polar-200 text-black' : '', + )} > {section.title}
    • diff --git a/clients/apps/web/src/components/Pitch/sections/IndexSection.tsx b/clients/apps/web/src/components/Pitch/sections/IndexSection.tsx index 71bb36c5f8..c897554b7e 100644 --- a/clients/apps/web/src/components/Pitch/sections/IndexSection.tsx +++ b/clients/apps/web/src/components/Pitch/sections/IndexSection.tsx @@ -3,7 +3,7 @@ import { Link } from '../Link' export const IndexSection = () => { return ( -
      +

      00. Index

      Integrating payments is a mess

      @@ -23,7 +23,7 @@ export const IndexSection = () => {
      diff --git a/clients/apps/web/src/components/Pitch/sections/InvestorsSection.tsx b/clients/apps/web/src/components/Pitch/sections/InvestorsSection.tsx index ea16d2ef7b..82a71e8018 100644 --- a/clients/apps/web/src/components/Pitch/sections/InvestorsSection.tsx +++ b/clients/apps/web/src/components/Pitch/sections/InvestorsSection.tsx @@ -2,7 +2,7 @@ import { Link } from '../Link' export const InvestorsSection = () => { return ( -
      +

      06. Investors

      Our Angels

      diff --git a/clients/apps/web/src/components/Pitch/sections/Polar20.tsx b/clients/apps/web/src/components/Pitch/sections/Polar20.tsx index a69b5d4678..4f282469b5 100644 --- a/clients/apps/web/src/components/Pitch/sections/Polar20.tsx +++ b/clients/apps/web/src/components/Pitch/sections/Polar20.tsx @@ -2,7 +2,7 @@ import { Link } from '../Link' export const Polar20Section = () => { return ( -
      +

      03. Polar 2.0

      The future of payments is usage based

      diff --git a/clients/apps/web/src/components/Pitch/sections/TeamSection.tsx b/clients/apps/web/src/components/Pitch/sections/TeamSection.tsx index 086a273e53..06add32b9f 100644 --- a/clients/apps/web/src/components/Pitch/sections/TeamSection.tsx +++ b/clients/apps/web/src/components/Pitch/sections/TeamSection.tsx @@ -21,7 +21,7 @@ const team = [ export const TeamSection = () => { return ( -
      +

      05. Team

      We are hiring

      diff --git a/clients/apps/web/src/components/Pitch/sections/UsageBasedSection.tsx b/clients/apps/web/src/components/Pitch/sections/UsageBasedSection.tsx index e23e4679c1..7c2ddc985b 100644 --- a/clients/apps/web/src/components/Pitch/sections/UsageBasedSection.tsx +++ b/clients/apps/web/src/components/Pitch/sections/UsageBasedSection.tsx @@ -4,7 +4,7 @@ import { Link } from '../Link' export const UsageBasedSection = () => { return ( -
      +

      01. Usage Based

      The future of payments is usage based

      diff --git a/clients/apps/web/src/components/Pitch/sections/WhySection.tsx b/clients/apps/web/src/components/Pitch/sections/WhySection.tsx index 131e21f60d..712ab0a841 100644 --- a/clients/apps/web/src/components/Pitch/sections/WhySection.tsx +++ b/clients/apps/web/src/components/Pitch/sections/WhySection.tsx @@ -2,7 +2,7 @@ import { Link } from '../Link' export const WhySection = () => { return ( -
      +

      02. Why Polar

      Why