Skip to content

Commit

Permalink
[TASK] Change theme color and update icons
Browse files Browse the repository at this point in the history
  • Loading branch information
jannydiamond authored and on3iro committed Feb 25, 2019
1 parent 6748aaf commit 1809457
Show file tree
Hide file tree
Showing 19 changed files with 63 additions and 32 deletions.
Binary file added public/images/android-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/android-icon-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/android-icon-36x36.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/android-icon-48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/android-icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/android-icon-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/android-icon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/favicon.ico
Binary file not shown.
Binary file removed public/images/icons-192.png
Binary file not shown.
Binary file removed public/images/icons-48.png
Binary file not shown.
Binary file removed public/images/icons-512.png
Binary file not shown.
Binary file removed public/images/icons-72.png
Binary file not shown.
Binary file removed public/images/icons-96.png
Binary file not shown.
8 changes: 7 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
name="viewport"
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
>
<meta name="theme-color" content="#000000" />
<!-- pwa icons -->
<link rel="icon" type="image/png" sizes="512x512" href="%PUBLIC_URL%/images/android-icon-512x512.png">
<!-- favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/images/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="%PUBLIC_URL%/images/favicon-96x96.png">
<meta name="theme-color" content="#ffffff" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
Expand Down
26 changes: 18 additions & 8 deletions public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,47 @@
"icons": [
{
"src": "images/favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"sizes": "96x96 64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "images/icons-48.png",
"src": "images/android-icon-36x36.png",
"type": "image/png",
"sizes": "36x36"
},
{
"src": "images/android-icon-48x48.png",
"type": "image/png",
"sizes": "48x48"
},
{
"src": "images/icons-72.png",
"src": "images/android-icon-72x72.png",
"type": "image/png",
"sizes": "78x78"
},
{
"src": "images/icons-96.png",
"src": "images/android-icon-96x96.png",
"type": "image/png",
"sizes": "96x96"
},
{
"src": "images/icons-192.png",
"src": "images/android-icon-144x144.png",
"type": "image/png",
"sizes": "144x144"
},
{
"src": "images/android-icon-192x192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "images/icons-512.png",
"src": "images/android-icon-512x512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#41D0DD",
"background_color": "#41D0DD"
"theme_color": "#2196f3",
"background_color": "#2196f3"
}
61 changes: 38 additions & 23 deletions src/components/App/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ import Content from 'components/Content.jsx'
import TopBar from './TopBar'
import DrawerMenu from './DrawerMenu'

import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles';
import blue from '@material-ui/core/colors/blue';
import pink from '@material-ui/core/colors/pink';

const App = ({ classes, theme }) => {
const App = ({ classes }) => {
const [ drawerIsOpen, setDrawerIsOpen ] = useState(false)
const toggleDrawer = () => setDrawerIsOpen(!drawerIsOpen)

Expand All @@ -34,6 +37,16 @@ const App = ({ classes, theme }) => {
)
const [ configurationOfSets, setSets ] = useState(defaultSets)

const theme = createMuiTheme({
palette: {
primary: blue,
secondary: pink,
},
typography: {
useNextVariants: true,
},
});

// Get sets from indexedDB
useEffect(() => {
getFromDb('sets').then(sets => {
Expand All @@ -44,30 +57,32 @@ const App = ({ classes, theme }) => {
}, [])

return (
<div className={classes.root}>
<CssBaseline />
<TopBar
classes={classes}
drawerIsOpen={drawerIsOpen}
currentLocation={currentLocation}
toggleDrawer={toggleDrawer}
/>
<DrawerMenu
drawerIsOpen={drawerIsOpen}
toggleDrawer={toggleDrawer}
classes={classes}
moveTo={moveTo}
/>
<SetConfigurationContext.Provider value={{ configurationOfSets, setSets, sets: config.DATA.sets }}>
<Content
route={currentLocation}
<MuiThemeProvider theme={theme}>
<div className={classes.root}>
<CssBaseline />
<TopBar
classes={classes}
drawerIsOpen={drawerIsOpen}
currentLocation={currentLocation}
toggleDrawer={toggleDrawer}
/>
<DrawerMenu
drawerIsOpen={drawerIsOpen}
toggleDrawer={toggleDrawer}
classes={classes}
className={classNames(classes.content, {
[classes.contentShift]: drawerIsOpen,
})}
moveTo={moveTo}
/>
</SetConfigurationContext.Provider>
</div>
<SetConfigurationContext.Provider value={{ configurationOfSets, setSets, sets: config.DATA.sets }}>
<Content
route={currentLocation}
classes={classes}
className={classNames(classes.content, {
[classes.contentShift]: drawerIsOpen,
})}
/>
</SetConfigurationContext.Provider>
</div>
</MuiThemeProvider>
);
}

Expand Down

0 comments on commit 1809457

Please sign in to comment.