Skip to content

Commit

Permalink
Merge pull request #18 from mldangelo/private-cv
Browse files Browse the repository at this point in the history
User Authentication + Private CV
  • Loading branch information
mldangelo authored Mar 28, 2017
2 parents 02a23d9 + abbe91f commit 9088a3c
Show file tree
Hide file tree
Showing 65 changed files with 1,767 additions and 893 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/jsx-wrap-multilines": [1, {declaration: true, assignment: true, return: true}],
"jsx-a11y/no-static-element-interactions": 0,
"no-underscore-dangle": 0,
},
"plugins": [
"mocha",
Expand Down
41 changes: 15 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
sudo: false
language: node_js

services: mongodb
cache:
yarn: true

env:
global:
- secure: RMzwEd88VFWIw8R5j2RMkpFeiLGUM6tpoVooi30SOu/AkC0YxYNcxskIxDo0lfSuckvvggBxDq30WSXLrGaxCegCM5N5EyCdt/J67hnoD5C0x+hGFOrzp+nps/xfNerc47MLxVjG+Nglc8wk+gJNohG+l5AbEf33zwrVxARWqAPsqiUFyYGRcCSNMdFbUQnQtYrHFfxVpKU/MQMvsVPDvR8jNKjllIgCHHupYPtvfNP1/e33iWduJmEwP2k2kY7kJuEjy15RClrdW0y8k+uUibyKrjJQ0UhnAom0vwwIKbOZw8hBKRhvaGlJmvNRWBtsetpD60/xHo8s0POHMM12pfD7YQ2NZdriDXDdpArontMw5V0u6zUzWPV92yS99WXk/ufZIvCQl03nHEb6dK+8NPKquUmqZWWQYJylZc/tjzJJNliX03erDwNhYl2S4u+o5Br6iMMtxfIv1j7rBUk0sCHQwERWsYFm1HegvW2rwdOKBOcn2fOMBvKHZPSbLfDbJtJPSTetsT5MWyGIOPx8C+JIhobUNq5VpynOw+EInPfqG+qAV8HXJrZxoss/48o8IyjTBz0MTxNKrZD3v4R/pZrerq/+Jx/meCi6xHuMg4MEUnzj2o1D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UIXlTdF/Vw+Q5U5ZUR2MQN1fbpvqOzllsBwHkQiND2lpztDXDn95UjW3SK8Fhb8+1TVfwR4HXXW4XV3nYQhGYXkPcJ1kTVtTLqkp4WCmXulkQ1WqQT1zGPmvu73Mj6QgowTGaHf0DrbfQQouQyt+ji1bn1RLwvaZuNmgoYw1N/8NVssQEeJqb0X8cK2cQv3iGk0lnTXc+k4nWTa+IOLBHbmCyRMoVRBt2CnIKc9SuG3dZRi6g7FIhlBEF21oyxC7vYOw7Hvgr4T6dLfZaArAd+th1RiKl1trXtz6es+KofWo/Fzw3NcSxrknA3HzDr+LjRUgWj+Bi0WF3o6G5EdUbaIZgolVy76xj4P9ZN4mDKIvrtS6ZoiPssT3zM3eNSzrqkvCZAgRO198oepUDG/9RGxnQrCZCJxIRWcCl5NybiKd+3Nk9hRT2ZdTDeskhH7h2as73IkVN9+Um0TszvaJMzZbyOAOFInJwZfcpS0uWX+3+bpahx3UDLqhDltSLV5O/THzhDoP2TselXZ5ZFzQ/U4MHxwesuRfEE37e0Uc2adoyzuVFtFNL+6S3G1kzJFO7kyAkJ4u5Sg+Qsw1r/WTZbvFvmnPr4wE9Mu4r1/AbHzcG1MJu8MfTRbRYTsKnA=
matrix:
include:
- os: linux
node_js: "7"
env: NODE_ENV=development
- os: linux
node_js: "7"
env: NODE_ENV=production
- os: linux
node_js: '7'
env: NODE_ENV=development
- os: linux
node_js: '7'
env: NODE_ENV=production
fast_finish: true

addons:
code_climate:
repo_token: 321ece2c9941bf30bb07f0555343ad772bdbbc6235c866478afc7af46558a8b4

apt:
packages:
- xvfb
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
Expand All @@ -32,29 +31,19 @@ before_install:
- npm --version
- gcc --version
- g++ --version

addons:
apt:
packages:
- xvfb

install:
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- NODE_ENV=development yarn

- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- NODE_ENV=development yarn
before_script:
- npm run lint
- sleep 5

script:
- npm run build-dev
- npm run build
- npm test

notifications:
email:
- [email protected]

git:
depth: 10
2 changes: 1 addition & 1 deletion app/components/About/LinkRenderer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { PropTypes } from 'react';
import { Link } from 'react-router';
import { Link } from 'react-router-dom';

const LinkRenderer = (props) => {
if (props.href.match(/^(https?:)?\/\//)) {
Expand Down
22 changes: 17 additions & 5 deletions app/components/Resume/Courses.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React from 'react';
import React, { PropTypes } from 'react';

import Course from './Courses/Course';
import courses from '../../data/courses';

const getRows = () => courses.sort((a, b) => {
const getRows = courses => courses.sort((a, b) => {
let ret = 0;
if (a.university > b.university) ret = -1;
else if (a.unversity < b.university) ret = 1;
Expand All @@ -18,16 +17,29 @@ const getRows = () => courses.sort((a, b) => {
/>
));

const Courses = () => (
const Courses = props => (
<div className="courses">
<div className="link-to" id="courses" />
<div className="title">
<h3>Selected Courses</h3>
</div>
<ul className="course-list">
{getRows()}
{getRows(props.data)}
</ul>
</div>
);

Courses.propTypes = {
data: PropTypes.arrayOf(PropTypes.shape({
title: PropTypes.string,
number: PropTypes.string,
link: PropTypes.string,
univerity: PropTypes.string,
})),
};

Courses.defaultProps = {
data: [],
};

export default Courses;
23 changes: 18 additions & 5 deletions app/components/Resume/Education.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
import React from 'react';
import React, { PropTypes } from 'react';

import Degree from './Education/Degree';
import degrees from '../../data/degrees';

const getRows = () => degrees.map(degree => (
const getRows = degrees => degrees.map(degree => (
<Degree
data={degree}
key={degree.school}
/>
));

const Education = () => (
const Education = props => (
<div className="education">
<div className="link-to" id="education" />
<div className="title">
<h3>Education</h3>
</div>
{getRows()}
{getRows(props.data)}
</div>
);

Education.propTypes = {
data: PropTypes.arrayOf(PropTypes.shape({
school: PropTypes.string,
degree: PropTypes.string,
link: PropTypes.string,
year: PropTypes.number,
})),
};

Education.defaultProps = {
data: [],
};


export default Education;
24 changes: 19 additions & 5 deletions app/components/Resume/Experience.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
import React from 'react';
import React, { PropTypes } from 'react';

import Job from './Experience/Job';
import positions from '../../data/positions';

const getRows = () => positions.map(job => (
const getRows = positions => positions.map(job => (
<Job
data={job}
key={job.company}
/>
));

const Experience = () => (
const Experience = props => (
<div className="experience">
<div className="link-to" id="experience" />
<div className="title">
<h3>Experience</h3>
</div>
{getRows()}
{getRows(props.data)}
</div>
);

Experience.propTypes = {
data: PropTypes.arrayOf(PropTypes.shape({
company: PropTypes.string,
position: PropTypes.string,
link: PropTypes.string,
daterange: PropTypes.string,
points: PropTypes.arrayOf(PropTypes.string),
})),
};

Experience.defaultProps = {
data: [],
};


export default Experience;
2 changes: 1 addition & 1 deletion app/components/Resume/References.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Link } from 'react-router';
import { Link } from 'react-router-dom';

const References = () => (
<div className="references">
Expand Down
39 changes: 34 additions & 5 deletions app/components/Resume/Skills.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
import React, { Component } from 'react';
import React, { Component, PropTypes } from 'react';

import CategoryButton from './Skills/CategoryButton';
import SkillBar from './Skills/SkillBar';

import { skills, categories } from '../../data/skills';

class Skills extends Component {

constructor(props) {
super(props);
this.state = {
buttons: Object.keys(categories).sort().reduce((obj, key) => ({
buttons: props.categories.map(cat => cat.name).reduce((obj, key) => ({
...obj,
[key]: false,
}), { All: true }),
skills: skills.map(skill =>
skills: props.skills.map(skill =>
Object.assign(skill, { category: skill.category.sort() }),
),
};
}

componentWillReceiveProps(nextProps) {
this.setState({
buttons: nextProps.categories.map(cat => cat.name).reduce((obj, key) => ({
...obj,
[key]: false,
}), { All: true }),
skills: nextProps.skills.map(skill =>
Object.assign(skill, { category: skill.category.sort() }),
),
});
}

getRows() {
// search for true active categorys
const actCat = Object.keys(this.state.buttons).reduce((cat, key) => (
Expand All @@ -38,6 +48,7 @@ class Skills extends Component {
}).filter(skill => (actCat === 'All' || skill.category.includes(actCat)))
.map(skill => (
<SkillBar
categories={this.props.categories}
data={skill}
key={skill.title}
/>
Expand Down Expand Up @@ -85,4 +96,22 @@ class Skills extends Component {
}
}

Skills.propTypes = {
skills: PropTypes.arrayOf(PropTypes.shape({
title: PropTypes.string,
compentency: PropTypes.number,
category: PropTypes.arrayOf(PropTypes.string),
})),
categories: PropTypes.arrayOf(PropTypes.shape({
name: PropTypes.string,
color: PropTypes.string,
})),
};

Skills.defaultProps = {
skills: [],
categories: [],
};


export default Skills;
63 changes: 41 additions & 22 deletions app/components/Resume/Skills/SkillBar.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,54 @@
import React, { PropTypes } from 'react';
import React, { Component, PropTypes } from 'react';

import { categories } from '../../../data/skills';
class SkillBar extends Component {

// TODO: Consider averaging colors
const getColor = types => Object.keys(categories)
.filter(key => types.includes(key))
.map(key => categories[key])[0];
constructor(props) {
super(props);
this.state = {
data: props.data,
categories: props.categories,
};
}

const SkillBar = (props) => {
const titleStyle = {
background: getColor(props.data.category),
};
const barStyle = {
background: getColor(props.data.category),
width: `${String(Math.min(100, Math.max((props.data.compentency / 5.0) * 100.0, 0)))}%`,
};
return (
<div className="skillbar clearfix">
<div className="skillbar-title" style={titleStyle}><span>{props.data.title}</span></div>
<div className="skillbar-bar" style={barStyle} />
<div className="skill-bar-percent">{props.data.compentency} / 5</div>
</div>
);
};
// TODO: Consider averaging colors
getColor() {
return this.state.categories
.filter(cat => this.state.data.category.includes(cat.name))
.map(cat => cat.color)[0];
}

render() {
const titleStyle = {
background: this.getColor(),
};
const barStyle = {
...titleStyle,
width: `${String(Math.min(100, Math.max((this.state.data.compentency / 5.0) * 100.0, 0)))}%`,
};
return (
<div className="skillbar clearfix">
<div className="skillbar-title" style={titleStyle}><span>{this.state.data.title}</span></div>
<div className="skillbar-bar" style={barStyle} />
<div className="skill-bar-percent">{this.state.data.compentency} / 5</div>
</div>
);
}
}

SkillBar.propTypes = {
data: PropTypes.shape({
category: PropTypes.arrayOf(PropTypes.string).isRequired,
compentency: PropTypes.number.isRequired,
title: PropTypes.string.isRequired,
}).isRequired,
categories: PropTypes.arrayOf(PropTypes.shape({
name: PropTypes.string,
color: PropTypes.string,
})),
};

SkillBar.defaultProps = {
categories: [],
};

export default SkillBar;
Loading

0 comments on commit 9088a3c

Please sign in to comment.