initial page done

This commit is contained in:
tymur999
2024-10-19 14:26:06 -04:00
committed by Mark Goltsman
parent 8dcd3feea7
commit ec35a72ade
7 changed files with 5373 additions and 26 deletions

View File

@@ -9,7 +9,7 @@
@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--background: #030303;
--foreground: #ededed;
}
}

22
src/app/landing/page.tsx Normal file
View File

@@ -0,0 +1,22 @@
"use client"
import arrow from "../../img/arrow.png";
import gradient from "../../img/gradient.png";
import Image from "next/image";
export default function Landing() {
return (
<div className="flex-grow flex flex-col">
<div className="my-auto">
<div className="text-5xl text-center font-bold">
Swipe to start grinding
</div>
<Image className="mx-auto mt-10" width={65} alt="arrow" src={arrow} />
</div>
<Image className="absolute bottom-0 z-[-999] w-full h-[200px] opacity-60"
alt=""
width={window.innerWidth}
src={gradient}/>
</div>
)
}

View File

@@ -1,23 +1,16 @@
import type { Metadata } from "next";
import localFont from "next/font/local";
import "./globals.css";
const geistSans = localFont({
src: "./fonts/GeistVF.woff",
variable: "--font-geist-sans",
weight: "100 900",
});
const geistMono = localFont({
src: "./fonts/GeistMonoVF.woff",
variable: "--font-geist-mono",
weight: "100 900",
});
import { Raleway } from "next/font/google";
import mindmap from "../img/mindmap.svg";
import Image from "next/image";
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
};
const raleway_heavy = Raleway({subsets: ["latin"], weight: "700"});
export default function RootLayout({
children,
}: Readonly<{
@@ -25,11 +18,17 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<body
className="antialiased h-[100vh] flex flex-col"
>
<div className="flex w-100 p-5 text-5xl text-center flex-shrink py-6">
<Image className="mr-auto" alt="mindmap" width={45} src={mindmap}/>
<h1 className={raleway_heavy.className + " top-[20px] absolute left-[50%] translate-x-[-50%]"}>
logo
</h1>
</div>
{children}
</body>
</body>
</html>
);
}

View File

@@ -1,8 +1,8 @@
import {Raleway} from "next/font/google";
import {TokenForm} from "@/app/components/token_form";
import { redirect } from 'next/navigation';
const raleway = Raleway({subsets: ["latin"]});
const raleway_heavy = Raleway({subsets: ["latin"], weight: "700"});
export interface Message {
message: string;
@@ -12,18 +12,17 @@ export default async function Home() {
async function call(_prevState: Message, data: FormData): Promise<Message> {
"use server"
console.log(data.get("canvas"));
return {
message: "Hello"
}
const error = {
message: ""
};
if(!error.message)
redirect("/landing");
return error;
}
return (
<main className={raleway.className + " flex flex-col w-full h-[100vh]"}>
<div className="d-flex w-100 p-5 text-3xl text-center flex-shrink">
<h1 className={raleway_heavy.className}>
logo
</h1>
</div>
<div className="flex flex-col mx-auto flex-grow justify-center">
<TokenForm call={call}/>
</div>

BIN
src/img/arrow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
src/img/gradient.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 KiB

5327
src/img/mindmap.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 390 KiB