From bab35fbfcee7d2bbc4a7882fbbf8f4693337b400 Mon Sep 17 00:00:00 2001 From: rei Date: Mon, 24 Apr 2023 18:27:42 +0200 Subject: [PATCH] bg fix --- layouts/MainLayout.tsx | 21 ++++---- pages/_app.tsx | 8 ++- pages/projects/index.tsx | 112 +++++++++++++++++---------------------- 3 files changed, 65 insertions(+), 76 deletions(-) diff --git a/layouts/MainLayout.tsx b/layouts/MainLayout.tsx index 01b832f..105e2dc 100644 --- a/layouts/MainLayout.tsx +++ b/layouts/MainLayout.tsx @@ -1,13 +1,12 @@ -import { PropsWithChildren } from "react"; -import { R3Gradient } from '../components/R3Background'; -import { Navbar } from "../components/Navbar"; +import { PropsWithChildren } from 'react' +import { R3Gradient } from '../components/R3Background' +import { Navbar } from '../components/Navbar' export const MainLayout = ({ children }: PropsWithChildren) => { - return ( -
- - -
{children}
-
- ); -}; + return ( +
+ +
{children}
+
+ ) +} diff --git a/pages/_app.tsx b/pages/_app.tsx index c055f25..742fed5 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,6 +1,12 @@ +import { R3Gradient } from '../components/R3Background' import '../styles/globals.css' import type { AppProps } from 'next/app' export default function App({ Component, pageProps }: AppProps) { - return + return ( + <> + + + + ) } diff --git a/pages/projects/index.tsx b/pages/projects/index.tsx index d0affde..f062c3b 100644 --- a/pages/projects/index.tsx +++ b/pages/projects/index.tsx @@ -1,71 +1,55 @@ -import { GetServerSideProps } from "next"; -import { MainLayout } from "../../layouts/MainLayout"; -import { Post, getAllProjectsFrontMatter } from "../../utils/markdown"; -import Link from "next/link"; -import { formatDate } from "../../utils/general"; -import { BasicArticleProps } from "../../components/PostHeader"; +import { GetServerSideProps } from 'next' +import { MainLayout } from '../../layouts/MainLayout' +import { Post, getAllProjectsFrontMatter } from '../../utils/markdown' +import Link from 'next/link' +import { formatDate } from '../../utils/general' +import { BasicArticleProps } from '../../components/PostHeader' -const ProjectCard = ({ - project, - slug, -}: { - project: BasicArticleProps; - slug: string; -}) => { - return ( -
-
-
- {formatDate(project.date)} +const ProjectCard = ({ project, slug }: { project: BasicArticleProps; slug: string }) => { + return ( +
+
+
{formatDate(project.date)}
+

{project.title}

+

{project.description}

+ + + +
+ {project.thumbnail && ( + {`${slug}-thumbnail`} + )}
-

{project.title}

-

- {project.description} -

- - - -
- {project.thumbnail && ( - {`${slug}-thumbnail`} - )} -
- ); -}; + ) +} const Projects = ({ posts }: { posts: Post[] }) => { - return ( - -

- Projects -

-
-
- {posts.map((post, index) => ( - - ))} -
- - ); -}; + return ( + +

Projects

+
+
+ {posts.map((post, index) => ( + + ))} +
+ + ) +} export const getServerSideProps: GetServerSideProps = async () => { - const posts = getAllProjectsFrontMatter(); - return { - props: { - posts, - }, - }; -}; + const posts = getAllProjectsFrontMatter() + return { + props: { + posts, + }, + } +} -export default Projects; +export default Projects