From 34dba26cb3ca0e229dd923f6567c57ae82ae491f Mon Sep 17 00:00:00 2001 From: mitchelljfs Date: Sat, 21 Jul 2018 19:23:58 -0700 Subject: [PATCH] Added svg badges to projects that have them --- src/components/Job/index.js | 1 + src/components/Project/index.css | 5 ++++ src/components/Project/index.js | 18 +++++++++++-- src/containers/Projects/index.js | 44 ++++++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+), 2 deletions(-) diff --git a/src/components/Job/index.js b/src/components/Job/index.js index ea0ab17..952fb9b 100644 --- a/src/components/Job/index.js +++ b/src/components/Job/index.js @@ -16,6 +16,7 @@ class Experience extends React.PureComponent { constructor(props: Props) { super(props) + this.listedBullets = this.props.bullets.map((bullet, index) => (
  • {bullet}
  • )) diff --git a/src/components/Project/index.css b/src/components/Project/index.css index 5060714..bfcd2df 100644 --- a/src/components/Project/index.css +++ b/src/components/Project/index.css @@ -1,3 +1,8 @@ +.project-badge { + display: inline-block; + margin: 3px 2px 0 2px; +} + .project-container { border-bottom: 2px solid rgb(139, 191, 209); flex: 1 0 45%; diff --git a/src/components/Project/index.js b/src/components/Project/index.js index 3f42d60..33c5249 100644 --- a/src/components/Project/index.js +++ b/src/components/Project/index.js @@ -1,5 +1,5 @@ // @flow -import React from "react" +import * as React from "react" import ClearButton from "../../components/ClearButton" @@ -8,14 +8,28 @@ import "./index.css" type Props = { title: string, children: string, - repoUrl: string + repoUrl: string, + badges: Array<{ imgUrl: string, linkUrl: string, alt: string }> } class Project extends React.PureComponent { + badges: Array> + + constructor(props: Props) { + super(props) + + this.badges = this.props.badges.map((badge, index) => ( + + {badge.alt} + + )) + } + render() { return (

    {this.props.title}

    + {this.badges}

    {this.props.children}

    Repository
    diff --git a/src/containers/Projects/index.js b/src/containers/Projects/index.js index 5e75fff..3be56f1 100644 --- a/src/containers/Projects/index.js +++ b/src/containers/Projects/index.js @@ -14,6 +14,20 @@ class Projects extends React.PureComponent { This website has taken many forms over the years, as my frontend and design skills increase. It has been simple HTML, CSS, and JS, and a @@ -25,6 +39,34 @@ class Projects extends React.PureComponent { This package will become a fully featured AWS Lambda function router, able to respond to HTTP, Schedule, Cognito, and SNS events. It will @@ -36,6 +78,7 @@ class Projects extends React.PureComponent { destinate is a react-native, iOS (and Android) app. Its main objective is to suggest places or activities to the user based on their past @@ -47,6 +90,7 @@ class Projects extends React.PureComponent { A minimal, cross-platform, unix-like-system management program. This program is designed to detect which programs are affiliated with the