-
Notifications
You must be signed in to change notification settings - Fork 0
/
layout.js
73 lines (67 loc) · 2 KB
/
layout.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import * as React from "react"
import {useStaticQuery, graphql} from "gatsby"
import NavBar from "./structure/nav";
import Logos from "./structure/logos";
import Footer from "./structure/footer";
import BackToTop from 'react-back-to-top';
import CookieConsent from '../services/cookieconsent';
import "./layout.css"
const Layout = ({children}) => {
const data = useStaticQuery(graphql`
query SiteTitleQuery {
site {
siteMetadata {
title
menuLinks {
name
link
id
}
footerLinks {
name
link
id
}
}
}
}
`)
return (
<>
<NavBar menuLinks={data.site.siteMetadata.menuLinks} siteTitle={data.site.siteMetadata.title}/>
<div style={{ margin: `0 auto`}} >
<main>
{children}
</main>
</div>
<Logos style={{
margin: `0 auto`,
width: '100%',
}}/>
<Footer siteTitle={data.site.siteMetadata.title} footerLinks={data.site.siteMetadata.footerLinks} style={{
margin: `0 auto`,
width: '100%',
}}/>
<BackToTop
mainStyle={{
width: '100%',
height: '100%',
backgroundColor: '#2f0520',
color: 'white'
}}
percentStyle={{
width: '100%',
height: '100%',
display: 'none'
}}
animate='rotate'
offsetTop={20}
step={50}
percent={false}
visiblePercent={50}
/>
<CookieConsent/>
</>
)
}
export default Layout