diff --git a/app/_app.tsx b/app/_app.tsx
new file mode 100644
index 0000000..a2c2de9
--- /dev/null
+++ b/app/_app.tsx
@@ -0,0 +1,16 @@
+import { AppProps } from 'next/app'
+import Head from 'next/head'
+import '../globals.css'
+
+function MyApp({ Component, pageProps }: AppProps) {
+ return (
+ <>
+
+
+
+
+ >
+ )
+}
+
+export default MyApp
diff --git a/app/editor.tsx b/app/editor.tsx
deleted file mode 100644
index 64c0b8c..0000000
--- a/app/editor.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import Layout from "./layout"
-import CodeEditor from "../components/codeeditor"
-
-export default function JavaCodeEditor() {
- return (
-
-
-
- )
-}
diff --git a/app/editor/page.tsx b/app/editor/page.tsx
new file mode 100644
index 0000000..ba53751
--- /dev/null
+++ b/app/editor/page.tsx
@@ -0,0 +1,7 @@
+import CodeEditor from "../../components/codeeditor"
+
+export default function JavaCodeEditor() {
+ return (
+
+ )
+}
diff --git a/app/globals.css b/app/globals.css
index 8b663d5..45357ed 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -72,5 +72,7 @@
}
body {
@apply bg-background text-foreground;
+ margin: 0;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}
}
\ No newline at end of file
diff --git a/app/layout.tsx b/app/layout.tsx
index f82b1ed..e836e92 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,25 +1,59 @@
-import { Work_Sans } from 'next/font/google'
-import './globals.css'
-import Navigation from '@/components/navigation';
-import Footer from '@/components/footer';
+"use client";
+import { useState, useEffect } from "react"
+import Navigation from "../components/navigation"
+import Footer from "../components/footer"
+import "./globals.css"
-const work_sans = Work_Sans({
- subsets: ['latin'],
- display: 'swap',
- variable: '--font-work_sans',
-})
+export default function RootLayout({ children }: { children: React.ReactNode }) {
+ const [showButton, setShowButton] = useState(false)
+
+ useEffect(() => {
+ const handleScroll = () => {
+ if (window.scrollY > 300) {
+ setShowButton(true)
+ } else {
+ setShowButton(false)
+ }
+ }
+
+ window.addEventListener("scroll", handleScroll)
+
+ return () => {
+ window.removeEventListener("scroll", handleScroll)
+ }
+ }, [])
+
+ const scrollToTop = () => {
+ window.scrollTo({
+ top: 0,
+ behavior: "smooth"
+ })
+ }
-// @ts-ignore
-export default function Layout({ children }) {
return (
-
-
-
+
+
+
+
+
+
{children}
-
-
-
+
+ {showButton && (
+
+ )}
+
+
)
}
diff --git a/app/page.tsx b/app/page.tsx
index 891cd47..a3c9573 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -1,78 +1,31 @@
-"use client"
-import { useState, useEffect } from "react"
-import Link from "next/link"
import JavaText from "./java_tutorial.json"
-export default function Component() {
+export default function MainPage() {
const JavaContent = JavaText
- const [showButton, setShowButton] = useState(false)
-
- useEffect(() => {
- const handleScroll = () => {
- if (window.scrollY > 300) {
- setShowButton(true)
- } else {
- setShowButton(false)
- }
- }
-
- window.addEventListener("scroll", handleScroll)
-
- return () => {
- window.removeEventListener("scroll", handleScroll)
- }
- }, [])
-
- const scrollToTop = () => {
- window.scrollTo({
- top: 0,
- behavior: "smooth"
- })
- }
-
return (
-
-
-
-
- {JavaContent.sections.map((section, index) => (
-
-
-
{section.title}
-
{section.description}
-
- {section.items.map((item, itemIndex) => (
-
-
{item.title}
-
{item.description}
-
-
{item.explanation}
+ <>
+ {JavaContent.sections.map((section, index) => (
+
+
+
{section.title}
+
{section.description}
+
+ {section.items.map((item, itemIndex) => (
+
+
{item.title}
+
{item.description}
+
- ))}
-
+
{item.explanation}
+
+ ))}
-
- ))}
-
- {showButton && (
-
- )}
-
-
+
+
+ ))}
+ >
)
}
-