Skip to content

Commit 6637320

Browse files
committed
Polish UI and make it more mobile friendly
1 parent 360fdcb commit 6637320

File tree

6 files changed

+32
-15
lines changed

6 files changed

+32
-15
lines changed

frontend/src/components/Navbar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const Navbar: React.FC<{ isLoggedIn: boolean | null }> = ({ isLoggedIn }) => {
2727
justifyContent: isSmallScreen ? 'center' : 'space-between',
2828
alignItems: 'center',
2929
textAlign: isSmallScreen ? 'center' : 'left',
30+
py: isSmallScreen ? 1 : 0,
3031
}}
3132
>
3233
<Typography
@@ -41,7 +42,7 @@ const Navbar: React.FC<{ isLoggedIn: boolean | null }> = ({ isLoggedIn }) => {
4142
📝 ReviewIIITH
4243
</Typography>
4344
{isLoggedIn ? (
44-
<Box sx={{ display: 'flex', gap: 1 }}>
45+
<Box sx={{ display: 'flex', gap: 0.5 }}>
4546
<Button
4647
color="inherit"
4748
component={Link}

frontend/src/components/Review.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const Review: React.FC<{
5454
<Card
5555
variant="outlined"
5656
sx={{
57-
margin: 2,
57+
my: 2,
5858
backgroundColor: review.is_reviewer
5959
? theme.palette.action.hover
6060
: theme.palette.background.paper,
@@ -99,7 +99,7 @@ const Review: React.FC<{
9999
</Typography>
100100
</Box>
101101
<Typography
102-
variant="body1"
102+
variant="body2"
103103
sx={{ marginTop: 1, whiteSpace: 'pre-line' }}
104104
>
105105
{review.content.replace(/\n{3,}/g, '\n\n')}

frontend/src/pages/Credits.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const Credits: React.FC = () => {
1919
<Typography variant="h4" gutterBottom color="secondary">
2020
Idea Contributors
2121
</Typography>
22-
<Typography paragraph color="text.secondary">
22+
<Typography color="text.secondary">
2323
This project was inspired by some projects submitted during HackIIIT
2424
2024. We would like to acknowledge the following teams whose projects
2525
have inspired this portal:
@@ -44,7 +44,7 @@ const Credits: React.FC = () => {
4444
<Typography variant="h4" gutterBottom color="secondary">
4545
Code Contributors
4646
</Typography>
47-
<Typography paragraph color="text.secondary">
47+
<Typography color="text.secondary">
4848
The core implementation and development of this project were carried
4949
out by:
5050
</Typography>
@@ -59,7 +59,7 @@ const Credits: React.FC = () => {
5959
<ListItemText primary="Ankith Pai" />
6060
</ListItem>
6161
</List>
62-
<Typography paragraph color="text.secondary">
62+
<Typography color="text.secondary">
6363
We look forward to adding more contributors to this list as the
6464
project evolves!
6565
</Typography>
@@ -69,12 +69,12 @@ const Credits: React.FC = () => {
6969
<Typography variant="h4" gutterBottom color="secondary">
7070
Users and Beta Testers
7171
</Typography>
72-
<Typography paragraph color="text.secondary">
72+
<Typography color="text.secondary">
7373
A big thank you to all our beta testers who provided invaluable
7474
feedback and bug reports. Your efforts have greatly improved the
7575
quality of this platform.
7676
</Typography>
77-
<Typography paragraph color="text.secondary">
77+
<Typography color="text.secondary">
7878
Finally, to all our users: your feedback is what makes this platform
7979
better for everyone. Thank you for sharing your thoughts and reviews!
8080
</Typography>

frontend/src/pages/Home.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ const Home: React.FC<{ isLoggedIn: boolean | null }> = ({ isLoggedIn }) => {
88
<Typography variant="h3" gutterBottom align="center" color="primary">
99
🎓 Welcome to ReviewIIITH 👋
1010
</Typography>
11-
<Typography variant="h6" gutterBottom align="center" sx={{ mb: 4 }}>
11+
<Typography variant="h5" gutterBottom align="center" sx={{ mb: 4 }}>
1212
A reviews portal by students, for students 🧑‍🎓
1313
</Typography>
14-
<Typography variant="h6" align="center" paragraph color="text.secondary">
14+
<Typography
15+
variant="h6"
16+
gutterBottom
17+
align="center"
18+
color="text.secondary"
19+
>
1520
Ever wished you had the inside scoop on a course before signing up for
1621
it? Confused on what research advisor to pick? 🤔 That&apos;s where this
1722
anonymous review portal comes in. Think of it as your go-to place for
@@ -20,7 +25,7 @@ const Home: React.FC<{ isLoggedIn: boolean | null }> = ({ isLoggedIn }) => {
2025
on things like how clear their lectures are, how tough the workload is,
2126
or whether the grading feels fair. 📝
2227
</Typography>
23-
<Typography variant="h6" align="center" paragraph color="text.secondary">
28+
<Typography variant="h6" align="center" color="text.secondary">
2429
The best part? 🌟 It&apos;s totally anonymous, so you can keep it real
2530
without worrying about any awkward run-ins. And it&apos;s super simple
2631
to use - just search by course or professor and see what others are

frontend/src/pages/Profs.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ const Profs: React.FC<{ profList: ProfType[] | undefined }> = ({
6666
</Box>
6767
{reviewProf ? (
6868
<ReviewBox
69-
title={`${reviewProf.name} <${reviewProf.email}>`}
69+
title={reviewProf.name}
7070
endpoint={`/members/reviews/${reviewProf.email}`}
7171
initExpanded={true}
72-
/>
72+
>
73+
{reviewProf.email}
74+
</ReviewBox>
7375
) : (
7476
<Typography
7577
variant="body2"

frontend/src/theme.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { createTheme } from '@mui/material/styles';
22

33
const theme = createTheme({
4+
spacing: 6,
45
palette: {
56
mode: 'dark',
67
primary: {
@@ -20,9 +21,17 @@ const theme = createTheme({
2021
},
2122
typography: {
2223
fontFamily: "'Roboto', 'Arial', sans-serif",
23-
h1: {
24+
h3: {
2425
fontSize: '3rem',
25-
fontWeight: 700,
26+
},
27+
h4: {
28+
fontSize: '2rem',
29+
},
30+
h5: {
31+
fontSize: '1.4rem',
32+
},
33+
h6: {
34+
fontSize: '1.2rem',
2635
},
2736
h2: {
2837
fontSize: '2.5rem',

0 commit comments

Comments
 (0)