Begin implementing new website

This commit is contained in:
Niklas von Hertzen
2017-12-09 17:47:25 +08:00
parent b239937e00
commit 13e80cc635
18 changed files with 13017 additions and 1 deletions

47
www/src/templates/docs.js Normal file
View File

@@ -0,0 +1,47 @@
import React from 'react';
export default ({data}) => {
const post = data.markdownRemark;
return (
<div>
<div
style={{
marginLeft: '300px',
background: '#01579b',
marginBottom: '1.45rem',
color: '#fff'
}}
>
{' '}<div css={{width: '85%', margin: '0 auto'}}>
<h1 css={{padding: '20px 0'}}>
{post.frontmatter.title}
</h1>
</div>
</div>
<div
style={{
margin: '0 auto',
maxWidth: 960,
marginLeft: '300px',
paddingTop: 0
}}
>
<div
css={{width: '85%', margin: '0 auto'}}
dangerouslySetInnerHTML={{__html: post.html}}
/>
</div>
</div>
);
};
export const query = graphql`
query DocsQuery($slug: String!) {
markdownRemark(fields: {slug: {eq: $slug}}) {
html
frontmatter {
title
}
}
}
`;