Skip to content

Commit

Permalink
🚀 worxpace 1 - Create landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
steeeee0223 committed Jan 23, 2024
1 parent e8ede8a commit ddd6f37
Show file tree
Hide file tree
Showing 32 changed files with 1,256 additions and 37 deletions.
Binary file added apps/worxpace/public/documents-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/worxpace/public/documents.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/worxpace/public/empty-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/worxpace/public/empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/worxpace/public/error-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/worxpace/public/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/worxpace/public/next.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions apps/worxpace/public/notion-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions apps/worxpace/public/notion.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/worxpace/public/reading-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/worxpace/public/reading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/worxpace/public/vercel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions apps/worxpace/src/app/(marketing)/_components/footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { Button } from "@acme/ui/components";
import { cn } from "@acme/ui/lib";

import { theme } from "~/constants/theme";
import Logo from "./logo";

export default function Footer() {
return (
<div
className={cn(
theme.flex.center,
theme.background.navbar,
"z-50 w-full p-6",
)}
>
<Logo />
<div
className={cn(
theme.flex.gap2,
"w-full justify-between text-muted-foreground md:ml-auto md:justify-end",
)}
>
<Button variant="ghost" size="sm">
Privacy Policy
</Button>
<Button variant="ghost" size="sm">
Terms & Conditions
</Button>
</div>
</div>
);
}
28 changes: 28 additions & 0 deletions apps/worxpace/src/app/(marketing)/_components/heading.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"use client";

import { ArrowRight } from "lucide-react";

import { Button } from "@acme/ui/components";

import { theme } from "~/constants/theme";

const Heading = () => {
return (
<div className="max-w-3xl space-y-4">
<h1 className="text-3xl font-bold sm:text-5xl md:text-6xl">
Your Ideas , Documents, & Plans. Unified. Welcome to{" "}
<span className="underline">Steeeee WorXpace</span>
</h1>
<h3 className="text-base font-medium sm:text-xl md:text-2xl">
Steeeee WorXpace is the connected workspace where <br />
better, faster work happens.
</h3>

<Button>
Get Started <ArrowRight className={`${theme.size.icon} ml-2`} />
</Button>
</div>
);
};

export default Heading;
42 changes: 42 additions & 0 deletions apps/worxpace/src/app/(marketing)/_components/heroes.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import Image from "next/image";

import { cn } from "@acme/ui/lib";

import { theme } from "~/constants/theme";

export default function Heroes() {
return (
<div className={cn(theme.flex.center, "max-w-5xl flex-col justify-center")}>
<div className={theme.flex.center}>
<div className="relative h-[300px] w-[300px] sm:h-[350px] sm:w-[350px] md:h-[400px] md:w-[400px] ">
<Image
src="/documents.png"
fill
className="object-contain dark:hidden"
alt="Documents"
/>
<Image
src="/documents-dark.png"
fill
className="hidden object-contain dark:block"
alt="Documents"
/>
</div>
<div className="relative hidden h-[400px] w-[400px] md:block">
<Image
src="/reading.png"
fill
className="object-contain dark:hidden"
alt="Reading"
/>
<Image
src="/reading-dark.png"
fill
className="hidden object-contain dark:block"
alt="Reading"
/>
</div>
</div>
</div>
);
}
4 changes: 4 additions & 0 deletions apps/worxpace/src/app/(marketing)/_components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { default as Heading } from "./heading";
export { default as Heroes } from "./heroes";
export { default as Footer } from "./footer";
export { default as Navbar } from "./navbar";
31 changes: 31 additions & 0 deletions apps/worxpace/src/app/(marketing)/_components/logo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { Poppins } from "next/font/google";
import Image from "next/image";

import { cn } from "@acme/ui/lib";

const font = Poppins({
subsets: ["latin"],
weight: ["400", "600"],
});

