This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { PropTypes } from 'react' | |
class CoursesPage extends React.Component { | |
constructor(props) { | |
super(); | |
this.state = { | |
course: { | |
title: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
const HtmlWebpackPlugin = require('html-webpack-plugin') | |
const ExtractTextPlugin = require('extract-text-webpack-plugin') | |
module.exports = { | |
entry: { | |
app: './src/js/index.jsx' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyComponent extends Component { | |
constructor(props) { | |
super(); | |
this.state = { | |
_data: { | |
must_known: [], | |
libs: [], | |
tools: [], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import AroundIcons from './AroundIcons' | |
class ResumeComponent extends React.Component { | |
constructor(props) { | |
super(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onscroll = () => { | |
let wScroll = window.scrollY; | |
// Movement Parallax | |
document.querySelector('.logo').style.cssText = `transform: translate(0px, ${wScroll/2}%)`; | |
document.querySelector('.back-bird').style.cssText = `transform: translate(0px, ${wScroll/4}%)`; | |
document.querySelector('.fore-bird').style.cssText = `transform: translate(0px, -${wScroll/40}%)`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SmoothScrolling = { | |
timer: null, | |
stop: function() { | |
clearTimeout(this.timer); | |
}, | |
scrollTo: function(id, callback) { | |
var settings = { | |
duration: 1000, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "amdev", | |
"version": "1.0.0", | |
"description": "My Personal Website", | |
"main": "index.js", | |
"scripts": { | |
"dev": "webpack-dev-server -d --progress", | |
"build": "npm run clear && webpack -p", | |
"clear": "rimraf ./dist/*" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AddDayForm = ({ resort, date , powder, backcountry }) => { | |
let _resort , _date , _powder , _backcountry | |
const handleSubmit = (e) => { | |
e.preventDefault() | |
const formValues = { | |
resort: _resort.value, | |
date: _date.value, | |
powder: _powder.checked, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* .env file is the best place to store all your diffrent api endpoint | |
* this gist is explain hot tyo create one | |
* best of luck | |
*/ | |
// #01 ----------------------------------------------------- | |
// create .env file in your root directory and | |
// add your end points with different names to it like below | |
// in our case we have one endpoint ( this is base url ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// #01 creating action file (./src/js/actions/courseActions.js) | |
export function createCourse(course) { | |
return { type: 'CREATE_COURSE' , course } | |
} | |
OlderNewer