1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-12-22 17:23:22 +01:00

Merge pull request #2 from kremalicious/fix/codeclimate

refactor
This commit is contained in:
Matthias Kretschmann 2018-05-22 23:09:36 +02:00 committed by GitHub
commit ef28bf15a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 13 deletions

View File

@ -9,6 +9,7 @@
</p>
<p align="center">
<a href="https://travis-ci.com/kremalicious/portfolio"><img src="https://travis-ci.com/kremalicious/portfolio.svg?branch=master" /></a>
<a href="https://codeclimate.com/github/kremalicious/portfolio/maintainability"><img src="https://api.codeclimate.com/v1/badges/8f561ec93e0f8c6b15d9/maintainability" /></a>
<a href="https://greenkeeper.io/"><img src="https://badges.greenkeeper.io/kremalicious/portfolio.svg" /></a>
</p>

View File

@ -2,21 +2,19 @@ import React from 'react'
import CSSTransition from 'react-transition-group/CSSTransition'
import './Animations.scss'
const Animation = props => <CSSTransition appear={true} in={true} {...props} />
export const FadeIn = props => (
<CSSTransition
<Animation
classNames="fadein"
appear={true}
in={true}
timeout={{ enter: 200, exit: 200, appear: 200 }}
{...props}
/>
)
export const MoveIn = props => (
<CSSTransition
<Animation
classNames="movein"
appear={true}
in={true}
timeout={{ enter: 300, exit: 200, appear: 300 }}
{...props}
/>

View File

@ -278,7 +278,6 @@ vCard.prototype = {
* @return {String}
*/
toString: function(version, charset) {
// eslint-disable-line no-unused-vars
version = version || this.version
return vCard.format(this, version)
},

View File

@ -11,6 +11,17 @@ import ProjectNav from '../components/molecules/ProjectNav'
import SEO from '../components/atoms/SEO'
import './Project.scss'
const ProjectMeta = props => {
const { links, techstack } = props
return (
<footer className="project__meta">
{!!links && <ProjectLinks links={links} />}
{!!techstack && <ProjectTechstack techstack={techstack} />}
</footer>
)
}
class Project extends Component {
constructor(props) {
super(props)
@ -27,7 +38,6 @@ class Project extends Component {
const project = this.props.data.projectsYaml
const projectImages = this.props.data.projectImages.edges
const pathContext = this.props.pathContext
const { title, links, techstack } = project
const { next, previous } = pathContext
@ -53,10 +63,7 @@ class Project extends Component {
))}
</FullWidth>
<footer className="project__meta">
{!!links && <ProjectLinks links={links} />}
{!!techstack && <ProjectTechstack techstack={techstack} />}
</footer>
<ProjectMeta links={links} techstack={techstack} />
</Content>
</article>
@ -66,6 +73,11 @@ class Project extends Component {
}
}
ProjectMeta.propTypes = {
links: PropTypes.array,
techstack: PropTypes.array
}
Project.propTypes = {
data: PropTypes.object.isRequired,
pathContext: PropTypes.object.isRequired