From 38f4c7a04199f51a43283d8b5a81c975b5b21aff Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 5 Apr 2016 19:40:09 +0100 Subject: [PATCH] Remove project item components --- .../src/js/components/index/project-image.js | 51 ----------------- .../components/index/project-images-types.js | 56 ------------------- 2 files changed, 107 deletions(-) delete mode 100644 static/src/js/components/index/project-image.js delete mode 100644 static/src/js/components/index/project-images-types.js diff --git a/static/src/js/components/index/project-image.js b/static/src/js/components/index/project-image.js deleted file mode 100644 index c4f6f3c..0000000 --- a/static/src/js/components/index/project-image.js +++ /dev/null @@ -1,51 +0,0 @@ -import React from 'react'; -import Reverser from '../../helpers/reverser'; -var ReactBootstrap = require('react-bootstrap'); -var Col = ReactBootstrap.Col; - -export default class ProjectImage extends React.Component { - constructor() { - super(); - this.state = { - url: '' - }; - } - componentDidMount() { - if (!this.props.data.link || this.props.data.link === '') { - return; - } - if (this.props.data.link.startsWith('#')) { - this.setState({url: this.props.data.link}); - } else { - let args; - if (this.props.data.args) { - args = [this.props.data.args]; - } - Reverser(this.props.data.link, args, function (url) { - this.setState({ url }); - }.bind(this)); - } - } - - render() { - var animationClass = this.props.isHovered ? 'zoomIn' : 'zoomOut'; - var classes = this.props.data.title.toLowerCase().replace(/ /g, '-'); - return ( - -
-
-
-

{this.props.data.title}

-

{this.props.data.text}

- - Find out more - -
-
-
- - ); - } -} diff --git a/static/src/js/components/index/project-images-types.js b/static/src/js/components/index/project-images-types.js deleted file mode 100644 index 9065f10..0000000 --- a/static/src/js/components/index/project-images-types.js +++ /dev/null @@ -1,56 +0,0 @@ -import React from 'react'; -var ReactBootstrap = require('react-bootstrap'); -import ProjectImage from './project-image'; -var Row = ReactBootstrap.Row; - -const DATA = [ - { - title: 'College', - text: 'My time at college was where I learnt most about programming, and discovered my skill and passion for it.', - link: '', - }, - { - title: 'Personal', - text: 'I write code just to write code, but sometimes it serves a purpose.', - link: '#project-thumbnails', - }, - { - title: 'Work', - text: 'I\'m an apprentice software developer at Dabapps, and this is what I\'ve done.', - link: '', - } -]; - -export default class ProjectImagesTypes extends React.Component { - constructor() { - super(); - this.keys = [1, 2, 3]; - this.state = { - hover: 0 - }; - this.setHovering = this.setHovering.bind(this); - } - - setHovering(key) { - this.setState({hover: key}); - } - - render() { - var images = this.keys.map(function (key) { - return ( - - ); - }.bind(this)); - return ( -
-

Projects

- - { images } - -
- ); - } -}