From ce891e760cf4d810d87e126d989ed358c5468be0 Mon Sep 17 00:00:00 2001
From: Quinta <0pietroquintavalle0@gmail.com>
Date: Wed, 19 Jun 2024 22:42:25 +0200
Subject: [PATCH] Moving stuff
---
.idea/vcs.xml | 1 -
app/layout.tsx | 168 +++++---------------------------------
app/page.tsx | 99 +---------------------
components/footer.tsx | 72 ++++++++++++++++
components/navigation.tsx | 42 ++++++++++
5 files changed, 136 insertions(+), 246 deletions(-)
create mode 100644 components/footer.tsx
create mode 100644 components/navigation.tsx
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 0c04d00..35eb1dd 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -2,6 +2,5 @@
-
\ No newline at end of file
diff --git a/app/layout.tsx b/app/layout.tsx
index 132f9fb..f82b1ed 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,153 +1,25 @@
-import { useState, useEffect } from "react"
-import Link from "next/link"
-import JavaText from "./java_tutorial.json"
-import { JSX, SVGProps } from "react"
+import { Work_Sans } from 'next/font/google'
+import './globals.css'
+import Navigation from '@/components/navigation';
+import Footer from '@/components/footer';
+const work_sans = Work_Sans({
+ subsets: ['latin'],
+ display: 'swap',
+ variable: '--font-work_sans',
+})
+
+// @ts-ignore
export default function Layout({ children }) {
- const JavaContent = JavaText
- const [showButton, setShowButton] = useState(false)
+ return (
+
- useEffect(() => {
- const handleScroll = () => {
- if (window.scrollY > 300) {
- setShowButton(true)
- } else {
- setShowButton(false)
- }
- }
+
+
+ {children}
+
+
- window.addEventListener("scroll", handleScroll)
-
- return () => {
- window.removeEventListener("scroll", handleScroll)
- }
- }, [])
-
- const scrollToTop = () => {
- window.scrollTo({
- top: 0,
- behavior: "smooth"
- })
- }
-
- return (
-
-
-
-
- {children}
-
- {showButton && (
-
- )}
-
-
- )
-}
-
-function CodeIcon(props: JSX.IntrinsicAttributes & SVGProps) {
- return (
-
- )
-}
-
-function GitHubIcon(props: JSX.IntrinsicAttributes & SVGProps) {
- return (
-
- )
-}
-
-function GmailIcon(props: JSX.IntrinsicAttributes & SVGProps) {
- return (
-
- )
-}
-
-function LinkedInIcon(props: JSX.IntrinsicAttributes & SVGProps) {
- return (
-
- )
+
+ )
}
diff --git a/app/page.tsx b/app/page.tsx
index a87de39..96e0a08 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -2,7 +2,6 @@
import { useState, useEffect } from "react"
import Link from "next/link"
import JavaText from "./java_tutorial.json"
-import { JSX, SVGProps } from "react"
export default function Component() {
const JavaContent = JavaText
@@ -38,21 +37,7 @@ export default function Component() {
scroll-behavior: smooth;
}
`}
-
+
{JavaContent.sections.map((section, index) => (
)}
-
+
)
}
-function CodeIcon(props: JSX.IntrinsicAttributes & SVGProps) {
- return (
-
- )
-}
-
-function GitHubIcon(props: JSX.IntrinsicAttributes & SVGProps) {
- return (
-
- )
-}
-
-function GmailIcon(props: JSX.IntrinsicAttributes & SVGProps) {
- return (
-
- )
-}
-
-function LinkedInIcon(props: JSX.IntrinsicAttributes & SVGProps) {
- return (
-
- )
-}
diff --git a/components/footer.tsx b/components/footer.tsx
new file mode 100644
index 0000000..e8fe284
--- /dev/null
+++ b/components/footer.tsx
@@ -0,0 +1,72 @@
+import {JSX, SVGProps} from "react";
+
+export default function Footer() {
+ return (
+
+ )
+}
+
+
+
+function GitHubIcon(props: JSX.IntrinsicAttributes & SVGProps) {
+ return (
+
+ )
+}
+
+function GmailIcon(props: JSX.IntrinsicAttributes & SVGProps) {
+ return (
+
+ )
+}
+
+function LinkedInIcon(props: JSX.IntrinsicAttributes & SVGProps) {
+ return (
+
+ )
+}
diff --git a/components/navigation.tsx b/components/navigation.tsx
new file mode 100644
index 0000000..dd85ccf
--- /dev/null
+++ b/components/navigation.tsx
@@ -0,0 +1,42 @@
+import Link from "next/link";
+import JavaContent from "../app/java_tutorial.json";
+import {JSX, SVGProps} from "react";
+export default function Navigation() {
+ return (
+
+ )
+}
+
+function CodeIcon(props: JSX.IntrinsicAttributes & SVGProps) {
+ return (
+
+ )
+}
\ No newline at end of file