Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: home page (desktop) #33

Merged
merged 4 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added apps/academy/public/D_D_NFT_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion apps/academy/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const sampleMenus: NavItem[] = [
const PageHeader: FunctionComponent = () => {
// return <Header {...links} />;
return (
<header className="main-container flex items-center justify-between py-10">
<header className="main-container absolute left-0 right-0 top-0 z-50 flex items-center justify-between py-10">
<TopBar menus={sampleMenus} />
<ConnectButton />
</header>
Expand Down
2 changes: 1 addition & 1 deletion apps/academy/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class MyDocument extends Document {
<link rel="manifest" href="/manifest.json" />
<link rel="shortcut icon" href="/favicon.ico" />
</Head>
<body className="bg-neutral-50 dark:bg-neutral-900">
<body className="var(--academy-bg-dark)">
<Main />
<NextScript />
</body>
Expand Down
45 changes: 25 additions & 20 deletions apps/academy/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,42 @@
import type { ReactElement } from "react";
import { Icons, LearnWeb3Banner, PartnerBanner } from "ui";

import PageSeoLayout from "@/components/PageSeoLayout";
import type { NextPageWithLayout } from "@/pages/_app";
import { api } from "@/utils/api";

const Home: NextPageWithLayout = () => {
const {
data: ExampleHelloData,
isLoading: ExampleHelloIsLoading,
// refetch: ExampleHelloRefetch,
} = api.example.hello.useQuery({
text: "Hello World",
});

console.log({ ExampleHelloData, ExampleHelloIsLoading });

return (
<main className="main-container pb-8 pt-16 sm:pt-24">
<h1 className="mx-auto text-center text-6xl font-extrabold text-neutral-900 dark:text-white sm:text-7xl lg:text-8xl">
Website SSR
<span className="block bg-gradient-to-r from-red-500 to-blue-500 bg-clip-text py-8 text-transparent">
Turbo Monorepo
</span>
</h1>
<main>
<div className="academy-grid">
<div className="academy-grid-col-1">
<div className="text-bttf-lg">
<h1>learn</h1>
<h1>web3 __</h1>
<h1>with</h1>
<h1>frens</h1>
</div>
<div className="description max-w-lg">
<p>Become a web3 developer with DeveloperDAO.</p>
</div>
<div className="flex w-full items-center justify-center">
<Icons.scroll className="h-16 w-16" />
</div>
</div>
<div className="dd-nft" />
</div>
<div className="main-container space-y-16 py-16">
<LearnWeb3Banner href="" />
<PartnerBanner href="" imgSrc="" />
</div>
</main>
);
};

Home.getLayout = function getLayout(page: ReactElement) {
return (
<PageSeoLayout
title="Dapp Page" // DEV_NOTE: This is for the next-seo per page config
description="A page for your dapp." // DEV_NOTE: This is for the next-seo per page config
title="Developer DAO Academy" // DEV_NOTE: This is for the next-seo per page config
description="Become a web3 developer with DeveloperDAO." // DEV_NOTE: This is for the next-seo per page config
>
{page}
</PageSeoLayout>
Expand Down
14 changes: 9 additions & 5 deletions apps/academy/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,28 @@
@tailwind utilities;

.text-bttf {
@apply text-center text-lg leading-[91%] tracking-[1px] transition-colors;
@apply leading-[91%] tracking-[1px] transition-colors;
font-family: var(--font-future);
}

.academy-grid {
@apply grid h-screen grid-cols-1 text-white md:grid-cols-2;
@apply mx-auto grid h-screen max-h-[1024px] max-w-screen-2xl grid-cols-1 text-white md:grid-cols-2;
}

.academy-grid .academy-grid-col-1 {
@apply flex flex-col items-center justify-between px-4 py-6 text-center;
@apply my-auto space-y-12 lg:pt-24;
}

.academy-grid .text-bttf-lg {
@apply text-bttf mb-12 mt-10 h-full uppercase;
@apply text-bttf mb-16 text-center text-6xl lg:text-8xl;
}

.academy-grid .academy-grid-col-1 .description {
@apply mx-auto text-center text-2xl font-light;
}

.dd-nft {
@apply relative py-6 pr-6;
@apply relative hidden py-6 pr-6 md:flex md:justify-end;
background:
linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%),
url("/D_D_NFT_image.png"),
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/Banners/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { LearnWeb3Banner } from "./LearnWeb3Banner";
export { PartnerBanner } from "./PartnerBanner";
4 changes: 2 additions & 2 deletions packages/ui/src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const socials: readonly SocialLinks[] = [

export const Footer = () => {
return (
<footer>
<div className="footer main-container">
<footer className="main-container">
<div className="footer">
<nav aria-label="social">
{socials.map((social) => {
const Icon = Icons[social.icon];
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from "./Banners";
export * from "./Button";
export * from "./Cards";
export * from "./Container";
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
}

.main-container {
@apply container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8;
@apply container mx-auto max-w-7xl;
}

.gradient-blur {
Expand Down Expand Up @@ -200,7 +200,7 @@
}

.banner {
@apply gradient-blur m-2 flex min-h-[500px] w-full items-center justify-between rounded-[51px];
@apply gradient-blur flex min-h-[500px] w-full items-center justify-between rounded-[51px];
@apply max-w-screen-2xl gap-6 border-none border-[var(--gray-white)] p-2 shadow-sm md:p-4 lg:p-7;
}

Expand Down