diff --git a/src/components/Blockly/BlocklyWindow.js b/src/components/Blockly/BlocklyWindow.js index e6dcc1f..e2b21f0 100644 --- a/src/components/Blockly/BlocklyWindow.js +++ b/src/components/Blockly/BlocklyWindow.js @@ -48,7 +48,7 @@ class BlocklyWindow extends Component { colour: '#4EAF47', // senseBox-green snap: false }} - media={'media/'} + media={'/media/'} move={{ // https://developers.google.com/blockly/guides/configure/web/move scrollbars: true, drag: true, diff --git a/src/components/Breadcrumbs.js b/src/components/Breadcrumbs.js index 05501ba..cf41351 100644 --- a/src/components/Breadcrumbs.js +++ b/src/components/Breadcrumbs.js @@ -11,7 +11,7 @@ class MyBreadcrumbs extends Component { this.props.content && this.props.content.length > 1 ? {this.props.content.splice(0, this.props.content.length-1).map((content, i) => ( - + {content.title} ))} diff --git a/src/components/CodeViewer.js b/src/components/CodeViewer.js index aab9167..8477cc0 100644 --- a/src/components/CodeViewer.js +++ b/src/components/CodeViewer.js @@ -75,7 +75,7 @@ class CodeViewer extends Component { var curlyBrackets = '{ }'; var unequal = '<>'; return ( - + {[{text: 'Tutorials', icon: faChalkboardTeacher}, {text: 'Einstellungen', icon: faCog}].map((item, index) => ( - - + + diff --git a/src/components/Tutorial/Tutorial.js b/src/components/Tutorial/Tutorial.js index 9d92492..26a6251 100644 --- a/src/components/Tutorial/Tutorial.js +++ b/src/components/Tutorial/Tutorial.js @@ -3,17 +3,70 @@ import React, { Component } from 'react'; import { withRouter } from 'react-router-dom'; import Breadcrumbs from '../Breadcrumbs'; +import BlocklyWindow from '../Blockly/BlocklyWindow'; +import CodeViewer from '../CodeViewer'; + +import { withStyles } from '@material-ui/core/styles'; +import Tabs from '@material-ui/core/Tabs'; +import Tab from '@material-ui/core/Tab'; +import Grid from '@material-ui/core/Grid'; +import Card from '@material-ui/core/Card'; + +const styles = () => ({ + gridHeight: { + height: 'inherit' + } +}); class Tutorial extends Component { + + state={ + value: 'introduction' + } + + onChange = (e, value) => { + this.setState({ value: value }); + } + render() { return (

Tutorial {this.props.match.params.tutorialId}

+ + + + + +
+ {this.state.value === 'introduction' ? + 'Hier könnte eine Anleitung stehen.': null } + {this.state.value === 'assessment' ? + + + + + + + Hier könnte die Problemstellung stehen. + +
+ +
+
+
+ : null } +
); }; } -export default withRouter(Tutorial); +export default withRouter(withStyles(styles)(Tutorial));