@ -3,8 +3,9 @@ html {
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
margin: 0;
|
||||
font-family: Roboto,"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif;
|
||||
font-family: Roboto, "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
*, *:before, *:after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
@ -13,15 +14,15 @@ body {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
height: 100%;
|
||||
background-color: #f2f5f4;
|
||||
color:#7c8382;
|
||||
color: #7c8382;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
background-color: #272e30;
|
||||
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.22);
|
||||
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.22);
|
||||
height: 54px;
|
||||
border-bottom:2px solid #3ab7a5;
|
||||
border-bottom: 2px solid #3ab7a5;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 999;
|
||||
@ -35,23 +36,24 @@ h1, h2, h3, h4, h5, h6, p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h1{
|
||||
color: #3ab7a5;
|
||||
border-bottom: 1px solid #3ab7a5;
|
||||
margin: 30px auto 25px;
|
||||
padding-bottom: 15px;
|
||||
font-size: 25px;
|
||||
h1 {
|
||||
color: #3ab7a5;
|
||||
border-bottom: 1px solid #3ab7a5;
|
||||
margin: 30px auto 25px;
|
||||
padding-bottom: 15px;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
header input{
|
||||
margin-bottom:0;
|
||||
header input {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
button{
|
||||
|
||||
button {
|
||||
border: 1px solid #3ab7a5;
|
||||
padding: 3px 20px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
background-color:#fff;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@ -120,7 +122,7 @@ button{
|
||||
margin-top: 1px;
|
||||
z-index: 99999 !important;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,.1);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
|
||||
border: 1px solid #f9f9f9;
|
||||
}
|
||||
& .rdtOpen .rdtPicker {
|
||||
@ -217,10 +219,10 @@ button{
|
||||
& .rdtNext span {
|
||||
display: block;
|
||||
-webkit-touch-callout: none; /* iOS Safari */
|
||||
-webkit-user-select: none; /* Chrome/Safari/Opera */
|
||||
-khtml-user-select: none; /* Konqueror */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||
-webkit-user-select: none; /* Chrome/Safari/Opera */
|
||||
-khtml-user-select: none; /* Konqueror */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@ -293,10 +295,10 @@ button{
|
||||
display: block;
|
||||
|
||||
-webkit-touch-callout: none; /* iOS Safari */
|
||||
-webkit-user-select: none; /* Chrome/Safari/Opera */
|
||||
-khtml-user-select: none; /* Konqueror */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||
-webkit-user-select: none; /* Chrome/Safari/Opera */
|
||||
-khtml-user-select: none; /* Konqueror */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||
user-select: none;
|
||||
}
|
||||
& .rdtCounter .rdtBtn:hover {
|
||||
|
32
src/index.js
32
src/index.js
@ -1,31 +1,33 @@
|
||||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { Provider } from 'react-redux';
|
||||
import { Router } from 'react-router';
|
||||
import { AppContainer } from 'react-hot-loader'
|
||||
import Root from './root'
|
||||
import registry from './lib/registry';
|
||||
import configureStore from './store/configureStore';
|
||||
import routes from './routing/routes';
|
||||
import history, { syncHistory } from './routing/history';
|
||||
import 'file?name=index.html!../example/index.html';
|
||||
import './index.css';
|
||||
|
||||
const store = configureStore();
|
||||
|
||||
// Create an enhanced history that syncs navigation events with the store
|
||||
syncHistory(store);
|
||||
|
||||
// Create mount element dynamically
|
||||
const el = document.createElement('div');
|
||||
el.id = 'root';
|
||||
document.body.appendChild(el);
|
||||
|
||||
render((
|
||||
<Provider store={store}>
|
||||
<Router history={history}>
|
||||
{routes}
|
||||
</Router>
|
||||
</Provider>
|
||||
<AppContainer>
|
||||
<Root />
|
||||
</AppContainer>
|
||||
), el);
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept('./root', () => {
|
||||
const NextRoot = require('./root').default;
|
||||
render((
|
||||
<AppContainer>
|
||||
<NextRoot />
|
||||
</AppContainer>
|
||||
), el);
|
||||
});
|
||||
}
|
||||
|
||||
window.CMS = {};
|
||||
console.log('reg: ', registry);
|
||||
for (const method in registry) {
|
||||
|
8
src/reducers/combinedReducer.js
Normal file
8
src/reducers/combinedReducer.js
Normal file
@ -0,0 +1,8 @@
|
||||
import { combineReducers } from 'redux';
|
||||
import { routerReducer } from 'react-router-redux';
|
||||
import reducers from '.';
|
||||
|
||||
export default combineReducers({
|
||||
...reducers,
|
||||
routing: routerReducer
|
||||
});
|
21
src/root.js
Normal file
21
src/root.js
Normal file
@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
import { Provider } from 'react-redux';
|
||||
import { Router } from 'react-router';
|
||||
import routes from './routing/routes';
|
||||
import history, { syncHistory } from './routing/history';
|
||||
import configureStore from './store/configureStore';
|
||||
|
||||
const store = configureStore();
|
||||
|
||||
// Create an enhanced history that syncs navigation events with the store
|
||||
syncHistory(store);
|
||||
|
||||
const Root = () => (
|
||||
<Provider store={store}>
|
||||
<Router history={history}>
|
||||
{routes}
|
||||
</Router>
|
||||
</Provider>
|
||||
);
|
||||
|
||||
export default Root;
|
@ -1,18 +1,20 @@
|
||||
import { createStore, applyMiddleware, combineReducers, compose } from 'redux';
|
||||
import { createStore, applyMiddleware, compose } from 'redux';
|
||||
import thunkMiddleware from 'redux-thunk';
|
||||
import { routerReducer } from 'react-router-redux';
|
||||
import reducers from '../reducers';
|
||||
import reducer from '../reducers/combinedReducer';
|
||||
|
||||
const reducer = combineReducers({
|
||||
...reducers,
|
||||
routing: routerReducer
|
||||
});
|
||||
export default function configureStore(initialState) {
|
||||
const store = createStore(reducer, initialState, compose(
|
||||
applyMiddleware(thunkMiddleware),
|
||||
window.devToolsExtension ? window.devToolsExtension() : f => f
|
||||
));
|
||||
|
||||
const createStoreWithMiddleware = compose(
|
||||
applyMiddleware(thunkMiddleware),
|
||||
window.devToolsExtension ? window.devToolsExtension() : (f) => f
|
||||
)(createStore);
|
||||
if (module.hot) {
|
||||
// Enable Webpack hot module replacement for reducers
|
||||
module.hot.accept('../reducers/combinedReducer', () => {
|
||||
const nextReducer = require('../reducers/combinedReducer') // eslint-disable-line
|
||||
store.replaceReducer(nextReducer);
|
||||
});
|
||||
}
|
||||
|
||||
export default (initialState) => (
|
||||
createStoreWithMiddleware(reducer, initialState)
|
||||
);
|
||||
return store;
|
||||
}
|
||||
|
Reference in New Issue
Block a user