Skip to content

Commit

Permalink
AppBar.js and Foot.s made to look like https://material-ui.com/gettin…
Browse files Browse the repository at this point in the history
  • Loading branch information
olavea committed Nov 26, 2019
1 parent c8fb9d5 commit a2b0e1d
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 3 deletions.
51 changes: 51 additions & 0 deletions src/components/AppBar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import React from "react"
import AppBar from "@material-ui/core/AppBar"
import { Button } from "@material-ui/core"

// import CameraIcon from '@material-ui/icons/PhotoCamera';
import AccountCircleIcon from "@material-ui/icons/AccountCircle"

import Card from "@material-ui/core/Card"
import CardActions from "@material-ui/core/CardActions"
import CardContent from "@material-ui/core/CardContent"
import CardMedia from "@material-ui/core/CardMedia"
import Link from "@material-ui/core/Link"

import Typography from "@material-ui/core/Typography"
import Toolbar from "@material-ui/core/Toolbar"

import { makeStyles } from "@material-ui/core/styles"
const useStyles = makeStyles(theme => ({
icon: {
marginRight: theme.spacing(2),
},
link: {
marginRight: theme.spacing(2),
},
}))

const QuotesUnit = () => {
const classes = useStyles()
const preventDefault = event => event.preventDefault()
return (
<div>
<AppBar position="relative">
<Toolbar>
<AccountCircleIcon className={classes.icon} />
<Typography variant="h6" color="inherit" noWrap>
<Link className={classes.link} href="/" color="inherit">
useAuth
</Link>
<Link className={classes.link} href="/docs/" color="inherit">
docs
</Link>
</Typography>
</Toolbar>
</AppBar>
</div>
)
}

export default QuotesUnit

//onClick={preventDefault}
61 changes: 61 additions & 0 deletions src/components/FooterUnit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import React from "react"
import AppBar from "@material-ui/core/AppBar"
import { Button } from "@material-ui/core"

// import CameraIcon from '@material-ui/icons/PhotoCamera';
import AccountCircleIcon from "@material-ui/icons/AccountCircle"

import Card from "@material-ui/core/Card"
import CardActions from "@material-ui/core/CardActions"
import CardContent from "@material-ui/core/CardContent"
import CardMedia from "@material-ui/core/CardMedia"
import Link from "@material-ui/core/Link"

import Typography from "@material-ui/core/Typography"
import Toolbar from "@material-ui/core/Toolbar"

import { makeStyles } from "@material-ui/core/styles"

function Copyright() {
return (
<Typography variant="body2" color="textSecondary" align="center">
{"Copyright © "}
<Link color="inherit" href="https://material-ui.com/">
useAuth Swizec
</Link>{" "}
{new Date().getFullYear()}
{"."}
</Typography>
)
}

const useStyles = makeStyles(theme => ({
icon: {
marginRight: theme.spacing(2),
},
link: {
marginRight: theme.spacing(2),
},
}))

const FooterUnit = () => {
const classes = useStyles()
const preventDefault = event => event.preventDefault()
return (
<div>
{" "}
<footer className={classes.footer}>
<Typography variant="h6" align="center" gutterBottom></Typography>
<Typography
variant="subtitle1"
align="center"
color="textSecondary"
component="p"
></Typography>
<Copyright />
</footer>
</div>
)
}

export default FooterUnit
11 changes: 8 additions & 3 deletions src/pages/docs.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import React from "react"
import { Link } from "gatsby"

import AppBar from "../components/AppBar"
import HowUnit from "../components/HowUnit"
import FooterUnit from "../components/FooterUnit"
const docs = () => {
return (
<div>
<div>How useAuth?</div>
<div>
<Link to="/">Front Page</Link>
<AppBar />
</div>
<HowUnit />
<div>
<FooterUnit />
</div>
</div>
)
Expand Down
8 changes: 8 additions & 0 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ import HeroUnit from "../components/HeroUnit"
import AntiHeroUnit from "../components/AntiHeroUnit"
import HowUnit from "../components/HowUnit"
import QuotesUnit from "../components/QuotesUnit"
import AppBar from "../components/AppBar"
import FooterUnit from "../components/FooterUnit"

const Index = () => {
return (
<div>
<div>
<AppBar />
</div>
<div>
<HeroUnit />
</div>
Expand All @@ -19,6 +24,9 @@ const Index = () => {
<div>
<QuotesUnit />
</div>
<div>
<FooterUnit />
</div>
</div>
)
}
Expand Down

0 comments on commit a2b0e1d

Please sign in to comment.