Skip to content

Commit 3f580d5

Browse files
authored
Merge pull request #95 from usingbrain/main
pulling instruction component
2 parents dd2ece4 + 6cb3707 commit 3f580d5

10 files changed

Lines changed: 60 additions & 18 deletions

File tree

client/src/Assets/classdata.png

4.4 KB
Loading

client/src/Assets/openclass.png

15.8 KB
Loading
25.9 KB
Loading

client/src/Assets/startsession.png

5 KB
Loading

client/src/Assets/studentdata.png

50.6 KB
Loading

client/src/Components/Calendar/Overview.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import { useCourseOverviewQuery } from '../../generated/graphql';
55
import moment from 'moment';
66

77
const overviewStyle =
8-
'flex flex-col m-auto bg-green w-11/12 md:w-10/12 lg:w-9/12 xl:w-7/12 mt-8 h-1/3 md:h-2/4 lg:h-2/3 xl:h-3/4';
9-
const headerStyle =
10-
'flex bg-green shadow-md p-4 justify-center text-white text-md sm:text-lg md:text-xl';
11-
const historyStyle = 'flex flex-row flex-wrap justify-start bg-white w-full h-full overflow-scroll';
8+
'flex flex-col m-auto bg-green w-11/12 md:w-10/12 lg:w-9/12 xl:w-7/12 mt-8 h-1/2 lg:h-3/4 px-2 pb-2';
9+
10+
const historyStyle =
11+
'flex flex-row flex-wrap justify-start bg-white w-full overflow-scroll h-6/7';
1212

1313
const Overview: React.FC = () => {
1414
const courseId = Number(useParams().courseId);
@@ -26,18 +26,18 @@ const Overview: React.FC = () => {
2626

2727
console.log('history: ', history);
2828
return (
29-
<div>
29+
<div className="h-screen">
3030
<div className={overviewStyle}>
31-
<article className='flex flex-col justify-center p-2 h-full'>
32-
<p className='m-auto text-xl text-white pb-2'>Attendance</p>
31+
<article className='flex flex-col justify-center h-full'>
32+
<p className='m-auto text-xl text-white pb-2 h-8 flex'>Attendance</p>
3333
<section className={historyStyle}>
3434
{!!sessions &&
3535
sessions.map((session) => {
3636
if (session) {
3737
const date = new Date(Number(session.createdAt));
3838
const UTCdate = date.toUTCString();
3939
return (
40-
<div className='w-26 p-2 md:w-32 text-center border-2 border-black m-1 hover:bg-green-xlight'>
40+
<div className='h-20 p-2 w-32 text-center border-2 border-black m-1 hover:bg-green-xlight'>
4141
<Link to={`/homepage/classes/${courseId}/${session.id}`}>
4242
<div>
4343
<h5 className='text-lg sm:text-xl'>

client/src/Components/ClassView/DeleteBtn.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ const btnStyle = {
1313
};
1414

1515
const alertStyle =
16-
'text-white text-center flex flex-col items-center justify-evenly h-56 w-96 fixed top-2/3 inset-x-1/2 bg-black p-12';
16+
'text-white text-center flex flex-col items-center justify-evenly h-1/3 w-1/3 fixed top-1/3 inset-x-1/2 bg-black p-12';
1717

18-
const alertBtnStyle = 'hover:bg-white hover:text-black border-white p-4';
18+
const alertBtnStyle = 'text-white bg-black border-2 border-black hover:border-white p-4 w-1/2 m-1';
1919

2020
const DeleteBtn: React.FC<{ courseId: number }> = ({ courseId }) => {
2121
const navigate = useNavigate();

client/src/Components/TeacherDashboard/Course.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { setHistory, setSelected } from '../../store/actions';
66
import CourseType from '../../Types/course';
77

88
let courseStyle =
9-
'flex py-2 font-light text-left text-white w-full border-2 border-green hover:border-white justify-center';
9+
'flex flex-col py-2 font-light text-left text-white w-full border-2 border-green hover:border-white justify-center items-center';
1010

1111
const Course: React.FC<{ course: CourseType }> = ({ course }) => {
1212
const dispatch = useDispatch();
@@ -19,7 +19,8 @@ const Course: React.FC<{ course: CourseType }> = ({ course }) => {
1919

2020
return (
2121
<div className={courseStyle} onClick={handleClick}>
22-
<p className='flex justify-center border-b-2 w-1/4 pb-4'>{course.name}</p>
22+
<p className='flex justify-center pb-4'>{course.name}</p>
23+
<hr className="border-b-2 border-white w-1/4" />
2324
</div>
2425
);
2526
};

client/src/Components/TeacherHomepage/Instruction.tsx

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,46 @@
1-
import React from 'react';
1+
import openOrCreate from '../../Assets/openclass.png';
2+
import registerImg from '../../Assets/registerstudents.png';
3+
import startImg from '../../Assets/startsession.png';
4+
import attendanceImg from '../../Assets/classdata.png';
5+
import studentData from '../../Assets/studentdata.png';
6+
7+
const imgStyle = "bg-white rounded-full h-16 w-16 flex justify-center items-center"
8+
const info = "w-2/3 text-2xl h-20 flex md:pl-8 pl-1 pr-2 items-center rounded-full justify-between"
29

310
const Instruction = () => {
411
return (
5-
<div className="text-center text-lg flex flex-col justify-evenly h-48">
6-
<h2 className="p-8">
7-
&lt;-- Click here to add a new course to your list
8-
</h2>
9-
<h2 className="p-8">&lt;-- or choose one that already exists</h2>
12+
<div className="h-screen flex flex-col items-center">
13+
<h1 className="text-5xl my-8">Quick start</h1>
14+
<p className={`${info} mb-4 bg-shades-one`}>
15+
Create or open a class
16+
<div className={imgStyle}>
17+
<img src={openOrCreate} alt="Open or create class" className="h-10 w-10" />
18+
</div>
19+
</p>
20+
<p className={`${info} my-4 bg-shades-two`}>
21+
Register students
22+
<div className={imgStyle}>
23+
<img src={registerImg} alt="Open or create class" className="h-10 w-10" />
24+
</div>
25+
</p>
26+
<p className={`${info} my-4 bg-shades-three`}>
27+
Start a session
28+
<div className={imgStyle}>
29+
<img src={startImg} alt="Open or create class" className="h-10 w-10" />
30+
</div>
31+
</p>
32+
<p className={`${info} my-4 bg-shades-four`}>
33+
Access attendance data
34+
<div className={imgStyle}>
35+
<img src={attendanceImg} alt="Open or create class" className="h-10 w-10" />
36+
</div>
37+
</p>
38+
<p className={`${info} my-4 bg-shades-five`}>
39+
Check individual student data
40+
<div className={imgStyle}>
41+
<img src={studentData} alt="Open or create class" className="h-10 w-10" />
42+
</div>
43+
</p>
1044
</div>
1145
);
1246
};

client/tailwind.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ module.exports = {
2727
black: {
2828
DEFAULT: '#000000',
2929
},
30+
shades: {
31+
one: '#C7F4F0',
32+
two: '#AFEBE5',
33+
three: '#79D4CC',
34+
four: '#43BFB3',
35+
five: '#00A393'
36+
}
3037
},
3138
boxShadow: {
3239
bottom: '0 3px 2px -1px rgba(0, 0, 0, 0.2)'

0 commit comments

Comments
 (0)