Hide Side Bar
This commit is contained in:
parent
cf2a32caff
commit
1ef445d9d4
@ -25,8 +25,8 @@ export default function Layout({ children, home }) {
|
|||||||
//if (isOpen){sidebarEl.classList.add("open"); sidebarEl.classList.remove("close");}
|
//if (isOpen){sidebarEl.classList.add("open"); sidebarEl.classList.remove("close");}
|
||||||
//else {sidebarEl.classList.remove("open"); sidebarEl.classList.add("close")}
|
//else {sidebarEl.classList.remove("open"); sidebarEl.classList.add("close")}
|
||||||
|
|
||||||
if (isOpen){sidebarEl.style.left = sidebarposition;}
|
// if (isOpen){sidebarEl.style.left = sidebarposition;}
|
||||||
else {sidebarEl.style.left = sidebarposition;}
|
// else {sidebarEl.style.left = sidebarposition;}
|
||||||
|
|
||||||
},[isOpen])
|
},[isOpen])
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ class MyDocument extends Document {
|
|||||||
static async getInitialProps(ctx) {
|
static async getInitialProps(ctx) {
|
||||||
const initialProps = await Document.getInitialProps(ctx)
|
const initialProps = await Document.getInitialProps(ctx)
|
||||||
//console.log("doc", initialProps)
|
//console.log("doc", initialProps)
|
||||||
const sidebar = getSinglePost("sidebar")
|
|
||||||
return { sidebar, ...initialProps }
|
return { ...initialProps }
|
||||||
}
|
}
|
||||||
|
|
||||||
render(props) {
|
render(props) {
|
||||||
@ -45,16 +45,7 @@ class MyDocument extends Document {
|
|||||||
|
|
||||||
|
|
||||||
<section className="section">
|
<section className="section">
|
||||||
{/* SIDEBAR */}
|
|
||||||
<div
|
|
||||||
data-w-id="71d5791f-856a-b6c4-e8ee-0ab2729e1de3"
|
|
||||||
className="sidebar"
|
|
||||||
id="sidebar"
|
|
||||||
|
|
||||||
>
|
|
||||||
<div dangerouslySetInnerHTML={{__html:this.props.sidebar.data}} />
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* CONTENT */}
|
{/* CONTENT */}
|
||||||
<main className="main parent-main" id="main">
|
<main className="main parent-main" id="main">
|
||||||
@ -70,11 +61,11 @@ class MyDocument extends Document {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getStaticProps() {
|
export function getStaticProps() {
|
||||||
const sidebarData = getSinglePost("sidebar.md");
|
// const sidebarData = getSinglePost("sidebar.md");
|
||||||
console.log("index response: ", contentData, sidebarData)
|
console.log("index response: ", contentData, sidebarData)
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
sidebar:sidebarData
|
// sidebar:sidebarData
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user