yeungalan 5 years ago
parent
commit
aad1e25855
21 changed files with 77 additions and 5 deletions
  1. 0 0
      photo/node_modules/.cache/babel-loader/07ac62cee4d43d9f7e4a715a0a4ac7c6.json
  2. 0 0
      photo/node_modules/.cache/babel-loader/18ebf4e6a756a9a3a94af81750bea0fe.json
  3. 0 0
      photo/node_modules/.cache/babel-loader/2847b7779eea3ecefbf2f99f4410944f.json
  4. 0 0
      photo/node_modules/.cache/babel-loader/2e2174361cd17a36e912de68f4913a0f.json
  5. 0 0
      photo/node_modules/.cache/babel-loader/3ef0a2e4e446c3c51ecc12a49c474808.json
  6. 0 0
      photo/node_modules/.cache/babel-loader/57ee4df69b12c68e88b94c65fa4b09d5.json
  7. 0 0
      photo/node_modules/.cache/babel-loader/99ac4dc786d8fc2033c9fd83c92842a5.json
  8. 0 0
      photo/node_modules/.cache/babel-loader/ea09ece81a1032ae0cb301b75d2f62d9.json
  9. 0 0
      photo/node_modules/.cache/babel-loader/f95062c5c7e0f2ae92f88617b6e90e0e.json
  10. BIN
      photo/node_modules/.cache/eslint-loader/0cfa78bc4e9893e10e8e42a547d14773fa163d18.json.gz
  11. BIN
      photo/node_modules/.cache/eslint-loader/104dfbcaa3e55f4955bb7565e77103e22c79eb20.json.gz
  12. BIN
      photo/node_modules/.cache/eslint-loader/18390d5de066a9ad483926129df685c675545f75.json.gz
  13. BIN
      photo/node_modules/.cache/eslint-loader/212cca01c3d944c65a2f4c2a4273a7ef6121043c.json.gz
  14. BIN
      photo/node_modules/.cache/eslint-loader/71391e3e6ce9d6890922e83695b6870610ac7ebe.json.gz
  15. BIN
      photo/node_modules/.cache/eslint-loader/8b979cad80ab18dc71da39db7c0c0fc7fa2937e3.json.gz
  16. BIN
      photo/node_modules/.cache/eslint-loader/a488b5760fbe97c5ac699e49a6b0aa57c33a45f6.json.gz
  17. BIN
      photo/node_modules/.cache/eslint-loader/dccb145a3b50af998536555cbeb18a3a8d95dabb.json.gz
  18. BIN
      photo/node_modules/.cache/eslint-loader/f2bbe3622018cc78cfd8dd96f4ee5cd38f16e4b1.json.gz
  19. BIN
      photo/node_modules/.cache/eslint-loader/fe12eb52ce26bd7ab91385420e70eb8ffd41bd3f.json.gz
  20. 1 1
      photo/src/index.js
  21. 76 4
      photo/src/testM.js

File diff suppressed because it is too large
+ 0 - 0
photo/node_modules/.cache/babel-loader/07ac62cee4d43d9f7e4a715a0a4ac7c6.json


File diff suppressed because it is too large
+ 0 - 0
photo/node_modules/.cache/babel-loader/18ebf4e6a756a9a3a94af81750bea0fe.json


File diff suppressed because it is too large
+ 0 - 0
photo/node_modules/.cache/babel-loader/2847b7779eea3ecefbf2f99f4410944f.json


File diff suppressed because it is too large
+ 0 - 0
photo/node_modules/.cache/babel-loader/2e2174361cd17a36e912de68f4913a0f.json


File diff suppressed because it is too large
+ 0 - 0
photo/node_modules/.cache/babel-loader/3ef0a2e4e446c3c51ecc12a49c474808.json


File diff suppressed because it is too large
+ 0 - 0
photo/node_modules/.cache/babel-loader/57ee4df69b12c68e88b94c65fa4b09d5.json


File diff suppressed because it is too large
+ 0 - 0
photo/node_modules/.cache/babel-loader/99ac4dc786d8fc2033c9fd83c92842a5.json


File diff suppressed because it is too large
+ 0 - 0
photo/node_modules/.cache/babel-loader/ea09ece81a1032ae0cb301b75d2f62d9.json


File diff suppressed because it is too large
+ 0 - 0
photo/node_modules/.cache/babel-loader/f95062c5c7e0f2ae92f88617b6e90e0e.json


BIN
photo/node_modules/.cache/eslint-loader/0cfa78bc4e9893e10e8e42a547d14773fa163d18.json.gz


BIN
photo/node_modules/.cache/eslint-loader/104dfbcaa3e55f4955bb7565e77103e22c79eb20.json.gz


BIN
photo/node_modules/.cache/eslint-loader/18390d5de066a9ad483926129df685c675545f75.json.gz


