home: hide header
This commit is contained in:
parent
a63e39fafc
commit
709067eeaa
@ -6,7 +6,7 @@ import theme from "./theme"
|
|||||||
import Footer from "./footer"
|
import Footer from "./footer"
|
||||||
import flower from "../images/flower.png"
|
import flower from "../images/flower.png"
|
||||||
|
|
||||||
const Layout = ({ location, title, children }) => {
|
const Layout = ({ location, title, children, noHeader }) => {
|
||||||
// const rootPath = `${__PATH_PREFIX__}/`
|
// const rootPath = `${__PATH_PREFIX__}/`
|
||||||
// const isRootPath = location.pathname === rootPath
|
// const isRootPath = location.pathname === rootPath
|
||||||
// let header
|
// let header
|
||||||
@ -29,23 +29,25 @@ const Layout = ({ location, title, children }) => {
|
|||||||
<>
|
<>
|
||||||
<ThemeProvider theme={theme}>
|
<ThemeProvider theme={theme}>
|
||||||
<CssBaseline />
|
<CssBaseline />
|
||||||
<AppBar
|
{!noHeader && (
|
||||||
component="header"
|
<AppBar
|
||||||
color="transparent"
|
component="header"
|
||||||
position="relative"
|
color="transparent"
|
||||||
elevation={0}
|
position="relative"
|
||||||
>
|
elevation={0}
|
||||||
<Toolbar>
|
>
|
||||||
<Link
|
<Toolbar>
|
||||||
underline="hover"
|
<Link
|
||||||
component={GatsbyLink}
|
underline="hover"
|
||||||
to="/"
|
component={GatsbyLink}
|
||||||
sx={{ textTransform: "lowercase" }}
|
to="/"
|
||||||
>
|
sx={{ textTransform: "lowercase" }}
|
||||||
{title}
|
>
|
||||||
</Link>
|
{title}
|
||||||
</Toolbar>
|
</Link>
|
||||||
</AppBar>
|
</Toolbar>
|
||||||
|
</AppBar>
|
||||||
|
)}
|
||||||
<Container maxWidth="lg" sx={{ py: 8 }}>
|
<Container maxWidth="lg" sx={{ py: 8 }}>
|
||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
<Grid item xs={12} md={2}>
|
<Grid item xs={12} md={2}>
|
||||||
|
@ -41,7 +41,7 @@ const BlogIndex = ({ data, location }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout location={location} title={siteTitle}>
|
<Layout location={location} title={siteTitle} noHeader>
|
||||||
<Box py={4}>
|
<Box py={4}>
|
||||||
<Typography
|
<Typography
|
||||||
variant="h1"
|
variant="h1"
|
||||||
|
Loading…
Reference in New Issue
Block a user