diff --git a/components/quick-links.tsx b/components/quick-links.tsx index 71cf15d..df951bc 100644 --- a/components/quick-links.tsx +++ b/components/quick-links.tsx @@ -2,23 +2,23 @@ import Link from 'next/link'; import Pages from '../public/external.json'; function QuickLinks() { - return ( -
- { - Object.entries(Pages).map(([title, link], i) => { - const extern = link.match(/^http/) && `blue extern` || ''; - return ( - - {title} - - ); - }) - } -
- ); + return ( +
+ { + Object.entries(Pages).map(([title, link]) => { + const extern = link.match(/^http/) && `blue extern` || ''; + return ( + + {title} + + ); + }) + } +
+ ); } export default QuickLinks; diff --git a/components/recent-notes.tsx b/components/recent-notes.tsx index 26b09b4..b61a2e1 100644 --- a/components/recent-notes.tsx +++ b/components/recent-notes.tsx @@ -22,7 +22,7 @@ function RecentNotes() { {notes?.slice(0, 5) .map(({slug, title, mtime}) => { return ( -
  • +
  • {title}
  • ); diff --git a/components/recent-posts.tsx b/components/recent-posts.tsx index 9f8a9b3..f070840 100644 --- a/components/recent-posts.tsx +++ b/components/recent-posts.tsx @@ -4,47 +4,47 @@ import style from '../styles/recent-posts.module.css'; import PostsInfo from '../public/posts.json'; function PostBlock({ slug, otime, title }: { slug: string, otime: string, title: string }) { - return ( -
    - - {toRelativeDate(new Date(otime))} - -
    - - {title} - -
    -
    - ); + return ( +
    + + {toRelativeDate(new Date(otime))} + +
    + + {title} + +
    +
    + ); } function RecentPosts() { - const posts = Object.entries(PostsInfo).reverse(); - if (!posts.length) - return <>; - return ( -
    -

    Recent Posts

    -
    - {posts?.slice(0, 10) - .map(([slug, post]: any, i: number) => { - return ( - - ); - })} -
    - { - posts.length > 10 && -
    - More... -
    - } -
    - ); + const posts = Object.entries(PostsInfo).reverse(); + if (!posts.length) + return <>; + return ( +
    +

    Recent Posts

    +
    + {posts?.slice(0, 10) + .map(([slug, post]: any, i: number) => { + return ( + + ); + })} +
    + { + posts.length > 10 && +
    + More... +
    + } +
    + ); } export default RecentPosts; diff --git a/components/title.tsx b/components/title.tsx index 5114181..9887cdc 100644 --- a/components/title.tsx +++ b/components/title.tsx @@ -12,7 +12,7 @@ function createPathElements(ancestors: Array<{ name: string, path: string }>) { currentPath += `/${ancestor.path}` return ( <> - {ancestor.name} + {ancestor.name} <> / ); diff --git a/pages/index.tsx b/pages/index.tsx index 272035c..39204a2 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -7,28 +7,28 @@ import RecentPosts from '../components/recent-posts'; import RootInfo from '../public/home.json'; function Nav() { - const nav = Object.entries(RootInfo); - return ( -
    -

    Navigation

    - { - nav.map(([slug, info], i) => { - return {info.title} - }) - } -
    - ) + const nav = Object.entries(RootInfo); + return ( +
    +

    Navigation

    + { + nav.map(([slug, info]) => { + return {info.title} + }) + } +
    + ) } function HomePage() { - return ( - - - - -