export default function Logo() {
return (
<div className="hidden md:flex items-center gap-x-2">
<Image
className="dark:hidden"
src="/notion.svg"
height="40"
width="40"
alt="Logo"
/>
<Image
className="hidden dark:block"
src="/notion-dark.svg"
height="40"
width="40"
alt="Logo"
/>
<p className={cn("font-semibold", font.className)}>WorXpace</p>
</div>
);
}
33 changes: 33 additions & 0 deletions apps/worxpace/src/app/(marketing)/_components/navbar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"use client";

import { ThemeToggle } from "@acme/ui/components";
import { useScrollTop } from "@acme/ui/hooks";
import { cn } from "@acme/ui/lib";

import { theme } from "~/constants/theme";
import Logo from "./logo";

export default function Navbar() {
const scrolled = useScrollTop();

return (
<div
className={cn(
theme.background.navbar,
theme.flex.center,
"fixed top-0 z-50 w-full p-6",
scrolled && "border-b shadow-sm",
)}
>
<Logo />
<div
className={cn(
theme.flex.gap2,
"w-full justify-between md:ml-auto md:justify-end",
)}
>
<ThemeToggle />
</div>
</div>
);
}
12 changes: 12 additions & 0 deletions apps/worxpace/src/app/(marketing)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { PropsWithChildren } from "react";

import { Navbar } from "./_components";

export default function MarketingLayout({ children }: PropsWithChildren) {
return (
<div className="h-full dark:bg-[#1F1F1F]">
<Navbar />
<main className="h-full pt-40">{children}</main>
</div>
);
}
15 changes: 15 additions & 0 deletions apps/worxpace/src/app/(marketing)/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Footer, Heading, Heroes } from "./_components";

const Marketing = () => {
return (
<div className="min-h-full flex flex-col dark:bg-[#1F1F1F]">
<div className="flex flex-col items-center justify-center md:justify-start text-center gap-y-8 flex-1 px-6 pb-10">
<Heading />
<Heroes />
</div>
<Footer />
</div>
);
};

export default Marketing;
6 changes: 6 additions & 0 deletions apps/worxpace/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
@tailwind components;
@tailwind utilities;

html,
body,
:root {
height: 100%;
}

@layer base {
:root {
--background: 0 0% 100%;
Expand Down
58 changes: 36 additions & 22 deletions apps/worxpace/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
import type { Metadata, Viewport } from "next";
import { Inter } from "next/font/google";

import { cn } from "@acme/ui/lib";
import { ThemeProvider } from "@acme/ui/components";

import { env } from "~/env";

import "~/app/globals.css";

const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
metadataBase: new URL(
env.VERCEL_ENV === "production"
? "https://turbo.t3.gg"
: "http://localhost:3000",
? "https://worxpace.steeeee0223.vercel.app"
: `http://localhost:${env.PORT}`,
),
title: "Create T3 Turbo",
description: "Simple monorepo with shared backend for web & mobile apps",
openGraph: {
title: "Create T3 Turbo",
description: "Simple monorepo with shared backend for web & mobile apps",
url: "https://create-t3-turbo.vercel.app",
siteName: "Create T3 Turbo",
},
twitter: {
card: "summary_large_image",
site: "@jullerino",
creator: "@jullerino",
title: "Steeeee WorXpace",
description: "The all-in-1 workspace where better, faster work happens",
icons: {
icon: [
{
media: "(prefers-color-scheme: light)",
url: "/notion.svg",
href: "/notion.svg",
},
{
media: "(prefers-color-scheme: dark)",
url: "/notion-dark.svg",
href: "/notion-dark.svg",
},
],
},
};

Expand All @@ -34,15 +40,23 @@ export const viewport: Viewport = {
],
};

export default function RootLayout(props: { children: React.ReactNode }) {
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en" suppressHydrationWarning>
<body
className={cn(
"min-h-screen bg-background font-sans text-foreground antialiased",
)}
>
{props.children}
<body className={inter.className}>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
storageKey="notion-key-2"
>
{children}
</ThemeProvider>
</body>
</html>
);
Expand Down
13 changes: 0 additions & 13 deletions apps/worxpace/src/app/page.tsx

This file was deleted.

Loading

0 comments on commit ddd6f37

Please sign in to comment.