forked from CmoaToto/android-makers-2019
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add initial code for hero block * Add hero reducer * Remove .vscode settings * Add .vscode folder to .gitignore * Replace bower and npm with yarn for travis * Fix route reducer * Update header * Add hero reducer * Update hero * Add support of gradient for hero background. Make adaptive height of a hero * Add missing files to previous commit * Try to fix travis build * One more try on travis * Add one more try * Fix uiReducer. Update header layout on hero change
- Loading branch information
Showing
23 changed files
with
827 additions
and
343 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"projects": { | ||
"dev": "hoverboard-dev" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ node_modules | |
build | ||
.idea/ | ||
.temp/ | ||
.vscode/ |
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
This file was deleted.
Oops, something went wrong.
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const uiActions = { | ||
toggleDrawer: (value = null) => { | ||
store.dispatch({ | ||
type: TOGGLE_DRAWER, | ||
value | ||
}); | ||
} | ||
}; | ||
|
||
const routeActions = { | ||
setRoute: routeFromAction => { | ||
const route = routeFromAction || 'home'; | ||
store.dispatch({ | ||
type: SET_ROUTE, | ||
route | ||
}); | ||
store.dispatch({ | ||
type: SET_HERO, | ||
hero: heroSettings[route] | ||
}); | ||
} | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const TOGGLE_DRAWER = 'TOGGLE_DRAWER'; | ||
const SET_ROUTE = 'SET_ROUTE'; | ||
const SET_HERO = 'SET_HERO'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const uiReducer = (state = initialState.ui, action) => { | ||
switch (action.type) { | ||
case TOGGLE_DRAWER: | ||
return Object.assign({}, state, { | ||
isDrawerOpened: action.value || !state.isDrawerOpened | ||
}); | ||
default: | ||
return state; | ||
} | ||
}; | ||
|
||
const routeReducer = (state = initialState.route, action) => { | ||
switch (action.type) { | ||
case SET_ROUTE: | ||
return action.route; | ||
default: | ||
return state; | ||
} | ||
}; | ||
|
||
|
||
const heroReducer = (state = initialState.hero, action) => { | ||
switch (action.type) { | ||
case SET_HERO: | ||
return action.hero; | ||
default: | ||
return state; | ||
} | ||
}; |
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
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
Oops, something went wrong.