Skip to content

Commit c396064

Browse files
Merge pull request #200 from makeopensource/styling-improvements
#21 - Margin/padding scheme, styling fixes
2 parents 4b015cd + 934268e commit c396064

9 files changed

Lines changed: 43 additions & 48 deletions

File tree

devU-client/src/assets/global.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
}
1515

1616
h1 {
17-
margin: 1.75rem auto;
17+
margin: 20px auto;
1818
text-align: center;
1919
}
2020

2121
h2 {
22+
margin: 20px 0;
2223
text-align: center;
2324
}
2425

devU-client/src/components/listItems/userCourseListItem.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
.Buttons {
106106
flex-direction: row;
107107
justify-content: space-between;
108-
padding: 10px;
109108
margin-top: auto;
110109
}
111110
}

devU-client/src/components/misc/globalToolbar.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $font-size: 16px;
3030
text-decoration: none;
3131
color: #FFF;
3232
font-weight: 700;
33-
height: 51px;
33+
height: 51px; // Centers text in navbar
3434
}
3535

3636
.bar {

devU-client/src/components/pages/courses/courseDetailPage.scss

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
}
1717

1818

19-
.color{
19+
.courseCardHeading{
2020
background-color: $primary;
2121
color: #FFF; // always white against purple bg
22-
width: 100%;
22+
width: inherit;
2323
padding: 20px;
2424
text-align: center;
2525
font-size: 1.2em;
@@ -43,9 +43,9 @@
4343
height: 100%;
4444
padding: 0;
4545
background-color: rebeccapurple;
46-
border-radius: 5px;
4746
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
4847
overflow: hidden;
48+
border-radius: 20px;
4949
margin-bottom: 20px;
5050

5151
.MuiList-root {
@@ -83,26 +83,22 @@
8383
justify-content: space-between;
8484
align-items: flex-start;
8585
background-color: $secondary;
86-
// padding: 30px 60px;
87-
padding: 20px;
88-
//border-radius: 10px;
86+
padding: 30px;
87+
border-radius: 20px;
8988
color: $text-color;
90-
width: 70%
89+
width: fit-content;
9190
}
9291

9392
h1 {
94-
margin: 0 0 10px 0;
9593
font-size: 1.5rem;
9694
text-align: left;
9795
font-weight: bold;
98-
96+
margin: 0;
9997
}
10098

101-
.h2 {
102-
padding-top: 20px;
103-
margin: 0 0 20px 0;
99+
h2 {
104100
font-size: 1.0rem;
105-
padding-bottom: 10px;
101+
margin: 0;
106102
}
107103

108104
h3{
@@ -112,27 +108,26 @@
112108
}
113109
}
114110

115-
.buttons-container {
116-
display: flex;
117-
flex-wrap: wrap;
118-
119-
justify-content: space-around;
120-
width:100%;
121-
}
111+
.buttons_container {
112+
display: flex;
113+
flex-wrap: wrap;
114+
justify-content: flex-start;
115+
gap: 10px;
116+
margin-top: 10px;
117+
}
122118

123-
.actual_button {
124-
display: flex;
125-
flex-direction: row;
126-
border: 0; /* Primary button color */
127-
/* Button text color */
128-
padding: 10px 20px; /* Padding for button */
129-
border-radius: 5px;
130-
font-weight: 600;
131-
transition: background-color 0.3s ease;
132-
margin : 0 10px;
133-
background-color: $purple !important;
134-
color: white !important;
135-
}
119+
.actual_button {
120+
display: flex;
121+
flex-direction: row;
122+
border: 0; /* Primary button color */
123+
/* Button text color */
124+
padding: 10px 20px; /* Padding for button */
125+
border-radius: 5px;
126+
font-weight: 600;
127+
transition: background-color 0.3s ease;
128+
background-color: $purple !important;
129+
color: white !important;
130+
}
136131

137132
.assignmentName {
138133
&::after {

devU-client/src/components/pages/courses/courseDetailPage.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ const CourseDetailPage = () => {
103103
<h2> Section: </h2>
104104

105105

106-
<div style={{display: 'flex', flexWrap:'wrap', justifyContent: 'space-between'}}>
107-
106+
<div className={styles.buttons_container}>
108107

109108

110109
<button className={styles.actual_button} onClick={() => {
@@ -155,9 +154,9 @@ const CourseDetailPage = () => {
155154
<div className={styles.coursesContainer}>
156155
{Object.keys(categoryMap).map((category, index) => (
157156

158-
<Card key={index} className={styles.courseCard}>
157+
<Card key={index} className={styles.courseCard} style = {{borderRadius: '20px'}}>
159158
<CardContent sx={{padding:0}}>
160-
<Typography variant="h5" className={styles.color} style={{ textAlign: 'center' }}>
159+
<Typography variant="h5" className={styles.courseCardHeading} style={{ textAlign : 'center' }}>
161160
{category}
162161
</Typography>
163162
</CardContent>
@@ -182,9 +181,7 @@ const CourseDetailPage = () => {
182181
variant="body2"
183182
color="grey"
184183
>
185-
Start: {new Date(assignment.startDate).toLocaleDateString()}
186-
|
187-
Due: {new Date(assignment.dueDate).toLocaleDateString()}
184+
Start: {new Date(assignment.startDate).toLocaleDateString()} | Due: {new Date(assignment.dueDate).toLocaleDateString()}
188185
</Typography>
189186
</React.Fragment>
190187
}

devU-client/src/components/pages/forms/assignments/assignmentFormPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const AssignmentCreatePage = () => {
122122

123123
return (
124124
<PageWrapper className={formStyles.pageWrapper}>
125-
<h2>Create Assignment</h2>
125+
<h1>Create Assignment</h1>
126126
<div className={formStyles.flex}>
127127
<div className={formStyles.form}>
128128
<h2>Assignment Information</h2>

devU-client/src/components/pages/homePage/homePage.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
.courses_heading {
66
text-align: left;
7-
// margin-left: 20px;
7+
margin: 20px 0;
88
// font-size: 30px;
99
// font-weight: 550;
1010
margin: 10px 0;
@@ -18,14 +18,12 @@
1818
// margin-bottom: 30px;
1919
// }
2020

21-
2221
.no_courses {
2322
font-style: italic;
2423
margin-bottom: 20px;
2524
}
2625

2726

28-
2927
.coursesContainer {
3028
display: flex;
3129
flex-direction: row;

devU-client/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
name="viewport"
88
content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=6.0, shrink-to-fit=no, user-scalable=yes, width=device-width"
99
/>
10-
<title>AutoFour</title>
10+
<title>DevU</title>
1111
</head>
1212

1313
<body>

readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ Enter the project repo.
9292
cd devU
9393
```
9494

95+
Run this command to setup submodules.
96+
```bash
97+
git submodule update --init --recursive
98+
```
99+
95100
### 3. Run the Project with Docker Compose
96101
```bash
97102
docker compose up --build

0 commit comments

Comments
 (0)