layout tutorial builder

This commit is contained in:
Delucse 2020-09-20 13:59:42 +02:00
parent fc1b898c80
commit 812c01d6bc
5 changed files with 9 additions and 7 deletions

View File

@ -82,10 +82,9 @@ class BlocklyExample extends Component {
render() { render() {
moment.locale('de', localization); moment.locale('de', localization);
return ( return (
<div style={{marginBottom: '10px'}}> <div style={{marginBottom: '10px', padding: '18.5px 14px', borderRadius: '25px', border: '1px solid lightgrey', width: 'calc(100% - 28px)'}}>
{!this.props.task ? {!this.props.task ?
<FormControlLabel <FormControlLabel
style={{margin: 0}}
labelPlacement="end" labelPlacement="end"
label={"Blockly Beispiel"} label={"Blockly Beispiel"}
control={ control={

View File

@ -138,8 +138,9 @@ class Builder extends Component {
)} )}
{/*submit or reset*/} {/*submit or reset*/}
<Button style={{marginRight: '10px'}} variant='contained' color='primary' onClick={() => this.submit()}>Tutorial-Vorlage erstellen</Button> <Divider variant='fullWidth' style={{margin: '30px 0 10px 0'}}/>
<Button variant='contained' onClick={() => this.reset()}>Zurücksetzen</Button> <Button style={{marginRight: '10px', marginTop: '10px'}} variant='contained' color='primary' onClick={() => this.submit()}>Tutorial-Vorlage erstellen</Button>
<Button style={{marginTop: '10px'}} variant='contained' onClick={() => this.reset()}>Zurücksetzen</Button>
<Backdrop className={this.props.classes.backdrop} open={this.props.isProgress}> <Backdrop className={this.props.classes.backdrop} open={this.props.isProgress}>
<CircularProgress color="inherit" /> <CircularProgress color="inherit" />

View File

@ -12,6 +12,7 @@ import GridList from '@material-ui/core/GridList';
import GridListTile from '@material-ui/core/GridListTile'; import GridListTile from '@material-ui/core/GridListTile';
import GridListTileBar from '@material-ui/core/GridListTileBar'; import GridListTileBar from '@material-ui/core/GridListTileBar';
import FormHelperText from '@material-ui/core/FormHelperText'; import FormHelperText from '@material-ui/core/FormHelperText';
import FormLabel from '@material-ui/core/FormLabel';
const styles = theme => ({ const styles = theme => ({
multiGridListTile: { multiGridListTile: {
@ -62,7 +63,8 @@ class Requirements extends Component {
render() { render() {
var cols = isWidthDown('md', this.props.width) ? isWidthDown('sm', this.props.width) ? isWidthDown('xs', this.props.width) ? 2 : 3 : 4 : 6; var cols = isWidthDown('md', this.props.width) ? isWidthDown('sm', this.props.width) ? isWidthDown('xs', this.props.width) ? 2 : 3 : 4 : 6;
return ( return (
<div> <div style={{marginBottom: '10px', padding: '18.5px 14px', borderRadius: '25px', border: '1px solid lightgrey', width: 'calc(100% - 28px)'}}>
<FormLabel style={{color: 'black'}}>Hardware</FormLabel>
<FormHelperText style={this.props.error.steps[this.props.index].hardware ? {lineHeight: 'initial', marginTop: '5px'} : {marginTop: '5px', lineHeight: 'initial', marginBottom: '10px'}}>Beachte, dass die Reihenfolge des Auswählens maßgebend ist.</FormHelperText> <FormHelperText style={this.props.error.steps[this.props.index].hardware ? {lineHeight: 'initial', marginTop: '5px'} : {marginTop: '5px', lineHeight: 'initial', marginBottom: '10px'}}>Beachte, dass die Reihenfolge des Auswählens maßgebend ist.</FormHelperText>
{this.props.error.steps[this.props.index].hardware ? <FormHelperText className={this.props.classes.errorColor}>Wähle mindestens eine Hardware aus.</FormHelperText> : null} {this.props.error.steps[this.props.index].hardware ? <FormHelperText className={this.props.classes.errorColor}>Wähle mindestens eine Hardware aus.</FormHelperText> : null}
<GridList cellHeight={100} cols={cols} spacing={10}> <GridList cellHeight={100} cols={cols} spacing={10}>

View File

@ -28,7 +28,7 @@ class Requirements extends Component {
render() { render() {
return ( return (
<FormControl style={{marginBottom: '10px'}}> <FormControl style={{marginBottom: '10px', padding: '18.5px 14px', borderRadius: '25px', border: '1px solid lightgrey', width: 'calc(100% - 28px)'}}>
<FormLabel style={{color: 'black'}}>Voraussetzungen</FormLabel> <FormLabel style={{color: 'black'}}>Voraussetzungen</FormLabel>
<FormHelperText style={{marginTop: '5px'}}>Beachte, dass die Reihenfolge des Anhakens maßgebend ist.</FormHelperText> <FormHelperText style={{marginTop: '5px'}}>Beachte, dass die Reihenfolge des Anhakens maßgebend ist.</FormHelperText>
<FormGroup> <FormGroup>

View File

@ -36,7 +36,7 @@ class Step extends Component {
var index = this.props.index; var index = this.props.index;
var steps = this.props.steps; var steps = this.props.steps;
return ( return (
<div style={{borderRadius: '25px', background: 'lightgrey', padding: '10px 14px 10px 10px', marginBottom: '20px'}}> <div style={{borderRadius: '25px', border: '1px solid lightgrey', padding: '10px 14px 10px 10px', marginBottom: '20px'}}>
<Typography variant='h6' style={{marginBottom: '10px', marginLeft: '4px'}}>Schritt {index+1}</Typography> <Typography variant='h6' style={{marginBottom: '10px', marginLeft: '4px'}}>Schritt {index+1}</Typography>
<div style={{display: 'flex', position: 'relative'}}> <div style={{display: 'flex', position: 'relative'}}>
<div style={{width: '40px', marginRight: '10px', position: 'absolute', left: '4px', bottom: '10px'}}> <div style={{width: '40px', marginRight: '10px', position: 'absolute', left: '4px', bottom: '10px'}}>