From bc51e625b40e036361bd537fb067cb4d95687fdf Mon Sep 17 00:00:00 2001 From: Rei Date: Tue, 27 Dec 2022 17:33:00 +0100 Subject: [PATCH] dynamic markdown --- components/Navbar.tsx | 84 ++-- content/blogs/first-blog.md | 10 + content/blogs/second-blog.md | 10 + content/blogs/third-blog.md | 10 + layouts/MainLayout.tsx | 2 +- package.json | 5 + pages/blog/[slug].tsx | 64 +++ pages/blog/index.tsx | 60 ++- pages/index.tsx | 4 +- styles/globals.css | 2 +- tailwind.config.js | 2 +- types/types.d.ts | 13 + utils/markdown.ts | 47 +++ yarn.lock | 770 ++++++++++++++++++++++++++++++++++- 14 files changed, 1042 insertions(+), 41 deletions(-) create mode 100644 content/blogs/first-blog.md create mode 100644 content/blogs/second-blog.md create mode 100644 content/blogs/third-blog.md create mode 100644 pages/blog/[slug].tsx create mode 100644 types/types.d.ts create mode 100644 utils/markdown.ts diff --git a/components/Navbar.tsx b/components/Navbar.tsx index 06e0ca5..3722b31 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -1,51 +1,69 @@ import Link from "next/link"; import { IoMenu as MenuIcon, IoClose as CloseIcon } from "react-icons/io5"; import { useState } from "react"; +import { motion, AnimatePresence } from "framer-motion"; +const links = [ + { name: "blog", href: "/blog" }, + { name: "projects", href: "/projects" }, + { name: "github", href: "https://github.com/kookroach" }, +]; export const Navbar = () => { const [showMenu, setShowMenu] = useState(false); return ( -