Skip to content

Commit 909af2d

Browse files
committed
html5 tags updated
1 parent 7934ee1 commit 909af2d

6 files changed

Lines changed: 75 additions & 37 deletions

File tree

‎front/src/pods/student/student.component.tsx‎

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,36 @@ interface Props {
1111

1212
export const StudentComponent: React.FC<Props> = props => {
1313
const { room, log } = props;
14-
const { mainContainer, sessionName, studentBoard, labelTextarea } = classes;
14+
const {
15+
mainContainer,
16+
title,
17+
sessionName,
18+
studentBoard,
19+
labelTextarea,
20+
} = classes;
1521

1622
return (
17-
<div className={mainContainer}>
18-
<Typography className={sessionName} variant="body1">
19-
Session name: {room}
20-
</Typography>
21-
<label className={labelTextarea} htmlFor="session">
22-
Content
23-
</label>
24-
<TextareaAutosize
25-
id="session"
26-
rowsMax={40}
27-
rowsMin={40}
28-
className={studentBoard}
29-
value={log}
30-
/>
31-
</div>
23+
<>
24+
<header>
25+
<Typography className={title} variant="h1">
26+
Student page
27+
</Typography>
28+
</header>
29+
<main className={mainContainer}>
30+
<Typography className={sessionName} variant="body1">
31+
Session name: {room}
32+
</Typography>
33+
<label className={labelTextarea} htmlFor="session">
34+
Content
35+
</label>
36+
<TextareaAutosize
37+
id="session"
38+
rowsMax={40}
39+
rowsMin={40}
40+
className={studentBoard}
41+
value={log}
42+
/>
43+
</main>
44+
</>
3245
);
3346
};

‎front/src/pods/student/student.styles.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ export const mainContainer = css`
77
margin: ${spacing(40)} auto 0 auto;
88
`;
99

10+
export const title = css`
11+
font-size: 3rem;
12+
text-align: center;
13+
margin-bottom: 2rem;
14+
margin-top: 2rem;
15+
`;
16+
1017
export const studentBoard = css`
1118
box-sizing: border-box;
1219
width: 100%;

‎front/src/pods/trainer/components/new-text.component.tsx‎

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,28 @@ export const NewTextComponent: React.FC<Props> = props => {
4444

4545
return (
4646
<div className={newTextContainer}>
47-
<label className={labelTextarea} htmlFor="new-text">
48-
New text
49-
</label>
50-
<TextareaAutosize
51-
rowsMax={10}
52-
rowsMin={10}
53-
className={editTextArea}
54-
onChange={e => handleOnChange(e)}
55-
value={trainerText}
56-
/>
57-
<Button
58-
variant="contained"
59-
color="primary"
60-
className={trainerText ? sendBtn : sendBtnDisabled}
61-
onClick={() => trainerText && handleAppendTrainerTextInternal()}
62-
aria-disabled={!trainerText}
63-
disableRipple={!trainerText}
64-
>
65-
Send
66-
</Button>
47+
<form>
48+
<label className={labelTextarea} htmlFor="new-text">
49+
New text
50+
</label>
51+
<TextareaAutosize
52+
rowsMax={10}
53+
rowsMin={10}
54+
className={editTextArea}
55+
onChange={e => handleOnChange(e)}
56+
value={trainerText}
57+
/>
58+
<Button
59+
variant="contained"
60+
color="primary"
61+
className={trainerText ? sendBtn : sendBtnDisabled}
62+
onClick={() => trainerText && handleAppendTrainerTextInternal()}
63+
aria-disabled={!trainerText}
64+
disableRipple={!trainerText}
65+
>
66+
Send
67+
</Button>
68+
</form>
6769
</div>
6870
);
6971
};

‎front/src/pods/trainer/components/session.component.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export const SessionComponent: React.FC<Props> = props => {
2222
rowsMin={20}
2323
className={studentBoard}
2424
value={log}
25+
read-only="true"
26+
aria-readonly
2527
/>
2628
</div>
2729
);

‎front/src/pods/trainer/trainer.component.tsx‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as classes from './trainer.styles';
33
import { HeaderComponent } from './components/header.component';
44
import { NewTextComponent } from './components/new-text.component';
55
import { SessionComponent } from './components/session.component';
6+
import Typography from '@material-ui/core/Typography';
67

78
interface Props {
89
handleAppendTrainerText: (trainerText: string) => void;
@@ -19,15 +20,21 @@ export const TrainerComponent: React.FC<Props> = props => {
1920
log,
2021
} = props;
2122

22-
const { mainContainer } = classes;
23+
const { mainContainer, title } = classes;
2324

2425
return (
2526
<>
27+
<header>
28+
<Typography className={title} variant="h1">
29+
Trainer page
30+
</Typography>
31+
</header>
2632
<main className={mainContainer}>
2733
<HeaderComponent
2834
currentTrainerUrl={currentTrainerUrl}
2935
currentStudentUrl={currentStudentUrl}
3036
/>
37+
3138
<NewTextComponent handleAppendTrainerText={handleAppendTrainerText} />
3239
<SessionComponent log={log} />
3340
</main>

‎front/src/pods/trainer/trainer.styles.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,10 @@ export const mainContainer = css`
44
width: 60%;
55
margin: 40px auto 0 auto;
66
`;
7+
8+
export const title = css`
9+
font-size: 3rem;
10+
text-align: center;
11+
margin-bottom: 2rem;
12+
margin-top: 2rem;
13+
`;

0 commit comments

Comments
 (0)