diff options
| author | lonkaars <l.leblansch@gmail.com> | 2021-04-13 09:07:35 +0200 | 
|---|---|---|
| committer | lonkaars <l.leblansch@gmail.com> | 2021-04-13 09:07:35 +0200 | 
| commit | 9a6ba9adcf6393b75fc254e7fb08e1583a4001e8 (patch) | |
| tree | 31a36fb8eb8f24cbf7545f76981b4157369604f4 /pages | |
| parent | 35c07445d07dd9f902df5ee991f7ccf3ac6a5f4a (diff) | |
added images + some styling + software post (empty)
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/_app.tsx | 5 | ||||
| -rw-r--r-- | pages/index.tsx | 36 | 
2 files changed, 19 insertions, 22 deletions
| diff --git a/pages/_app.tsx b/pages/_app.tsx index bbaf025..c85b6ea 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,6 +1,7 @@  import Head from 'next/head';  import '../styles/button.css'; +import '../styles/card.css';  import '../styles/colors.css';  import '../styles/globals.css';  import '../styles/image.css'; @@ -8,7 +9,6 @@ import '../styles/layout.css';  import '../styles/navbar.css';  import '../styles/search.css';  import '../styles/tags.css'; -import '../styles/card.css';  export default function Blog({ Component, pageProps }) {  	return <> @@ -20,10 +20,9 @@ export default function Blog({ Component, pageProps }) {  			<meta property='og:site_name' content="Loek's blog" />  			<meta property='og:url' content='https://blog.pipeframe.xyz' />  			<meta property='og:title' content="Loek's excruciatingly interesting blog" /> -			<meta property='og:description' content="This is my personal blog website" /> +			<meta property='og:description' content='This is my personal blog website' />  			<meta property='og:type' content='website' />  			<meta name='theme-color' content='#e16d82' /> -  		</Head>  		<Component {...pageProps} />  	</>; 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: {  			<div className='contentWrapper'>  				{props.posts.map((post, index) => {  					return <> -						{ index != 0 && <h1>{post.props.meta.title}</h1> } +						{index != 0 && <h1>{post.props.meta.title}</h1>}  						<RenderedArticle content={post.props.content} /> -						{ index + 1 != props.posts.length && <Seperator /> } -						{ -							index == 0 && <> -								<h2>Recent posts</h2> -								<div className="recentPosts"> -								{ -									posts.posts.slice(0, 4).map(post => { -										return <PostCard post={post}/>; -									}) -								} -								</div> +						{index + 1 != props.posts.length && <Seperator />} +						{index == 0 && <> +							<h2>Recent posts</h2> +							<div className='recentPosts'> +								{posts.posts.slice(0, 4).map(post => { +									return <PostCard post={post} />; +								})} +							</div> -								<div><Button text="Go to all posts" href="/search"/></div> -								<Seperator /> -							</> -						} +							<div> +								<Button text='Go to all posts' href='/search' /> +							</div> +							<Seperator /> +						</>}  					</>;  				})}  			</div> |