File tree
9 files changed
+81
-101
lines changed- web-app
- src
- components/Markdown
- containers
- Loading
- SelectTutorial
- TutorialOverview
- forms
- styles
- stories
9 files changed
+81
-101
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
| 3 | + | |
3 | 4 |
| |
4 | 5 |
| |
5 | 6 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
| 18 | + | |
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
|
Lines changed: 54 additions & 63 deletions
<
9E88
table aria-label="Diff for: web-app/src/containers/SelectTutorial/TutorialOverview/index.tsx" class="tab-size width-full DiffLines-module__tableLayoutFixed--ZmaVx" data-diff-anchor="diff-210fa5463dd802b440e6d0a5c759ee591b415a1a739257a9ef030804dcc4dfb2" data-tab-size="8" data-paste-markdown-skip="true" role="grid" style="--line-number-cell-width:44px;--line-number-cell-width-unified:88px">Original file line number Diff line number Diff line change
@@ -1,42 +1,35 @@
1
1
import * as React from 'react'
2
2
import * as TT from 'typings/tutorial'
3
-// import moment from 'moment'
3
+import { Breadcrumb } from '@alifd/next'
4
4
import Button from '../../../components/Button'
5
5
import Markdown from '../../../components/Markdown'
6
-import { Breadcrumb } from '@alifd/next'
7
-
8
-const footerHeight = '3rem'
6
+import { Theme } from '../../../styles/theme'
9
7
10
8
const styles = {
11
9
page: {
12
10
position: 'relative' as 'relative',
13
11
display: 'flex' as 'flex',
14
12
flexDirection: 'column' as 'column',
15
- width: '100%',
13
+ width: '100vw',
16
14
},
17
- nav: {
18
- display: 'flex',
19
- height: '2rem',
20
- fontSize: '1rem',
21
- lineHeight: '1rem',
22
- alignItems: 'center',
23
- },
24
- navLink: {
25
- fontSize: '14px',
15
+ nav: (theme: Theme) => ({
16
+ height: theme['$nav-height'],
17
+ }),
18
+ navLink: (theme: Theme) => ({
19
+ fontSize: theme['$font-size-caption'],
20
+ lineHeight: theme['$font-lineheight-1'],
26
21
color: 'white',
27
22
cursor: 'pointer',
28
- },
23
+ }),
29
24
content: {
30
25
paddingBottom: '5rem',
31
26
},
32
- header: {
33
- color: 'white',
34
- backgroundColor: '#0066B8',
27
+ header: (theme: Theme) => ({
28
+ color: theme['$color-white'],
29
+ backgroundColor: theme['$color-brand1-9'],
35
30
padding: '1rem 1rem 1.5rem 1rem',
36
- },
37
- title: {
38
- fontWeight: 'bold' as 'bold',
39
- },
31
+ }),
32
+ title: {},
40
33
description: {
41
34
fontSize: '1rem',
42
35
},
@@ -51,7 +44,7 @@ const styles = {
51
44
levelSummary: {
52
45
paddingLeft: '1.1rem',
53
46
},
54
- footer: {
47
+ footer: (theme: Theme) => ({
55
48
position: 'fixed' as 'fixed',
56
49
bottom: 0,
57
50
left: 0,
@@ -60,12 +53,12 @@ const styles = {
60
53
flexDirection: 'row' as 'row',
61
54
alignItems: 'center' as 'center',
62
55
justifyContent: 'flex-end' as 'flex-end',
63
- height: footerHeight,
56
+ height: theme['$footer-height'],
64
57
padding: '1rem',
65
58
paddingRight: '2rem',
66
- backgroundColor: 'black',
59
+ backgroundColor: theme['$color-black'],
67
60
width: '100%',
68
- },
61
+ }),
69
62
}
70
63
71
64
interface Props {
@@ -74,50 +67,48 @@ interface Props {
74
67
onClear(): void
75
68
}
76
69
77
-const Summary = (props: Props) => {
78
- return (
79
- <div css={styles.page}>
80
- <div css={styles.content}>
81
- <div css={styles.header}>
82
- <div css={styles.nav}>
83
- <Breadcrumb separator="/">
84
- <Breadcrumb.Item>
85
- <div css={styles.navLink} onClick={props.onClear}>
86
- < Back to Tutorials
87
- </div>
88
- </Breadcrumb.Item>
89
- </Breadcrumb>
90
- </div>
91
- <Markdown css={styles.title}>{`# ${props.tutorial.summary.title}`}</Markdown>
92
- <Markdown>{`### ${props.tutorial.summary.description}`}</Markdown>
93
- {/* <h5 css={styles.meta}>
70
+const Summary = (props: Props) => (
71
+ <div css={styles.page}>
72
+ <div css={styles.content}>
73
+ <div css={styles.header}>
74
+ <div css={styles.nav}>
75
+ <Breadcrumb separator="/">
76
+ <Breadcrumb.Item>
77
+ <div css={styles.navLink} onClick={props.onClear}>
78
+ < Back to Tutorials
79
+ </div>
80
+ </Breadcrumb.Item>
81
+ </Breadcrumb>
82
+ </div>
83
+ <Markdown>{`# ${props.tutorial.summary.title}`}</Markdown>
84
+ <Markdown>{`### ${props.tutorial.summary.description}`}</Markdown>
85
+ {/* <h5 css={styles.meta}>
94
86
<div css={{ marginRight: '2rem' }}>Created by {props.createdBy.name}</div>
95
87
<div>Last updated {moment(props.updatedAt).format('M/YYYY')}</div>
96
88
</h5> */}
97
- </div>
98
- <div>
99
- <div css={styles.levelList}>
100
- <h2>Content</h2>
101
- {props.tutorial.levels.map((level: TT.Level, index: number) => (
102
- <div key={index}>
103
- <Markdown>{`### ${index + 1}. ${level.title}`}</Markdown>
104
- <div css={styles.levelSummary}>
105
- <Markdown>{level.summary}</Markdown>
106
- </div>
89
+ </div>
90
+ <div>
91
+ <div css={styles.levelList}>
92
+ <h2>Content</h2>
93
+ {props.tutorial.levels.map((level: TT.Level, index: number) => (
94
+ <div key={index}>
95
+ <Markdown>{`### ${index + 1}. ${level.title}`}</Markdown>
96
+ <div css={styles.levelSummary}>
97
+ <Markdown>{level.summary}</Markdown>
107
98
</div>
108
- ))}
109
- </div>
99
+ </div>
100
+ ))}
110
101
</div>
111
102
</div>
103
+ </div>
112
104
113
- <div css={styles.footer}>
114
- {/* TODO Add back button */}
115
- <Button type="primary" onClick={props.onNext}>
116
- Start
117
- </Button>
118
- </div>
105
+ <div css={styles.footer}>
106
+ {/* TODO Add back button */}
107
+ <Button type="primary" onClick={props.onNext}>
108
+ Start
109
+ </Button>
119
110
</div>
120
- )
121
-}
111
+ </div>
112
+)
122
113
123
114
export default Summary
Lines changed: 20 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
4 | 6 |
| |
5 | 7 |
| |
6 | 8 |
| |
| |||
9 | 11 |
| |
10 | 12 |
| |
11 | 13 |
| |
12 |
| - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
13 | 19 |
| |
14 |
| - | |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 |
| - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
19 | 27 |
| |
20 | 28 |
| |
21 | 29 |
| |
| |||
39 | 47 |
| |
40 | 48 |
| |
41 | 49 |
| |
42 |
| - | |
| 50 | + | |
43 | 51 |
| |
44 | 52 |
| |
45 |
| - | |
46 |
| - | |
47 |
| - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
48 | 57 |
| |
49 | 58 |
| |
50 | 59 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
193 | 193 |
| |
194 | 194 |
| |
195 | 195 |
| |
| 196 | + | |
| 197 | + | |
196 | 198 |
| |
197 | 199 |
| |
198 | 200 |
| |
|
Lines changed: 0 additions & 23 deletions
This file was deleted.
0 commit comments