Skip to content

Commit

Permalink
clients/landing: updated landing
Browse files Browse the repository at this point in the history
  • Loading branch information
emilwidlund committed Nov 7, 2024
1 parent 15cad53 commit c9eb146
Show file tree
Hide file tree
Showing 18 changed files with 170 additions and 289 deletions.
Binary file modified clients/apps/web/public/assets/landing/transactions_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default async function BlogPage() {
className="group flex h-full flex-col"
key={post.slug}
>
<Card className="flex h-full flex-col justify-between gap-y-6 overflow-hidden">
<Card className="flex h-full flex-col justify-between gap-y-6 overflow-hidden bg-gray-50">
<CardHeader className="p-6 pb-0">
{img ? (
<Image
Expand Down
2 changes: 1 addition & 1 deletion clients/apps/web/src/app/(main)/(landing)/(mdx)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return (
<div className="flex w-full max-w-[100vw] flex-col gap-x-16 gap-y-16 px-4 py-4 pb-24 pt-16 md:max-w-7xl md:flex-row md:items-start md:justify-between md:px-12 md:py-16">
<div className="flex w-full max-w-[100vw] flex-col gap-x-16 gap-y-16 px-4 py-4 pb-24 pt-16 md:max-w-7xl md:flex-row md:items-start md:justify-between md:px-12 md:py-24">
{children}
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion clients/apps/web/src/components/Benefit/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const resolveBenefitCategoryIcon = (
case BenefitType.ADS:
return <WebOutlined className={cn} fontSize={fontSize} />
case BenefitType.DISCORD:
return <DiscordIcon />
return <DiscordIcon className={cn} />
case BenefitType.GITHUB_REPOSITORY:
return <GitHub className={cn} fontSize={fontSize} />
case BenefitType.DOWNLOADABLES:
Expand Down
81 changes: 55 additions & 26 deletions clients/apps/web/src/components/Landing/API.tsx
Original file line number Diff line number Diff line change
@@ -1,38 +1,67 @@
'use client'

import { ArrowForward } from '@mui/icons-material'
import {
ArrowsRightLeftIcon,
CommandLineIcon,
CubeTransparentIcon,
} from '@heroicons/react/24/outline'
import { KeyboardArrowRight } from '@mui/icons-material'
import Link from 'next/link'
import Button from 'polarkit/components/ui/atoms/button'
import { Section } from './Section'
import { APIFirst } from './molecules/APIFirst'

export const API = () => {
return (
<Section
id="integrations"
className="flex flex-col items-center justify-center gap-y-24"
wrapperClassName="overflow-hidden"
>
<div className="flex flex-col items-center gap-y-12">
<div className="flex flex-col gap-y-4 text-center">
<span className="font-mono text-xs uppercase tracking-wider dark:text-yellow-400">
API & Developer First
</span>
<h3 className="text-2xl font-medium leading-snug md:text-3xl">
Powerful Custom Integrations
</h3>
<p className="dark:text-polar-200 h-full leading-relaxed text-gray-500">
Ship faster with our API, Webhooks, OAuth & SDKs.
</p>
</div>
<APIFirst />
<Link href={`/docs/api`}>
<Button size="lg">
<span>Explore the API</span>
<ArrowForward className="ml-2" fontSize="inherit" />
<div className="dark:bg-polar-950 rounded-4xl flex w-full flex-col gap-y-16 bg-gray-50 p-8 md:p-16 dark:md:bg-[radial-gradient(400px_at_top,rgba(20,20,25,1)_0%,rgba(7,7,9,1)_100%)]">
<div className="flex flex-col items-center gap-y-8">
<span className="dark:text-polar-500 text-lg text-gray-400">
Built for Developers
</span>
<h1 className="w-fit max-w-2xl text-pretty text-center text-2xl md:text-4xl md:leading-normal">
The fastest way to add SaaS & digital products to your stack
</h1>
<Link href="/docs/guides/nextjs">
<Button
fullWidth
wrapperClassNames="flex flex-row items-center gap-x-1"
variant="secondary"
>
<span>Integration Guide</span>
<KeyboardArrowRight className="text-lg" fontSize="inherit" />
</Button>
</Link>
</div>
</Section>
<div className="grid grid-cols-1 gap-8 md:grid-cols-3">
<div className="dark:bg-polar-900 flex w-full flex-col gap-y-4 rounded-3xl bg-gray-100 p-8">
<div className="flex flex-row items-center gap-x-3">
<CommandLineIcon className="h-5 w-5" />
<h1 className="text-xl">npx polar-init</h1>
</div>
<p className="dark:text-polar-400 text-gray-500">
Bootstrap products, subscriptions, checkouts & webhooks in your
Next.js or Nuxt.js project.
</p>
</div>
<div className="dark:bg-polar-900 flex w-full flex-col gap-y-4 rounded-3xl bg-gray-100 p-8">
<div className="flex flex-row items-center gap-x-3">
<CubeTransparentIcon className="h-5 w-5" />
<h1 className="text-xl">Sandbox</h1>
</div>
<p className="dark:text-polar-400 text-gray-500">
An isolated sandbox environment, so you can test your integration
without risk.
</p>
</div>
<div className="dark:bg-polar-900 flex w-full flex-col gap-y-4 rounded-3xl bg-gray-100 p-8">
<div className="flex flex-row items-center gap-x-3">
<ArrowsRightLeftIcon className="h-5 w-5" />
<h1 className="text-xl">Webhooks</h1>
</div>
<p className="dark:text-polar-400 text-gray-500">
Receive reliable webhooks for events, including payments,
subscriptions, and more.
</p>
</div>
</div>
</div>
)
}
2 changes: 1 addition & 1 deletion clients/apps/web/src/components/Landing/Benefits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const Benefits = () => {

<div className="flex h-full flex-col" ref={subscription}>
<SubscriptionTierCard
className="shadow-3xl h-full border-none"
className="shadow-3xl h-full"
subscriptionTier={MOCKED_WEBSITE_SUBSCRIPTION}
/>
</div>
Expand Down
83 changes: 0 additions & 83 deletions clients/apps/web/src/components/Landing/GetStarted.tsx

This file was deleted.

32 changes: 27 additions & 5 deletions clients/apps/web/src/components/Landing/Hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,49 @@ export const Hero = () => {
>
<Coins />
</Canvas>
<h1 className="max-w-2xl text-pretty text-3xl !leading-tight text-gray-950 md:text-6xl dark:text-white">
<h1 className="max-w-2xl text-pretty text-4xl !leading-tight text-gray-950 md:text-6xl dark:text-white">
Sell SaaS and digital products{' '}
<span className="dark:text-polar-500 text-gray-500">in minutes</span>
<span className="dark:text-polar-500 text-gray-400">in minutes</span>
</h1>
<div className="flex flex-row items-center gap-x-4">
<div
className="dark:bg-polar-800 dark:border-polar-700 shadow-3xl flex flex-row items-center gap-x-2 rounded-full border bg-gray-50 py-2 pl-6 pr-2"
className="dark:bg-polar-800 dark:border-polar-700 shadow-3xl hidden flex-row items-center gap-x-2 rounded-full border bg-gray-50 py-2 pl-6 pr-2 md:flex"
role="form"
>
<div className="flex flex-row items-center gap-x-0.5">
<span className="md:text-xl">polar.sh/</span>
<input
autoFocus={!isPhone}
className="w-44 border-none border-transparent bg-transparent p-0 placeholder:text-gray-300 focus:border-transparent focus:ring-0 md:text-xl"
placeholder="my-store"
className="dark:placeholder:text-polar-500 w-44 border-none border-transparent bg-transparent p-0 placeholder:text-gray-300 focus:border-transparent focus:ring-0 md:text-xl"
placeholder="my-app"
value={slug}
onChange={(e) => setSlug(slugify(e.target.value))}
/>
</div>
<GetStartedButton orgSlug={slug} size="lg" text="Get Started" />
</div>

<div className="flex flex-col gap-y-2 md:hidden">
<div
className="dark:bg-polar-800 dark:border-polar-700 shadow-3xl flex flex-row items-center rounded-full border bg-gray-50 px-4 py-2"
role="form"
>
<span className="md:text-xl">polar.sh/</span>
<input
autoFocus={!isPhone}
className="dark:placeholder:text-polar-500 w-44 border-none border-transparent bg-transparent p-0 placeholder:text-gray-300 focus:border-transparent focus:ring-0 md:text-xl"
placeholder="my-app"
value={slug}
onChange={(e) => setSlug(slugify(e.target.value))}
/>
</div>
<GetStartedButton
fullWidth
orgSlug={slug}
size="lg"
text="Get Started"
/>
</div>
</div>
</div>
)
Expand Down
6 changes: 3 additions & 3 deletions clients/apps/web/src/components/Landing/LandingLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { useModal } from '../Modal/useModal'

export default function Layout({ children }: PropsWithChildren) {
return (
<div className="flex w-full flex-col items-center bg-gray-100 dark:bg-black dark:bg-[radial-gradient(800px_at_top,rgba(20,20,25,1)_0%,rgba(0,0,0,1)_100%)]">
<div className="relative flex w-full flex-col items-center bg-gray-100 dark:bg-black dark:bg-[radial-gradient(800px_at_top,rgba(20,20,25,1)_0%,rgba(0,0,0,1)_100%)]">
<LandingPageTopbar />
{children}
<LandingPageFooter />
Expand All @@ -31,7 +31,7 @@ const LandingPageTopbar = () => {
}

return (
<div className="dark:bg-polar-800 shadow-3xl sticky top-6 z-30 flex w-full max-w-2xl flex-row items-center justify-between rounded-3xl bg-gray-50 px-8 py-4">
<div className="dark:bg-polar-800 shadow-3xl fixed inset-x-4 top-6 z-30 flex flex-row items-center justify-between rounded-3xl bg-gray-50 px-8 py-4 md:sticky md:inset-x-0 md:w-full md:max-w-2xl">
<TopbarNavigation />
<BrandingMenu
className="mt-1 hidden md:block"
Expand All @@ -41,7 +41,7 @@ const LandingPageTopbar = () => {
<BrandingMenu
className="ml-2 mt-1 md:hidden"
logoVariant="logotype"
size={100}
size={70}
/>
<div className="flex flex-row items-center gap-x-4">
<Button onClick={onLoginClick} variant="secondary">
Expand Down
64 changes: 5 additions & 59 deletions clients/apps/web/src/components/Landing/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@ import { Hero } from '@/components/Landing/Hero/Hero'
import { MerchantOfRecord } from '@/components/Landing/MOR'
import { Monetization } from '@/components/Landing/Monetization'
import { Testimonials } from '@/components/Landing/Testimonials'
import {
ArrowsRightLeftIcon,
CommandLineIcon,
CubeTransparentIcon,
} from '@heroicons/react/24/outline'
import { API } from './API'
import { Benefits } from './Benefits'
import { GetStarted } from './GetStarted'
import { Pricing } from './Pricing'
import { Section } from './Section'

export default function Page() {
return (
<div className="flex w-full flex-col items-center">
<div className="flex w-full flex-col items-center pt-32 md:pt-0">
<PageContent />
</div>
)
Expand All @@ -26,55 +20,11 @@ export const PageContent = () => {
<>
<Section className="flex flex-col gap-y-36">
<Hero />

<div className="dark:bg-polar-950 rounded-4xl flex w-full flex-col gap-y-12 bg-gray-50 p-8 md:p-16 dark:bg-[radial-gradient(400px_at_top,rgba(20,20,25,1)_0%,rgba(7,7,9,1)_100%)]">
<div className="flex flex-col items-center gap-y-6">
<span className="shadow-3xl dark:border-polar-800 dark:bg-polar-700 flex w-fit flex-row items-baseline gap-x-2 rounded-xl bg-white px-4 py-2 font-mono dark:border">
<span>$</span>
<span>npx polar-init</span>
</span>
<h1 className="w-fit max-w-xl text-pretty text-center text-2xl md:text-4xl md:leading-normal">
The fastest way to setup SaaS & digital products
</h1>
</div>
<div className="grid grid-cols-1 gap-8 md:grid-cols-3">
<div className="dark:bg-polar-900 flex w-full flex-col gap-y-4 rounded-3xl bg-gray-100 p-8">
<div className="flex flex-row items-center gap-x-3">
<CommandLineIcon className="h-5 w-5" />
<h1 className="text-xl">npx polar-init</h1>
</div>
<p className="dark:text-polar-400 text-gray-600">
Bootstrap products, subscriptions & checkouts in your Next.js or
Nuxt.js project.
</p>
</div>
<div className="dark:bg-polar-900 flex w-full flex-col gap-y-4 rounded-3xl bg-gray-100 p-8">
<div className="flex flex-row items-center gap-x-3">
<CubeTransparentIcon className="h-5 w-5" />
<h1 className="text-xl">Sandbox</h1>
</div>
<p className="dark:text-polar-400 text-gray-600">
Defaults to our sandbox environment, so you can test your
integration without risk
</p>
</div>
<div className="dark:bg-polar-900 flex w-full flex-col gap-y-4 rounded-3xl bg-gray-100 p-8">
<div className="flex flex-row items-center gap-x-3">
<ArrowsRightLeftIcon className="h-5 w-5" />
<h1 className="text-xl">Webhooks</h1>
</div>
<p className="dark:text-polar-400 text-gray-600">
Receive webhooks for all events, including payments,
subscriptions, and more.
</p>
</div>
</div>
</div>

<API />
<Benefits />

<div className="flex flex-col gap-y-12">
<h1 className="text-2xl tracking-tight md:text-5xl md:leading-tight">
<h1 className="text-4xl tracking-tight md:text-5xl md:leading-tight">
Polar as Merchant of Record.{' '}
<span className="dark:text-polar-500 text-gray-400">
Leave all tax & VAT headaches to us. Focus on your passion, while
Expand All @@ -85,13 +35,9 @@ export const PageContent = () => {

<MerchantOfRecord />
<Monetization />
<GetStarted />
<Pricing />
<Testimonials />
</Section>

<Pricing />
<API />

<Testimonials />
</>
)
}
Loading

0 comments on commit c9eb146

Please sign in to comment.