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
<h1>animate a circle to a line in CSS</h1> | |
<h2>requires box-reflect (-webkit-)</h2> | |
<div class="shape">hover me | |
<div class="quarter-circle"></div> | |
<div class="quarter-circle"></div> | |
<div class="quarter-circle"></div> | |
</div> |
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 Conf from '../conf' // Various app-level options, including a logging flag. | |
const logger = store => next => action => { | |
// Middleware format. | |
// - Logs each action as they come in, | |
// - Dispatches the action, and | |
// - Logs the new state. | |
if (Conf.logging && typeof console.group === 'function') { | |
console.group(action.type) | |
console.info('📲 dispatching', action) |
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 { percentage } from '../utils.js' | |
// Component goes here. |
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
(defn flatten [nested] | |
(reduce | |
(fn [acc el] | |
(concat acc (if (sequential? el) | |
(flatten el) | |
[el]))) | |
[] | |
nested)) | |
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' | |
class AppTemplate extends React.Component { | |
componentWillMount() { | |
this.props.veritfyUserToken() | |
} | |
render() { | |
if (this.props.state.loading) { | |
return ( |
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, { Component } from 'react' | |
import { bindActionCreators } from 'redux' | |
import { connect } from 'react-redux' | |
import Settings from '../components/scenes/settings' | |
import * as settingActions from '../actions/settings' | |
import * as signUpActions from '../actions/sign-up' | |
import * as loginActions from '../actions/login' | |
import * as routerActions from '../actions/router' |
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
function itemsReducer(state, action) { | |
switch(action.type) { | |
case 'UPDATE_ITEM': | |
return state.items.map(i => itemReducer(i, action)) | |
default: | |
return state | |
} | |
} | |
function itemReducer(state, action) { |
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
// === Action Creators === | |
export function posItemRequest(itemBody) { | |
return { | |
type: 'ITEM_POST_REQUEST', | |
payload: { | |
itemBody: itemBody | |
} | |
} | |
} |
OlderNewer