From 9a6ba9adcf6393b75fc254e7fb08e1583a4001e8 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Tue, 13 Apr 2021 09:07:35 +0200 Subject: added images + some styling + software post (empty) --- pages/index.tsx | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'pages/index.tsx') diff --git a/pages/index.tsx b/pages/index.tsx index be1f9f4..f030f2c 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,15 +1,15 @@ import Button from '../components/button'; +import PostCard from '../components/card'; import Chapters, { chapter } from '../components/chapters'; import Navbar, { NavbarItem } from '../components/navbar'; import Seperator from '../components/seperator'; -import PostCard from '../components/card'; -import { PostsInfo } from './search'; import { ArticleMeta, getStaticProps as getBlogPage, RenderedArticle } from './post/[id]'; +import { PostsInfo } from './search'; import { useEffect, useState } from 'react'; // edit this to change the post displayed on the home page and the pinned posts -var posts = ['index']; +var posts = ['index', 'software']; export default function Home(props: { posts: Array<{ @@ -54,24 +54,22 @@ export default function Home(props: {
{props.posts.map((post, index) => { return <> - { index != 0 &&

{post.props.meta.title}

} + {index != 0 &&

{post.props.meta.title}

} - { index + 1 != props.posts.length && } - { - index == 0 && <> -

Recent posts

-
- { - posts.posts.slice(0, 4).map(post => { - return ; - }) - } -
+ {index + 1 != props.posts.length && } + {index == 0 && <> +

Recent posts

+
+ {posts.posts.slice(0, 4).map(post => { + return ; + })} +
-
- - - } +
+
+ + } ; })}
-- cgit v1.2.3