BIN
photo/node_modules/.cache/eslint-loader/212cca01c3d944c65a2f4c2a4273a7ef6121043c.json.gz


BIN
photo/node_modules/.cache/eslint-loader/71391e3e6ce9d6890922e83695b6870610ac7ebe.json.gz


BIN
photo/node_modules/.cache/eslint-loader/8b979cad80ab18dc71da39db7c0c0fc7fa2937e3.json.gz


BIN
photo/node_modules/.cache/eslint-loader/a488b5760fbe97c5ac699e49a6b0aa57c33a45f6.json.gz


BIN
photo/node_modules/.cache/eslint-loader/dccb145a3b50af998536555cbeb18a3a8d95dabb.json.gz


BIN
photo/node_modules/.cache/eslint-loader/f2bbe3622018cc78cfd8dd96f4ee5cd38f16e4b1.json.gz


BIN
photo/node_modules/.cache/eslint-loader/fe12eb52ce26bd7ab91385420e70eb8ffd41bd3f.json.gz


+ 1 - 1
photo/src/index.js

@@ -8,7 +8,7 @@ import ButtonAppBar from './testM';
 ReactDOM.render( <
     div >
     <
-    SearchAppBar / >
+    ButtonAppBar / >
     <
     App / >
     <

+ 76 - 4
photo/src/testM.js

@@ -25,6 +25,8 @@ import PhotoAlbumIcon from '@material-ui/icons/PhotoAlbum';
 import LibraryAddCheckIcon from '@material-ui/icons/LibraryAddCheck';
 import Grid from '@material-ui/core/Grid';
 
+const drawerWidth = 240;
+
 const useStyles = makeStyles((theme) => ({
     root: {
         flexGrow: 1,
@@ -43,6 +45,65 @@ const useStyles = makeStyles((theme) => ({
         // necessary for content to be below app bar
         ...theme.mixins.toolbar,
     },
+    root: {
+        display: 'flex',
+    },
+    appBar: {
+        zIndex: theme.zIndex.drawer + 1,
+        transition: theme.transitions.create(['width', 'margin'], {
+            easing: theme.transitions.easing.sharp,
+            duration: theme.transitions.duration.leavingScreen,
+        }),
+    },
+    appBarShift: {
+        marginLeft: drawerWidth,
+        width: `calc(100% - ${drawerWidth}px)`,
+        transition: theme.transitions.create(['width', 'margin'], {
+            easing: theme.transitions.easing.sharp,
+            duration: theme.transitions.duration.enteringScreen,
+        }),
+    },
+    menuButton: {
+        marginRight: 36,
+    },
+    hide: {
+        display: 'none',
+    },
+    drawer: {
+        width: drawerWidth,
+        flexShrink: 0,
+        whiteSpace: 'nowrap',
+    },
+    drawerOpen: {
+        width: drawerWidth,
+        transition: theme.transitions.create('width', {
+            easing: theme.transitions.easing.sharp,
+            duration: theme.transitions.duration.enteringScreen,
+        }),
+    },
+    drawerClose: {
+        transition: theme.transitions.create('width', {
+            easing: theme.transitions.easing.sharp,
+            duration: theme.transitions.duration.leavingScreen,
+        }),
+        overflowX: 'hidden',
+        width: theme.spacing(7) + 1,
+        [theme.breakpoints.up('sm')]: {
+            width: theme.spacing(9) + 1,
+        },
+    },
+    toolbar: {
+        display: 'flex',
+        alignItems: 'center',
+        justifyContent: 'flex-end',
+        padding: theme.spacing(0, 1),
+        // necessary for content to be below app bar
+        ...theme.mixins.toolbar,
+    },
+    content: {
+        flexGrow: 1,
+        padding: theme.spacing(3),
+    },
 }));
 
 export default function ButtonAppBar() {
@@ -59,12 +120,24 @@ export default function ButtonAppBar() {
     };
 
     return ( <
-        div className = { classes.toolbar } >
+        div className = { classes.root } >
         <
-        AppBar position = "static" >
+        AppBar position = "fixed" >
         <
         Toolbar >
         <
+        IconButton color = "inherit"
+        onClick = { handleDrawerOpen }
+        edge = "start"
+        className = {
+            clsx(classes.menuButton, {
+                [classes.hide]: open,
+            })
+        } >
+        <
+        MenuIcon / >
+        <
+        /IconButton>  <
         IconButton edge = "start"
         className = { classes.menuButton }
         color = "inherit" >
@@ -78,8 +151,7 @@ export default function ButtonAppBar() {
         /Typography> <
         Button color = "inherit" > Login < /Button> < /
         Toolbar > <
-        /AppBar>       <Drawer
-        variant = "permanent"
+        /AppBar> < Drawer variant = "permanent"
         className = {
             clsx(classes.drawer, {
                 [classes.drawerOpen]: open,

Some files were not shown because too many files changed in this diff