Skip to content

Commit

Permalink
Fix gatsby website home page
Browse files Browse the repository at this point in the history
  • Loading branch information
Ib Green committed Aug 6, 2019
1 parent bc08b5a commit 63fb26a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
2 changes: 2 additions & 0 deletions website-gatsby/ocular-config.js
Expand Up @@ -93,6 +93,8 @@ module.exports = {

ADDITIONAL_LINKS: [],

INDEX_PAGE_URL: resolve(__dirname, './templates/index.jsx'),

EXAMPLES: [
// {
// title: 'Instancing',
Expand Down
4 changes: 3 additions & 1 deletion website-gatsby/templates/core/example-instancing.jsx
Expand Up @@ -4,8 +4,10 @@ import AnimationLoop from '../../../examples/core/instancing/app';

export default class Example extends React.Component {
render() {
const { pageContext } = this.props;
const exampleConfig = (pageContext && pageContext.exampleConfig) || {};
return (
<AnimationLoopExamplePage AnimationLoop={AnimationLoop} exampleConfig={this.props.pageContext.exampleConfig} />
<AnimationLoopExamplePage AnimationLoop={AnimationLoop} exampleConfig={exampleConfig} />
);
}
}
15 changes: 15 additions & 0 deletions website-gatsby/templates/index.jsx
@@ -0,0 +1,15 @@
import React from 'react';
import {Home} from 'ocular-gatsby/components';
import './style.css';

if (typeof window !== 'undefined') {
window.website = true;
}

const HeroExample = require('./core/example-instancing').default;

export default class IndexPage extends React.Component {
render() {
return <Home HeroExample={HeroExample} />;
}
}
7 changes: 7 additions & 0 deletions website-gatsby/templates/style.css
@@ -0,0 +1,7 @@
.banner .container {
background: rgba(0, 0, 0, 0);
}

.banner .hero .options-panel {
display: none;
}

0 comments on commit 63fb26a

Please sign in to comment.