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: created fundamentals page ( desktop optimized ) #32

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
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 Academy re-do.fig
Binary file not shown.
Binary file added apps/academy/public/eth_fam.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/academy/public/fundamental-bg.jpeg
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 @@ -6,7 +6,7 @@ import { ConnectButton } from "@/components/ConnectButton";
const sampleMenus: NavItem[] = [
{
name: "Fundamentals",
href: "/",
href: "/fundamentals",
icon: "clarity_blocks",
},
{
Expand Down
Binary file added apps/academy/src/font/BTTF.ttf
Binary file not shown.
37 changes: 37 additions & 0 deletions apps/academy/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import merge from "lodash.merge";
import type { NextPage } from "next";
import type { AppProps } from "next/app";
import Head from "next/head";
import { useRouter } from "next/router";
import type { Session } from "next-auth";
import { SessionProvider } from "next-auth/react";
import { DefaultSeo } from "next-seo";
Expand Down Expand Up @@ -100,8 +101,44 @@ type AppPropsWithLayout<P> = AppProps<P> & {
};

function MyApp({ Component, pageProps }: AppPropsWithLayout<{ session: Session | null }>) {
const router = useRouter();
const getLayout = Component.getLayout ?? ((page) => page);

// If the current route is '/fundamentals', don't use the Layout
if (router.pathname === "/fundamentals") {
return (
<WagmiConfig config={wagmiConfig}>
<SessionProvider refetchInterval={0} session={pageProps.session}>
<RainbowKitSiweNextAuthProvider>
<RainbowKitProvider
chains={chains}
initialChain={polygonMumbai}
appInfo={{
appName: "Developer DAO Academy",
learnMoreUrl: "https://academy.developerdao.com",
}}
theme={{
lightMode: academyLightTheme,
darkMode: academyDarkTheme,
}}
>
<ThemeProvider attribute="class">
<DefaultSeo {...SEO} />
<Head>
<meta
name="viewport"
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no, viewport-fit=cover"
/>
</Head>
<Component {...pageProps} />
</ThemeProvider>
</RainbowKitProvider>
</RainbowKitSiweNextAuthProvider>
</SessionProvider>
</WagmiConfig>
);
}
Markkos89 marked this conversation as resolved.
Show resolved Hide resolved

return (
<WagmiConfig config={wagmiConfig}>
<SessionProvider refetchInterval={0} session={pageProps.session}>
Expand Down
62 changes: 62 additions & 0 deletions apps/academy/src/pages/fundamentals.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import type { FC } from "react";
import React from "react";
import { type NavItem, TopBar, TrackCard } from "ui";

import { ConnectButton } from "@/components/ConnectButton";

const sampleMenus: NavItem[] = [
{
name: "Fundamentals",
href: "/fundamentals",
icon: "clarity_blocks",
},
{
name: "Tracks",
href: "/",
icon: "vector",
},
{
name: "Community",
href: "/",
icon: "dd_logo",
},
];

const Fundamentals: FC = () => {
const trackCards = Array.from({ length: 10 }).map(() => ({
imgSrc: "/eth_fam.png",
}));

return (
<div className="flex h-screen w-full flex-col bg-black lg:flex-row">
<div className="flex h-full min-h-screen flex-1 flex-col items-center justify-between bg-[url('/fundamental-bg.jpeg')] bg-cover bg-no-repeat object-center lg:fixed lg:inset-y-0 lg:w-1/2">
<div className="mt-10">
<TopBar menus={sampleMenus} />
Markkos89 marked this conversation as resolved.
Show resolved Hide resolved
</div>
<div>
<h2 className="text-bttf text-5xl text-white">Fundamentals</h2>
</div>
<div>
<p className="text-3xl font-bold text-white">Nail the basics and then take on a track.</p>
</div>
<div />
</div>
<div className="lg:fixed lg:right-0 lg:top-0 lg:h-screen lg:w-1/2">
<div className="flex max-h-screen w-full flex-1 flex-col space-y-10 overflow-y-scroll bg-black px-8">
<div className="mt-10 flex h-fit w-full justify-end">
<ConnectButton />
</div>
<div className="flex w-full justify-center px-8">
<div className="grid w-fit grid-cols-1 justify-center gap-x-10 gap-y-8 pb-8 xl:grid-cols-2">
{trackCards.map((trackCard, index) => (
<TrackCard key={index} imgSrc={trackCard.imgSrc} />
))}
</div>
</div>
</div>
</div>
</div>
);
};

export default Fundamentals;
15 changes: 14 additions & 1 deletion apps/academy/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,21 @@
@tailwind components;
@tailwind utilities;

@font-face {
font-family: "BTTF";
font-style: normal;
src: url("./font/BTTF.ttf") format("truetype");
font-display: swap;
}

@layer base {
:root {
--font-future: "BTTF", "Poppins", sans;
}
}

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

Expand Down