organized asf
This commit is contained in:
52
components/Navbar.tsx
Normal file
52
components/Navbar.tsx
Normal file
@@ -0,0 +1,52 @@
|
||||
import Link from "next/link";
|
||||
import { IoMenu as MenuIcon, IoClose as CloseIcon } from "react-icons/io5";
|
||||
import { useState } from "react";
|
||||
|
||||
export const Navbar = () => {
|
||||
const [showMenu, setShowMenu] = useState(false);
|
||||
|
||||
return (
|
||||
<nav className="lg:p-4 p-2 lg:py-10 mx-10 flex flex-row justify-between">
|
||||
<Link href="/" id="logo" className="flex flex-row gap-2 items-end">
|
||||
<div className="text-action font-bold text-4xl font-mono">peroxy</div>
|
||||
<span className="text-secondary font-mono font-bold">dev</span>
|
||||
</Link>
|
||||
<div className="hidden lg:flex flex-row gap-10 items-center font-medium font-mono">
|
||||
<Link href="/blog">
|
||||
<button className="px-10 py-1 rounded-sm bg-primary hover:bg-primary/50 transition-all duration-150 ease-out">
|
||||
blog
|
||||
</button>
|
||||
</Link>
|
||||
<Link href="/pidhsome">
|
||||
<button className="px-10 py-1 rounded-sm bg-primary hover:bg-primary/50 transition-all duration-150 ease-out">
|
||||
projects
|
||||
</button>
|
||||
</Link>
|
||||
<Link href="/pidhsome">
|
||||
<button className="px-10 py-1 rounded-sm bg-primary hover:bg-primary/50 transition-all duration-150 ease-out">
|
||||
github
|
||||
</button>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="lg:hidden flex">
|
||||
<button onClick={() => setShowMenu(true)} className="text-2xl">
|
||||
<MenuIcon />
|
||||
</button>
|
||||
<div
|
||||
className={`absolute w-96 bg-blue-900
|
||||
top-0 px-10 py-6 h-screen ${showMenu ? "right-0" : "-right-full"}
|
||||
transition-all ease-in duration-200`}
|
||||
>
|
||||
<button onClick={() => setShowMenu(false)} className="text-2xl">
|
||||
<CloseIcon />
|
||||
</button>
|
||||
<div className="flex flex-col gap-10 mt-10 font-bold font-mono">
|
||||
<div>Link 1</div>
|
||||
<div>Link 1</div>
|
||||
<div>Link 1</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
);
|
||||
};
|
||||
11
layouts/MainLayout.tsx
Normal file
11
layouts/MainLayout.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { PropsWithChildren } from "react";
|
||||
import { Navbar } from "../components/Navbar";
|
||||
|
||||
export const MainLayout = ({ children }: PropsWithChildren) => {
|
||||
return (
|
||||
<div className="h-screen w-11/12 xl:w-2/3 mx-auto overflow-x-hidden">
|
||||
<Navbar />
|
||||
<main className="mx-10">{children}</main>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
2193
package-lock.json
generated
2193
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,7 @@
|
||||
"next": "13.0.6",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-icons": "^4.7.1",
|
||||
"typescript": "4.9.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
11
pages/blog/index.tsx
Normal file
11
pages/blog/index.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { MainLayout } from "../../layouts/MainLayout";
|
||||
|
||||
const Blog = () => {
|
||||
return (
|
||||
<MainLayout>
|
||||
<h1>Blog</h1>
|
||||
</MainLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Blog;
|
||||
@@ -1,34 +1,9 @@
|
||||
import Link from "next/link";
|
||||
|
||||
import { MainLayout } from "../layouts/MainLayout";
|
||||
export default function Home() {
|
||||
return (
|
||||
<div className="h-screen">
|
||||
<nav className="p-4 mx-10 flex flex-row justify-between">
|
||||
<div id="logo" className="flex flex-row gap-2 items-end">
|
||||
<div className="text-action font-bold text-4xl font-mono">peroxy</div>
|
||||
<span className="text-secondary font-mono font-bold">dev</span>
|
||||
</div>
|
||||
<div className="flex flex-row gap-10 items-center font-medium font-mono">
|
||||
<Link href="/pidhsome">
|
||||
<button className="px-10 py-1 rounded-sm bg-primary hover:bg-primary/50 transition-all duration-150 ease-out">
|
||||
link 1
|
||||
</button>
|
||||
</Link>
|
||||
<Link href="/pidhsome">
|
||||
<button className="px-10 py-1 rounded-sm bg-primary hover:bg-primary/50 transition-all duration-150 ease-out">
|
||||
link 2
|
||||
</button>
|
||||
</Link>
|
||||
<Link href="/pidhsome">
|
||||
<button className="px-10 py-1 rounded-sm bg-primary hover:bg-primary/50 transition-all duration-150 ease-out">
|
||||
link 3
|
||||
</button>
|
||||
</Link>
|
||||
</div>
|
||||
</nav>
|
||||
<main className="mx-10">
|
||||
<div className="grid grid-cols-2 xs:grid-cols-1 mt-20">
|
||||
<div className="bg-primary-dark p-10 rounded-lg flex flex-col justify-between h-96 w-2/3 xs:w-full text-lg text-primary-text/90">
|
||||
<MainLayout>
|
||||
<div className="grid lg:grid-cols-2 grid-cols-1 mt-20 gap-10">
|
||||
<div className="bg-primary-dark p-10 rounded-lg flex flex-col justify-between h-96 lg:w-2/3 w-full text-lg text-primary-text/90">
|
||||
<div>
|
||||
<span className="font-bold text-xl text-primary-text">
|
||||
Lorem ipsum dolor{" "}
|
||||
@@ -36,10 +11,9 @@ export default function Home() {
|
||||
sit amet consectetur adipisicing elit. Laboriosam ab quia quae
|
||||
reiciendis. Nostrum corrupti laboriosam quae vero repudiandae
|
||||
dolorem quos dolores laborum recusandae atque itaque illo autem
|
||||
neque odit, in soluta sit alias necessitatibus fugit veniam sunt
|
||||
at.
|
||||
neque odit, in soluta sit alias necessitatibus fugit veniam sunt at.
|
||||
</div>
|
||||
<button className="px-4 py-2 rounded-lg bg-primary hover:bg-primary/50 transition-all ease-out duration-150 font-bold w-fit">
|
||||
<button className="px-4 py-2 rounded-lg bg-primary hover:bg-primary/50 transition-all ease-out duration-150 font-bold w-fit text-white">
|
||||
Action
|
||||
</button>
|
||||
</div>
|
||||
@@ -47,7 +21,6 @@ export default function Home() {
|
||||
<div className="text-primary-dark m-auto w-fit">showcase</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</MainLayout>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ module.exports = {
|
||||
"./components/**/*.{js,ts,jsx,tsx}",
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
"gradient-dark": "#161926",
|
||||
"gradient-light": "#1b2034",
|
||||
@@ -14,6 +15,7 @@ module.exports = {
|
||||
secondary: "#FFE600",
|
||||
"primary-text": "#D9D9D9",
|
||||
},
|
||||
}
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
|
||||
@@ -553,6 +553,11 @@ react-dom@18.2.0:
|
||||
loose-envify "^1.1.0"
|
||||
scheduler "^0.23.0"
|
||||
|
||||
react-icons@^4.7.1:
|
||||
version "4.7.1"
|
||||
resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.7.1.tgz#0f4b25a5694e6972677cb189d2a72eabea7a8345"
|
||||
integrity sha512-yHd3oKGMgm7zxo3EA7H2n7vxSoiGmHk5t6Ou4bXsfcgWyhfDKMpyKfhHR6Bjnn63c+YXBLBPUql9H4wPJM6sXw==
|
||||
|
||||
react@18.2.0:
|
||||
version "18.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
|
||||
|
||||
Reference in New Issue
Block a user