Skip to content

Commit d197cc1

Browse files
chore: remove unused code from prev design
1 parent 78174e8 commit d197cc1

25 files changed

Lines changed: 159 additions & 1015 deletions

File tree

frontend/src/components/Cards/DomainCard.tsx

Lines changed: 78 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,113 @@
11
import React from "react";
2-
import { createStyles, makeStyles } from "@material-ui/core/styles";
3-
import {
4-
Card,
5-
CardContent,
6-
CardMedia,
7-
IconButton,
8-
Typography,
9-
} from "@material-ui/core";
2+
import { createStyles, makeStyles, Theme } from "@material-ui/core/styles";
3+
import { IconButton, Typography } from "@material-ui/core";
104
import { Email, GitHub, LinkedIn } from "@material-ui/icons";
115

12-
const useStyles = makeStyles(() =>
6+
const useStyles = makeStyles((theme: Theme) =>
137
createStyles({
148
root: {
15-
margin: "1vh",
16-
height: "38vh",
17-
width: "30vh",
18-
background: "#ffd166",
9+
margin: "5vh 2vh",
10+
height: "25vh",
11+
width: "22vw",
12+
[theme.breakpoints.down("sm")]: {
13+
height: "30vh",
14+
width: "90vw",
15+
},
16+
background: "transparent",
17+
border: "2px solid cyan",
18+
display: "flex",
19+
flexDirection: "column",
20+
justifyContent: "space-around",
21+
alignItems: "center",
22+
borderRadius: "24px",
23+
boxShadow: "0px 0px 14px 5px #11BFD7",
1924
},
2025
title: {
2126
fontSize: "1.2rem",
22-
opacity: 0.8,
27+
[theme.breakpoints.down("sm")]: {
28+
fontSize: "1.5rem",
29+
},
30+
color: "white",
31+
opacity: 1,
32+
textAlign: "center",
33+
fontFamily: "monospace",
2334
fontWeight: "bold",
35+
transform: "translateY(-5vh)",
2436
},
25-
title2: {
26-
fontSize: "1rem",
27-
opacity: 0.8,
28-
fontWeight: "bold",
37+
subTitle: {
38+
[theme.breakpoints.down("sm")]: {
39+
fontSize: "1.2rem",
40+
},
41+
fontFamily: "monospace",
42+
textAlign: "center",
43+
color: "#BFC7D1",
44+
transform: "translateY(-5vh)",
2945
},
3046
media: {
31-
height: "25vh",
47+
width: "15vh",
48+
height: "15vh",
49+
borderRadius: "100%",
50+
border: "2px solid white",
51+
transform: "translateY(-6vh)",
52+
},
53+
iconsContainer: {
54+
transform: "translateY(-5vh)",
55+
display: "flex",
56+
justifyContent: "space-around",
57+
alignItems: "center",
58+
padding: "0 7vh",
59+
},
60+
icons: {
61+
color: "white",
3262
},
3363
})
3464
);
35-
interface DomainCardProps {
65+
66+
interface DomainCardInterface {
3667
name: string;
37-
profileImg: string;
68+
team: string;
69+
githubProfileUrl: string;
70+
linkedInProfileUrl: string;
3871
email: string;
39-
linkedIn?: string;
40-
github?: string;
72+
profileImg: string;
4173
}
42-
const DomainCard: React.FC<DomainCardProps> = ({
74+
75+
const DomainCard: React.FC<DomainCardInterface> = ({
4376
name,
77+
team,
78+
githubProfileUrl,
4479
email,
4580
profileImg,
46-
linkedIn,
47-
github,
81+
linkedInProfileUrl,
4882
}) => {
4983
const classes = useStyles();
5084
return (
51-
<Card className={classes.root}>
52-
<CardMedia
85+
<div className={classes.root}>
86+
<img
87+
src={"/webix.iiitdmj.ac.in/images/profile/" + profileImg}
88+
alt={name}
5389
className={classes.media}
54-
image={`/webix.iiitdmj.ac.in/images/profile/${profileImg}`}
55-
title={name}
5690
/>
57-
<CardContent>
58-
{name.length > 16 ? (
59-
<Typography className={classes.title2}>{name}</Typography>
60-
) : (
61-
<Typography className={classes.title}>{name}</Typography>
62-
)}
63-
<a href={linkedIn} target="_blank">
91+
<Typography className={classes.title}>{name}</Typography>
92+
<Typography className={classes.subTitle}>{team}</Typography>
93+
<div className={classes.iconsContainer}>
94+
<a href={githubProfileUrl} target="_blank">
95+
<IconButton>
96+
<GitHub className={classes.icons} />
97+
</IconButton>
98+
</a>
99+
<a href={email} target="_blank">
64100
<IconButton>
65-
<LinkedIn />
101+
<Email className={classes.icons} />
66102
</IconButton>
67103
</a>
68-
{github ? (
69-
<a href={github} target="_blank">
70-
<IconButton>
71-
<GitHub />
72-
</IconButton>
73-
</a>
74-
) : null}
75-
<a href={`mailto:${email}`} target="_blank">
104+
<a href={linkedInProfileUrl} target="_blank">
76105
<IconButton>
77-
<Email />
106+
<LinkedIn className={classes.icons} />
78107
</IconButton>
79108
</a>
80-
</CardContent>
81-
</Card>
109+
</div>
110+
</div>
82111
);
83112
};
84113

frontend/src/components/Cards/DomainCard_v2.tsx

Lines changed: 0 additions & 114 deletions
This file was deleted.

0 commit comments

Comments
 (0)