From 279692ce6f13f4e8ef97cabf35f8c59fedab5c1f Mon Sep 17 00:00:00 2001 From: Sergey Yarkov Date: Wed, 10 Jun 2020 22:27:01 +0300 Subject: [PATCH] frontend startup --- client/public/manifest.json | 22 +-- .../components/DrawerContent/DrawerContent.js | 6 +- client/src/components/Header/Header.js | 6 +- client/src/components/Main/Main.js | 132 ++++++------------ client/src/index.js | 4 +- client/src/theme.js | 3 + 6 files changed, 54 insertions(+), 119 deletions(-) diff --git a/client/public/manifest.json b/client/public/manifest.json index 080d6c7..b0be9df 100644 --- a/client/public/manifest.json +++ b/client/public/manifest.json @@ -1,23 +1,7 @@ { - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], + "short_name": "Todo App", + "name": "Todo App", + "icons": [], "start_url": ".", "display": "standalone", "theme_color": "#000000", diff --git a/client/src/components/DrawerContent/DrawerContent.js b/client/src/components/DrawerContent/DrawerContent.js index 383490c..f4ec7d0 100644 --- a/client/src/components/DrawerContent/DrawerContent.js +++ b/client/src/components/DrawerContent/DrawerContent.js @@ -22,13 +22,13 @@ const useStyles = makeStyles((theme) => ({ const Drawer = () => { const classes = useStyles() const [selectedIndex, setSelectedIndex] = React.useState(0) - const [isListOpen, setListOpen] = React.useState(false) + const [isListOpen, setIsListOpen] = React.useState(false) const listItemSelectedHandler = (e, index) => { setSelectedIndex(index) - if (index === 1) setListOpen(!isListOpen) + if (index === 1) setIsListOpen(!isListOpen) } - + return ( <>
diff --git a/client/src/components/Header/Header.js b/client/src/components/Header/Header.js index a489cd1..58c78bf 100644 --- a/client/src/components/Header/Header.js +++ b/client/src/components/Header/Header.js @@ -39,11 +39,9 @@ const useStyles = makeStyles((theme) => ({ }, })); -const Header = (props) => { - const { window } = props; +const Header = ({ window }) => { const classes = useStyles(); const theme = useTheme(); - const [mobileOpen, setMobileOpen] = React.useState(false); const handleDrawerToggle = () => { @@ -66,7 +64,7 @@ const Header = (props) => { - Todo app + Список дел diff --git a/client/src/components/Main/Main.js b/client/src/components/Main/Main.js index b8b8a64..a06700c 100644 --- a/client/src/components/Main/Main.js +++ b/client/src/components/Main/Main.js @@ -2,16 +2,37 @@ import React from 'react'; import Card from '@material-ui/core/Card'; import CardActions from '@material-ui/core/CardActions'; import CardContent from '@material-ui/core/CardContent'; -import Button from '@material-ui/core/Button'; import Typography from '@material-ui/core/Typography' -import { makeStyles } from '@material-ui/core/styles' import Grid from '@material-ui/core/Grid' import Fab from '@material-ui/core/Fab'; import AddIcon from '@material-ui/icons/Add'; +import DeleteIcon from '@material-ui/icons/Delete' +import IconButton from '@material-ui/core/IconButton' +import AlarmIcon from '@material-ui/icons/Alarm'; +import EditIcon from '@material-ui/icons/Edit'; +import { makeStyles } from '@material-ui/core/styles' const useStyles = makeStyles((theme) => ({ + alarmIcon: { + marginRight: 10 + }, card: { - margin: 10 + margin: 10, + }, + cardActions: { + justifyContent: 'flex-end' + }, + cardHeading: { + marginBottom: 10 + }, + cardCategoryHeading: { + display: 'flex', + justifyContent: 'space-between', + fontSize: 14 + }, + cardAlarm: { + display: 'flex', + alignItems: 'center' }, fab: { position: 'fixed', @@ -29,9 +50,6 @@ const useStyles = makeStyles((theme) => ({ margin: '0 2px', transform: 'scale(0.8)', }, - title: { - fontSize: 14, - }, pos: { marginBottom: 12, }, @@ -39,103 +57,37 @@ const useStyles = makeStyles((theme) => ({ const Main = () => { const classes = useStyles() - const bull = •; return (
- - + + - - Word of the Day + + Категория 1 + + + 18:00 + - - be{bull}nev{bull}o{bull}lent - - - adjective + + Todo 1 - well meaning and kindly. -
- {'"a benevolent smile"'} + But I must explain to you how all this mistaken idea of denouncing pleasure and praising.
- - - -
-
- - - - - Word of the Day - - - be{bull}nev{bull}o{bull}lent - - - adjective - - - well meaning and kindly. -
- {'"a benevolent smile"'} -
-
- - - -
-
- - - - - Word of the Day - - - be{bull}nev{bull}o{bull}lent - - - adjective - - - well meaning and kindly. -
- {'"a benevolent smile"'} -
-
- - - -
-
- - - - - Word of the Day - - - be{bull}nev{bull}o{bull}lent - - - adjective - - - well meaning and kindly. -
- {'"a benevolent smile"'} -
-
- - + + + + + + +
diff --git a/client/src/index.js b/client/src/index.js index ceedeb0..90bdefc 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -6,11 +6,9 @@ import theme from './theme'; import * as serviceWorker from './serviceWorker'; ReactDOM.render( - - - , + , document.getElementById('root') ); diff --git a/client/src/theme.js b/client/src/theme.js index 60f6f59..e530c6b 100644 --- a/client/src/theme.js +++ b/client/src/theme.js @@ -17,6 +17,9 @@ const theme = createMuiTheme({ h2: { fontSize: 30 }, + body1: { + fontSize: 14 + } }, });