Skip to content

Instantly share code, notes, and snippets.

@takahiro-saeki
Created October 28, 2016 02:08
Show Gist options
  • Save takahiro-saeki/d33c78beb811024ba0be7ba9f531f3c7 to your computer and use it in GitHub Desktop.
Save takahiro-saeki/d33c78beb811024ba0be7ba9f531f3c7 to your computer and use it in GitHub Desktop.
import React, {Component} from 'react';
import classNames from 'classnames';
import Image1 from '../../img/book1.png';
import Image2 from '../../img/book2.png';
import Image3 from '../../img/book3.png';
import Media1 from '../../img/media1.png';
import Media2 from '../../img/media2.png';
import github1 from '../../img/github1.png';
import github2 from '../../img/github2.png';
import github3 from '../../img/github3.png';
import style from '../../css/style';
const URL = {
PDF_1: 'http://hiro.eek.jp/work1.pdf',
PDF_2: 'http://hiro.eek.jp/work2.pdf',
BOOK: 'http://mohu-para.com/comitia116/',
GIT_1: 'https://github.com/takahiro-saeki/react-recharts-sandbox',
GIT_2: 'https://github.com/takahiro-saeki/react-wp-rest-api',
GIT_3: 'https://github.com/takahiro-saeki/react-politicians-library'
}
export default class Work extends Component {
location(url) {
window.open(url, '_blank');
}
render() {
const responsive = classNames(style['col-xs-12'], style['col-sm-6'], style['col-md-4'], style.block);
const img = classNames(style['responsive-img'], style['img-shadow']);
const imgTest = classNames(style['responsive-img'], style['img-shadow'], style['add-hover']);
const workWrapper = classNames(style['container-fluid'], style['work-bg']);
return (
<section className={workWrapper} id="WORK">
<h2 className={style.title}>WORK</h2>
<ul className={style.row}>
<li className={responsive}>
<div className={style['work-list']} onClick={() => this.location(URL.BOOK)}>
<img src={Image1} className={img}/>
<div className={imgTest}>
<div className={style['hover-text']}>WEB SITE</div>
</div>
</div>
<h3>アナタに捧げるフロントエンド実践マニュアル</h3>
<div>BOOK, PostCSS</div>
</li>
<li className={responsive}>
<div className={style['work-list']} onClick={() => this.location(URL.BOOK)}>
<img src={Image2} className={img}/>
<div className={imgTest}>
<div className={style['hover-text']}>WEB SITE</div>
</div>
</div>
<h3>アタシが教えてnode.jsア・ゲ・ル♥ node.js実践マニュアル</h3>
<div>BOOK, PostCSS</div>
</li>
//... write more li.
</ul>
</section>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment