Removes #content from sidebar links and from within pages (#170)

This commit is contained in:
Eric Nakagawa 2017-10-24 15:15:52 -07:00 committed by Joel Marcey
parent c2243a3c20
commit 867a49dd1c
3 changed files with 21 additions and 30 deletions

View file

@ -19,18 +19,14 @@ const BlogPageLayout = React.createClass({
if (page > 0) {
url += "page" + (page + 1) + "/";
}
return url + "#content";
return url;
},
render() {
const perPage = this.props.metadata.perPage;
const page = this.props.metadata.page;
return (
<Site
title="Blog"
language="en"
config={this.props.config}
>
<Site title="Blog" language="en" config={this.props.config}>
<div className="docMainWrapper wrapper">
<BlogSidebar
language={this.props.language}
@ -53,14 +49,16 @@ const BlogPageLayout = React.createClass({
);
})}
<div className="docs-prevnext">
{page > 0 &&
{page > 0 && (
<a className="docs-prev" href={this.getPageURL(page - 1)}>
Prev
</a>}
{MetadataBlog.length > (page + 1) * perPage &&
</a>
)}
{MetadataBlog.length > (page + 1) * perPage && (
<a className="docs-next" href={this.getPageURL(page + 1)}>
Next
</a>}
</a>
)}
</div>
</div>
</Container>