mirror of
https://github.com/tymur999/braintok.git
synced 2025-08-05 16:20:37 +00:00
initial page done
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root {
|
:root {
|
||||||
--background: #0a0a0a;
|
--background: #030303;
|
||||||
--foreground: #ededed;
|
--foreground: #ededed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
22
src/app/landing/page.tsx
Normal file
22
src/app/landing/page.tsx
Normal 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>
|
||||||
|
)
|
||||||
|
}
|
@@ -1,23 +1,16 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import localFont from "next/font/local";
|
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
|
import { Raleway } from "next/font/google";
|
||||||
const geistSans = localFont({
|
import mindmap from "../img/mindmap.svg";
|
||||||
src: "./fonts/GeistVF.woff",
|
import Image from "next/image";
|
||||||
variable: "--font-geist-sans",
|
|
||||||
weight: "100 900",
|
|
||||||
});
|
|
||||||
const geistMono = localFont({
|
|
||||||
src: "./fonts/GeistMonoVF.woff",
|
|
||||||
variable: "--font-geist-mono",
|
|
||||||
weight: "100 900",
|
|
||||||
});
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "Create Next App",
|
title: "Create Next App",
|
||||||
description: "Generated by create next app",
|
description: "Generated by create next app",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const raleway_heavy = Raleway({subsets: ["latin"], weight: "700"});
|
||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
children,
|
children,
|
||||||
}: Readonly<{
|
}: Readonly<{
|
||||||
@@ -25,11 +18,17 @@ export default function RootLayout({
|
|||||||
}>) {
|
}>) {
|
||||||
return (
|
return (
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<body
|
<body
|
||||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
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}
|
{children}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import {Raleway} from "next/font/google";
|
import {Raleway} from "next/font/google";
|
||||||
import {TokenForm} from "@/app/components/token_form";
|
import {TokenForm} from "@/app/components/token_form";
|
||||||
|
import { redirect } from 'next/navigation';
|
||||||
|
|
||||||
const raleway = Raleway({subsets: ["latin"]});
|
const raleway = Raleway({subsets: ["latin"]});
|
||||||
const raleway_heavy = Raleway({subsets: ["latin"], weight: "700"});
|
|
||||||
|
|
||||||
export interface Message {
|
export interface Message {
|
||||||
message: string;
|
message: string;
|
||||||
@@ -12,18 +12,17 @@ export default async function Home() {
|
|||||||
async function call(_prevState: Message, data: FormData): Promise<Message> {
|
async function call(_prevState: Message, data: FormData): Promise<Message> {
|
||||||
"use server"
|
"use server"
|
||||||
console.log(data.get("canvas"));
|
console.log(data.get("canvas"));
|
||||||
return {
|
const error = {
|
||||||
message: "Hello"
|
message: ""
|
||||||
}
|
};
|
||||||
|
if(!error.message)
|
||||||
|
redirect("/landing");
|
||||||
|
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className={raleway.className + " flex flex-col w-full h-[100vh]"}>
|
<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">
|
<div className="flex flex-col mx-auto flex-grow justify-center">
|
||||||
<TokenForm call={call}/>
|
<TokenForm call={call}/>
|
||||||
</div>
|
</div>
|
||||||
|
BIN
src/img/arrow.png
Normal file
BIN
src/img/arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
BIN
src/img/gradient.png
Normal file
BIN
src/img/gradient.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 741 KiB |
5327
src/img/mindmap.svg
Normal file
5327
src/img/mindmap.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 390 KiB |
Reference in New Issue
Block a user