Skip to content

removed some inline styles #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: frontend
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 44 additions & 16 deletions frontend/src/pages/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Grid from "@material-ui/core/Grid";
import Typography from "@material-ui/core/Typography";
import InputBase from "@material-ui/core/InputBase";
import Button from "@material-ui/core/Button";
import TextField from '@material-ui/core/TextField';
import useMediaQuery from '@material-ui/core/useMediaQuery';
import Switch from '@material-ui/core/Switch';
import { fetchUserDataFail, fetchUserDataSuccess, loginFail, loginSuccess } from '../redux'
Expand Down Expand Up @@ -55,7 +56,42 @@ const useStyles = makeStyles((theme) => ({
marginTop: theme.spacing(2),

},
link: {textDecoration: 'None', color: 'inherit'}
link: {textDecoration: 'None', color: 'inherit'},
// left landing text
leftGridTypo:{
height:"30%",width:'80%', fontWeight:700
},
// web button group outer div
webButtonOuter:{
display:"flex",justifyContent:"center",marginTop:"14%"
},
// web button group inner div
webButtonInner:{
display:'flex',flexDirection:"column",marginLeft:"auto",marginRight:"auto"
},
// mobile view main grid
mobileGrid:{
backgroundColor: "#212020",
color: "white",
minHeight:"105vh",
borderRadius: "1rem",
boxShadow: "0px 0px 39px 10px rgba(255,255,255,0.09) ",
margin:"5% 0 5% 0",
position:"relative", marginLeft: "auto", marginRight:"auto"
},
// mobile background
mobBackground:{
background:"linear-gradient(to right,#255093,pink)"
},
// mobile button group
mobButtonGrp:{
display:'flex',
flexDirection:"column",
marginLeft:"auto",
marginRight:"auto",
minHeight:"12rem",
marginTop:"40%"
}
}));

export default function LoginPage() {
Expand Down Expand Up @@ -100,10 +136,10 @@ export default function LoginPage() {
{matches?
<Grid container item xs={4} className={classes.left} justify="center" alignItems="center">
<Grid item className={classes.leftLanding} sm={5}>
<Typography variant="h5" style={{height:"30%",width:'80%', fontWeight:700}}>
<Typography variant="h5" className={classes.leftGridTypo}>
Hello there {isFaculty?"Teacher":"Student"}
</Typography>
<Typography variant="h4" style={{height:"30%",width:'80%', fontWeight:700}}>
<Typography variant="h4" className={classes.leftGridTypo}>
Welcome Back
</Typography>
</Grid>
Expand Down Expand Up @@ -142,8 +178,8 @@ export default function LoginPage() {
/>


<div style={{display:"flex",justifyContent:"center",marginTop:"14%"}}>
<div style={{display:'flex',flexDirection:"column",marginLeft:"auto",marginRight:"auto"}}>
<div className={classes.webButtonOuter}>
<div className={classes.webButtonInner}>
<Button onClick={handleSubmit} variant="contained" color="primary" style={{objectFit:"contain",maxHeight:"25%"}}>
Login
</Button>
Expand All @@ -167,17 +203,9 @@ export default function LoginPage() {
</Grid>
:
// Mobile web view
<Grid container style={{background:"linear-gradient(to right,#255093,pink)"}}>
<Grid container className={classes.mobBackground}>
<Grid container item xs={10} justify="center"
style={{
backgroundColor: "#212020",
color: "white",
minHeight:"105vh",
borderRadius: "1rem",
boxShadow: "0px 0px 39px 10px rgba(255,255,255,0.09) ",
margin:"5% 0 5% 0",
position:"relative", marginLeft: "auto", marginRight:"auto"
}}
className={classes.mobileGrid}
>
<Grid item xs={10} style={{marginTop:"30%"}}>
<Typography style={{fontSize:"1.2rem",lineHeight:"1.4rem", fontWeight:700}} >
Expand Down Expand Up @@ -212,7 +240,7 @@ export default function LoginPage() {
className={classes.appInputBase}
/>

<div style={{display:'flex',flexDirection:"column",marginLeft:"auto",marginRight:"auto",minHeight:"12rem",marginTop:"40%"}}>
<div className={classes.mobButtonGrp}>
<Button onClick={handleSubmit} variant="contained" color="primary" style={{height:"20%"}}>
Login
</Button>
Expand Down
42 changes: 27 additions & 15 deletions frontend/src/pages/SignUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,29 @@ const useStyles = makeStyles((theme) => ({
marginTop: theme.spacing(2),

},
link: {textDecoration: 'None', color: 'inherit'}
link: {textDecoration: 'None', color: 'inherit'},
// having a tough time typo
havTypography:{
height:"30%",width:'100%', fontWeight:700
},
// you are at the typo
youTypography:{
height:"30%",width:'80%', fontWeight:700
},
// mobile view grid
mobGrid:{
backgroundColor: "#212020",
color: "white",
minHeight:"105vh",
borderRadius: "1rem",
boxShadow: "0px 0px 39px 10px rgba(255,255,255,0.09) ",
margin:"5% 0 5% 0",
position:"relative", marginLeft: "auto", marginRight:"auto"
},
// mobile Background
mobBackground:{
background:"linear-gradient(to right,#255093,pink)"
}
}));
const items = [
['CS', 'COMPUTERS'],
Expand Down Expand Up @@ -135,10 +157,10 @@ export default function SignupPage() {
{matches?
<Grid container item xs={4} className={classes.left} justify="center" alignItems="center">
<Grid item className={classes.leftLanding} sm={7}>
<Typography variant="h5" style={{height:"30%",width:'100%', fontWeight:700}}>
<Typography variant="h5" className={classes.havTypography}>
Having a tough time verifying pending documents?
</Typography>
<Typography variant="h4" style={{height:"30%",width:'80%', fontWeight:700}}>
<Typography variant="h4" className={classes.youTypography}>
You're at the <u>right place</u>
</Typography>
</Grid>
Expand Down Expand Up @@ -284,18 +306,8 @@ export default function SignupPage() {
</Grid>
:
// Mobile view
<Grid container style={{background:"linear-gradient(to right,#255093,pink)"}}>
<Grid container item xs={10} justify="center"
style={{
backgroundColor: "#212020",
color: "white",
minHeight:"105vh",
borderRadius: "1rem",
boxShadow: "0px 0px 39px 10px rgba(255,255,255,0.09) ",
margin:"5% 0 5% 0",
position:"relative", marginLeft: "auto", marginRight:"auto"
}}
>
<Grid container className={classes.mobBackground}>
<Grid container item xs={10} justify="center" className={classes.mobGrid}>
<Grid item xs={10} style={{marginTop:"30%"}}>
<div style={{position:"absolute",minHeight:"50px",minWidth:"50px",borderRadius:"50%",background:"linear-gradient(to right,#225093,white)",top:"24%",right:"6%"}}>
</div>
Expand Down
3 changes: 3 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.