Skip to content

Commit 87aebc5

Browse files
Merge pull request #14 from su-its/feat/frontend/frame
Feat/frontend/frame
2 parents b60c7ed + 4facf51 commit 87aebc5

File tree

21 files changed

+192
-78
lines changed

21 files changed

+192
-78
lines changed

typing-app/bun.lockb

69.5 KB
Binary file not shown.

typing-app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"format:ci": "prettier . --check"
1212
},
1313
"dependencies": {
14+
"@chakra-ui/react": "^2.8.2",
1415
"@radix-ui/react-slot": "^1.0.2",
1516
"@radix-ui/react-toast": "^1.1.5",
1617
"class-variance-authority": "^0.7.0",

typing-app/src/app/(game)/typing/page.tsx

Lines changed: 0 additions & 3 deletions
This file was deleted.

typing-app/src/app/credit/page.tsx

Lines changed: 0 additions & 3 deletions
This file was deleted.

typing-app/src/app/game/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import GamePage from "@/components/pages/Game";
2+
3+
export default function Typing() {
4+
return <GamePage />;
5+
}

typing-app/src/app/globals.css

Lines changed: 11 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -2,75 +2,19 @@
22
@tailwind components;
33
@tailwind utilities;
44

5-
@layer base {
6-
:root {
7-
--background: 0 0% 100%;
8-
--foreground: 222.2 84% 4.9%;
9-
10-
--card: 0 0% 100%;
11-
--card-foreground: 222.2 84% 4.9%;
12-
13-
--popover: 0 0% 100%;
14-
--popover-foreground: 222.2 84% 4.9%;
15-
16-
--primary: 222.2 47.4% 11.2%;
17-
--primary-foreground: 210 40% 98%;
18-
19-
--secondary: 210 40% 96.1%;
20-
--secondary-foreground: 222.2 47.4% 11.2%;
21-
22-
--muted: 210 40% 96.1%;
23-
--muted-foreground: 215.4 16.3% 46.9%;
24-
25-
--accent: 210 40% 96.1%;
26-
--accent-foreground: 222.2 47.4% 11.2%;
27-
28-
--destructive: 0 84.2% 60.2%;
29-
--destructive-foreground: 210 40% 98%;
30-
31-
--border: 214.3 31.8% 91.4%;
32-
--input: 214.3 31.8% 91.4%;
33-
--ring: 222.2 84% 4.9%;
34-
35-
--radius: 0.5rem;
36-
}
37-
38-
.dark {
39-
--background: 222.2 84% 4.9%;
40-
--foreground: 210 40% 98%;
41-
42-
--card: 222.2 84% 4.9%;
43-
--card-foreground: 210 40% 98%;
44-
45-
--popover: 222.2 84% 4.9%;
46-
--popover-foreground: 210 40% 98%;
47-
48-
--primary: 210 40% 98%;
49-
--primary-foreground: 222.2 47.4% 11.2%;
50-
51-
--secondary: 217.2 32.6% 17.5%;
52-
--secondary-foreground: 210 40% 98%;
53-
54-
--muted: 217.2 32.6% 17.5%;
55-
--muted-foreground: 215 20.2% 65.1%;
56-
57-
--accent: 217.2 32.6% 17.5%;
58-
--accent-foreground: 210 40% 98%;
59-
60-
--destructive: 0 62.8% 30.6%;
61-
--destructive-foreground: 210 40% 98%;
5+
:root {
6+
--foreground-rgb: 255, 255, 255;
7+
--background-start-rgb: 0, 0, 0;
8+
--background-end-rgb: 0, 0, 0;
9+
}
6210

63-
--border: 217.2 32.6% 17.5%;
64-
--input: 217.2 32.6% 17.5%;
65-
--ring: 212.7 26.8% 83.9%;
66-
}
11+
body {
12+
color: rgb(var(--foreground-rgb));
13+
background: rgb(var(--background-start-rgb));
6714
}
6815

69-
@layer base {
70-
* {
71-
@apply border-border;
72-
}
73-
body {
74-
@apply bg-background text-foreground;
16+
@layer utilities {
17+
.text-balance {
18+
text-wrap: balance;
7519
}
7620
}

typing-app/src/app/layout.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import type { Metadata } from "next";
22
import { Inter } from "next/font/google";
3+
import Header from "../components/organism/Header";
4+
import Footer from "../components/organism/Footer";
35
import "./globals.css";
6+
import { Box, ChakraProvider } from "@chakra-ui/react";
47

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

710
export const metadata: Metadata = {
8-
title: "Create Next App",
9-
description: "Generated by create next app",
11+
title: "TypeMaster",
1012
};
1113

1214
export default function RootLayout({
@@ -16,7 +18,17 @@ export default function RootLayout({
1618
}>) {
1719
return (
1820
<html lang="en">
19-
<body className={inter.className}>{children}</body>
21+
<body className={inter.className}>
22+
<ChakraProvider>
23+
<Box minH="100vh" display="flex" flexDirection="column">
24+
<Header />
25+
<Box flex="1" bg="gray.100" py={2}>
26+
{children}
27+
</Box>
28+
<Footer />
29+
</Box>
30+
</ChakraProvider>
31+
</body>
2032
</html>
2133
);
2234
}

typing-app/src/app/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import HomePage from "@/components/pages/Home";
2+
13
export default function Home() {
2-
return <div>Home View</div>;
4+
return <HomePage />;
35
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import RankingPage from "@/components/pages/Ranking";
2+
13
export default function Ranking() {
2-
return <div>Ranking View</div>;
4+
return <RankingPage />;
35
}
55.8 KB
Loading

0 commit comments

Comments
 (0)