Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit fce0e30

Browse files
authored
Merge pull request academicpages#242 from ashutosh1919/restructure-publications
Restructure Publications
2 parents 41b295e + 3deebdc commit fce0e30

File tree

4 files changed

+60
-44
lines changed

4 files changed

+60
-44
lines changed

src/components/publicationsCard/PublicationCard.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import React from "react";
22
import "./PublicationCard.css";
33
import { Fade } from "react-reveal";
44

5-
export default function GithubRepoCard({ repo, theme }) {
6-
function openRepoinNewTab(url) {
5+
export default function PublicationCard({ pub, theme }) {
6+
function openPubinNewTab(url) {
77
var win = window.open(url, "_blank");
88
win.focus();
99
}
@@ -14,21 +14,21 @@ export default function GithubRepoCard({ repo, theme }) {
1414
style={{ backgroundColor: theme.highlight }}
1515
>
1616
<Fade bottom duration={2000} distance="40px">
17-
<div key={repo.id} onClick={() => openRepoinNewTab(repo.url)}>
17+
<div key={pub.id} onClick={() => openPubinNewTab(pub.url)}>
1818
<div className="publication-name-div">
1919
<p className="publication-name" style={{ color: theme.text }}>
20-
{repo.name}
20+
{pub.name}
2121
</p>
2222
</div>
2323
<p className="publication-description" style={{ color: theme.text }}>
24-
{repo.description}
24+
{pub.description}
2525
</p>
2626
<div className="publication-details">
2727
<p
2828
className="publication-creation-date subTitle"
2929
style={{ color: theme.secondaryText }}
3030
>
31-
Published on {repo.createdAt.split("T")[0]}
31+
Published on {pub.createdAt.split("T")[0]}
3232
</p>
3333
</div>
3434
{/* <div className="repo-stats">

src/pages/projects/Projects.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ import PublicationCard from "../../components/publicationsCard/PublicationCard";
66
import Button from "../../components/button/Button";
77
import TopButton from "../../components/topButton/TopButton";
88
import { Fade } from "react-reveal";
9-
import { greeting, projectsHeader, publicationsHeader } from "../../portfolio.js";
9+
import {
10+
greeting,
11+
projectsHeader,
12+
publicationsHeader,
13+
publications,
14+
} from "../../portfolio.js";
1015
import ProjectsData from "../../shared/opensource/projects.json";
11-
import PublicationData from "../../shared/opensource/publications.json";
1216
import "./Projects.css";
1317
import ProjectsImg from "./ProjectsImg";
1418

@@ -82,8 +86,8 @@ class Projects extends Component {
8286
</div>
8387

8488
<div className="repo-cards-div-main">
85-
{PublicationData.data.map((repo) => {
86-
return <PublicationCard repo={repo} theme={theme} />;
89+
{publications.data.map((pub) => {
90+
return <PublicationCard pub={pub} theme={theme} />;
8791
})}
8892
</div>
8993

src/portfolio.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,51 @@ const publicationsHeader = {
649649
avatar_image_path: "projects_image.svg",
650650
};
651651

652+
const publications = {
653+
data: [
654+
{
655+
id: "MDEwOlJlcG9zaXRvcnkyNDU0NjcyNzQ=",
656+
name: "Artificial Intelligence Paper",
657+
createdAt: "2020-03-06T16:26:54Z",
658+
description: "Paper Written on Artificial Intelligence published in xyz ",
659+
url:
660+
"https://www.andrewng.org/publications/building-high-level-features-using-large-scale-unsupervised-learning/",
661+
},
662+
{
663+
id: "MDEwOlJlcG9zaXRvcnkyNDU0NjcyNzi=",
664+
name: "Artificial Intelligence Paper",
665+
createdAt: "2020-03-06T16:26:54Z",
666+
description: "Paper Written on Artificial Intelligence published in xyz ",
667+
url:
668+
"https://www.andrewng.org/publications/building-high-level-features-using-large-scale-unsupervised-learning/",
669+
},
670+
{
671+
id: "MDEwOlJlcG9zaXRvcnkyNDU0NjcyNze=",
672+
name: "Artificial Intelligence Paper",
673+
createdAt: "2020-03-06T16:26:54Z",
674+
description: "Paper Written on Artificial Intelligence published in xyz ",
675+
url:
676+
"https://www.andrewng.org/publications/building-high-level-features-using-large-scale-unsupervised-learning/",
677+
},
678+
{
679+
id: "MDEwOlJlcG9zaXRvcnkyNDU0NjcyNzt=",
680+
name: "Artificial Intelligence Paper",
681+
createdAt: "2020-03-06T16:26:54Z",
682+
description: "Paper Written on Artificial Intelligence published in xyz ",
683+
url:
684+
"https://www.andrewng.org/publications/building-high-level-features-using-large-scale-unsupervised-learning/",
685+
},
686+
{
687+
id: "MDEwOlJlcG9zaXRvcnkyNDU0NjcyNzb=",
688+
name: "Artificial Intelligence Paper",
689+
createdAt: "2020-03-06T16:26:54Z",
690+
description: "Paper Written on Artificial Intelligence published in xyz ",
691+
url:
692+
"https://www.andrewng.org/publications/building-high-level-features-using-large-scale-unsupervised-learning/",
693+
},
694+
],
695+
};
696+
652697
// Contact Page
653698
const contactPageData = {
654699
contactSection: {
@@ -689,5 +734,6 @@ export {
689734
experience,
690735
projectsHeader,
691736
publicationsHeader,
737+
publications,
692738
contactPageData,
693739
};

src/shared/opensource/publications.json

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)