Skip to content

Commit

Permalink
fixed more issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tahnik committed Sep 7, 2017
1 parent b742199 commit f46c9b8
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 36 deletions.
6 changes: 0 additions & 6 deletions client/res/scss/home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@
text-align: center;
}
button {
background-color: $color3;
font-size: 1rem;
&:hover {
background-color: $color4;
}
}
}
ul {
Expand All @@ -32,14 +28,12 @@
li {
margin: 0.5rem 0;
button {
background-color: $color1;
width: 100%;
font-size: 1.5rem;
transition: all 0.3s;
text-transform: capitalize;
&:hover {
cursor: pointer;
background-color: $color2;
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions client/res/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ h1 {

button {
font-family: 'Roboto', sans-serif;
background-color: $color1;
font-weight: 300;
border: none;
outline:none;
Expand All @@ -27,6 +28,7 @@ button {
transition: all 0.3s;
&:hover {
cursor: pointer;
background-color: $color2;
}
}

Expand Down
22 changes: 11 additions & 11 deletions client/res/scss/palette.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* Coolors Exported Palette - coolors.co/a62639-db324d-12355b-420039-ffffff */
/* Coolors Exported Palette - coolors.co/03b5aa-037971-023436-00bfb3-049a8f */

/* HSL */
$color1: hsla(351%, 63%, 40%, 1);
$color2: hsla(350%, 70%, 53%, 1);
$color3: hsla(211%, 67%, 21%, 1);
$color4: hsla(308%, 100%, 13%, 1);
$color5: hsla(0%, 0%, 100%, 1);
$color1: hsla(176%, 97%, 36%, 1);
$color2: hsla(176%, 95%, 24%, 1);
$color3: hsla(182%, 93%, 11%, 1);
$color4: hsla(176%, 100%, 37%, 1);
$color5: hsla(176%, 95%, 31%, 1);

/* RGB */
$color1: rgba(166, 38, 57, 1);
$color2: rgba(219, 50, 77, 1);
$color3: rgba(18, 53, 91, 1);
$color4: rgba(63, 98, 137, 1);
$color5: rgba(255, 255, 255, 1);
$color1: rgba(3, 181, 170, 1);
$color2: rgba(3, 121, 113, 1);
$color3: rgba(2, 52, 54, 1);
$color4: rgba(0, 191, 179, 1);
$color5: rgba(4, 154, 143, 1);
4 changes: 0 additions & 4 deletions client/res/scss/view_item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
text-align: center;
}
button {
background-color: $color3;
font-size: 1rem;
&:hover {
background-color: $color4;
}
}
}
12 changes: 7 additions & 5 deletions client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ const render = (Component) => {

render(App);

module.hot.accept('./app', () => {
// eslint-disable-next-line
const nextApp = require('./app').default;
render(nextApp);
});
if (module.hot) {
module.hot.accept('./app', () => {
// eslint-disable-next-line
const nextApp = require('./app').default;
render(nextApp);
});
}

// module.hot.accept('./reducers', () => {
// // eslint-disable-next-line
Expand Down
8 changes: 4 additions & 4 deletions client/src/reducers/list.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import LIST_ITEMS from '../consts/list_items';
import { LIST_ACTIONS } from '../consts/action_types';
import { LISTS } from '../consts/default_state';

export default (state = LISTS, action) => {
switch (action.type) {
case LIST_ACTIONS.ITEM_PREVIEW:
return { ...state, itemPreview: LIST_ITEMS[action.name.toUpperCase()] };
return { ...state, itemPreview: state.items[action.name.toUpperCase()] };
case LIST_ACTIONS.ITEM_VIEW:
return { ...state, itemView: LIST_ITEMS[action.name.toUpperCase()] };
return { ...state, itemView: state.items[action.name.toUpperCase()] };
case LIST_ACTIONS.ITEM_CLEAR:
return { ...state, itemView: null };
case LIST_ACTIONS.ITEM_ADD: {
const nextItems = { ...state.items };
const itemToAdd = action.item;
nextItems[itemToAdd.name.toUpperCase()] = itemToAdd;
return { ...state, items: nextItems };
const returnVal = { ...state, items: nextItems };
return returnVal;
}
default:
return state;
Expand Down
2 changes: 1 addition & 1 deletion server/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ app.set('view engine', 'ejs');

app.use(express.static('public'));

app.use('/', ssr);
app.use('/*', ssr);

app.listen(3000, () => {
console.log('Hello World listening on port 3000!');
Expand Down
2 changes: 1 addition & 1 deletion server/routes/ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ router.get('/', (req, res) => {
store.dispatch({
type: LIST_ACTIONS.ITEM_ADD,
item: {
name: 'Middleware',
name: 'middleware',
description: `Redux middleware solves different problems than Express or Koa middleware, but in a conceptually similar way.
It provides a third-party extension point between dispatching an action, and the moment it reaches the reducer.`,
},
Expand Down
2 changes: 1 addition & 1 deletion server/views/index.dev.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<body>
<div id="reactbody">
</div>
<script src="js/index.js"></script>
<script src="/js/index.js"></script>
</body>

</html>
4 changes: 2 additions & 2 deletions server/views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<meta name="site" content="https://www.example.com" />
<meta name="distribution" content="global" />
<meta name="Copyright" content="" />

<meta name="theme-color" content="#0e5354" />
<link rel="stylesheet" href="/css/main.css" />
</head>

<body>
Expand All @@ -31,7 +31,7 @@
<script>
window.__INITIAL_STATE__ = <%- script %>
</script>
<script src="js/index.js"></script>
<script src="/js/index.js"></script>
</body>

</html>
1 change: 0 additions & 1 deletion webpack/client.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module.exports = {
},
devServer: {
hot: true,
contentBase: path.join(__dirname, '../server/public'),
publicPath: '/',
historyApiFallback: true
},
Expand Down

0 comments on commit f46c9b8

Please sign in to comment.