Skip to content

Feature/show command running #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Nov 18, 2019
Prev Previous commit
Next Next commit
style without absolute positioning
  • Loading branch information
ShMcK committed Nov 17, 2019
commit 0ee8b05ca9b0e33f91d1046a869ab81ee86bf2fb
42 changes: 23 additions & 19 deletions web-app/src/containers/Overview/OverviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import Markdown from '../../components/Markdown'
const styles = {
page: {
position: 'relative' as 'relative',
display: 'flex' as 'flex',
flexDirection: 'column' as 'column',
justifyContent: 'space-between',
width: '100%',
height: '100%',
},
summary: {
padding: '0rem 1rem 1rem 1rem',
Expand All @@ -33,8 +37,6 @@ const styles = {
flexDirection: 'row' as 'row',
alignItems: 'center' as 'center',
justifyContent: 'flex-end' as 'flex-end',
position: 'absolute' as 'absolute',
bottom: 0,
height: '50px',
padding: '1rem',
paddingRight: '2rem',
Expand All @@ -52,26 +54,28 @@ interface Props {

const Summary = ({ title, description, levels, onNext }: Props) => (
<div style={styles.page}>
<div style={styles.header}>
<span>CodeRoad</span>
</div>
<div style={styles.summary}>
<h2 style={styles.title}>{title}</h2>
<Markdown>{description}</Markdown>
</div>
<div>
<div style={styles.header}>
<span>Levels</span>
<span>CodeRoad</span>
</div>
<div style={styles.summary}>
<h2 style={styles.title}>{title}</h2>
<Markdown>{description}</Markdown>
</div>
<div style={styles.levelList}>
{levels.map((level: G.Level, index: number) => (
<div key={index}>
<h4>
{index + 1}. {level.title}
</h4>
<div>{level.description}</div>
</div>
))}
<div>
<div style={styles.header}>
<span>Levels</span>
</div>
<div style={styles.levelList}>
{levels.map((level: G.Level, index: number) => (
<div key={index}>
<h4>
{index + 1}. {level.title}
</h4>
<div>{level.description}</div>
</div>
))}
</div>
</div>
</div>

Expand Down
10 changes: 6 additions & 4 deletions web-app/src/containers/Tutorial/LevelPage/Level.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ import Button from '../../../components/Button'
import Markdown from '../../../components/Markdown'

const styles = {
card: {
page: {
position: 'relative' as 'relative',
display: 'flex' as 'flex',
flexDirection: 'column' as 'column',
justifyContent: 'space-between',
padding: 0,
width: '100%',
height: '100%',
},
header: {
height: '36px',
Expand Down Expand Up @@ -41,8 +45,6 @@ const styles = {
lineHeight: '16px',
padding: '10px 1rem',
color: 'white',
position: 'absolute' as 'absolute',
bottom: 0,
width: '100%',
},
}
Expand All @@ -59,7 +61,7 @@ const Level = ({ level, onContinue, onLoadSolution }: Props) => {
}

return (
<div style={styles.card}>
<div style={styles.page}>
<div>
<div style={styles.header}>
<span>Learn</span>
Expand Down