diff --git a/source/src/pages/Page/index.tsx b/source/src/pages/Page/index.tsx
index 3957826..f89ae5b 100644
--- a/source/src/pages/Page/index.tsx
+++ b/source/src/pages/Page/index.tsx
@@ -5,9 +5,11 @@ import styled from "styled-components"
import { PageData, Map } from "../../../types/types"
+import GithubLinkIcon from "../../components/GithubLinkIcon"
import MainContent from "../../components/MainContent"
import Loading from "../../components/Loading"
import TagList from "../../components/TagList"
+import Badge from "../../components/Badge"
import Tag from "../../components/Tag"
import NotFound from "../NotFound"
@@ -25,6 +27,15 @@ const StyledTitle = styled.h1`
margin-bottom: 1rem;
`
+const PortfolioGithubLinkContainer = styled.div`
+ float: right;
+ margin-top: 1rem;
+`
+
+const ProjectImage = styled.img`
+ max-width: 100%;
+`
+
enum PageType {
POST,
SERIES,
@@ -124,6 +135,11 @@ const Page = () => {
tags: [],
toc: undefined,
content: "No content",
+
+ image: "",
+ overview: "",
+ badges: [],
+ repo: "",
}
fetchContent(_pageType, url).then((fetched_content) => {
@@ -187,28 +203,14 @@ const Page = () => {
url as keyof typeof portfolio.projects
]
- console.log(fetched_content)
-
pageData.content = fetched_content.content
pageData.toc = fetched_content.toc
pageData.title = data.name
-
- // todo: add portfolio data
- /*
- "image": "/img/portfolio/developomp.com.png",
- "overview": "my website for blogging, portfolio, and resume.",
- "badges": [
- "typescript",
- "javascript",
- "nodedotjs",
- "firebase",
- "react",
- "html5",
- "css3"
- ],
- "repo": "https://github.com/developomp/developomp-site"
- */
+ pageData.image = data.image
+ pageData.overview = data.overview
+ pageData.badges = data.badges
+ pageData.repo = data.repo
break
}
@@ -241,24 +243,34 @@ const Page = () => {
- {pageType == PageType.SERIES ? (
+ {/* next/previous series post buttons */}
+ {pageType == PageType.SERIES && (
- ) : (
-
+ )}
+
+ {pageType == PageType.PORTFOLIO_PROJECT && (
+
+
+
)}
{pageData.title}
+ {pageType == PageType.PORTFOLIO_PROJECT &&
+ pageData.badges.map((badge) => (
+
+ ))}
+
{/* Post tags */}
- {!!pageData.tags.length && (
+ {pageData.tags.length > 0 && (
{pageData.tags.map((tag) => {
return (
@@ -273,9 +285,9 @@ const Page = () => {
{/* Post metadata */}
- {pageType != PageType.UNSEARCHABLE && (
-
- )}
+ {[PageType.UNSEARCHABLE, PageType.POST].includes(
+ pageType
+ ) && }
@@ -283,6 +295,13 @@ const Page = () => {
{/* add table of contents if it exists */}
+ {pageType == PageType.PORTFOLIO_PROJECT && (
+
+ )}
+
{/* page content */}