Skip to content
This repository was archived by the owner on Mar 7, 2024. It is now read-only.

Commit 608084d

Browse files
Corrects header for campus leads page (#59)
* Corrects header for campus-leads header * Corrects header for campus-leads header
1 parent 6173b6f commit 608084d

File tree

12 files changed

+217
-38
lines changed

12 files changed

+217
-38
lines changed
3.82 MB
Loading
4.91 MB
Loading
1.81 MB
Loading

src/Routes.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import React, { lazy, Suspense, Fragment } from 'react';
33
import { Switch, Redirect, Route } from 'react-router-dom';
44
import MainLayout from 'src/layouts/MainLayout';
5+
import CLLayout from 'src/layouts/CLLayout';
56
import DocsLayout from 'src/layouts/DocsLayout';
67
import HomeView from 'src/views/pages/HomeView';
78
import CAView from 'src/views/pages/CLView';
@@ -46,7 +47,7 @@ const routesConfig = [
4647
},
4748
{
4849
path: '/campusLeaders',
49-
layout: MainLayout,
50+
layout: CLLayout,
5051
routes: [
5152
{
5253
exact: true,
@@ -108,8 +109,8 @@ const renderRoutes = routes =>
108109
{route.routes ? (
109110
renderRoutes(route.routes)
110111
) : (
111-
<Component {...props} />
112-
)}
112+
<Component {...props} />
113+
)}
113114
</Layout>
114115
</Guard>
115116
)}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import React from 'react';
2+
3+
import { Typography } from '@material-ui/core';
4+
// import authService from 'src/services/authService';
5+
6+
const OpenSource = () => (
7+
<div
8+
style={{
9+
display: 'flex',
10+
justifyContent: 'center',
11+
alignItems: 'center',
12+
minHeight: 64,
13+
backgroundColor: '#A60000'
14+
}}
15+
>
16+
<div
17+
style={{
18+
padding: '10% 10px',
19+
whiteSpace: 'nowrap'
20+
}}
21+
>
22+
<Typography variant="h6">Open Source</Typography>
23+
</div>
24+
</div>
25+
);
26+
27+
export default OpenSource;
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
import React from 'react';
2+
import { Link as RouterLink } from 'react-router-dom';
3+
import PropTypes from 'prop-types';
4+
import clsx from 'clsx';
5+
import {
6+
AppBar,
7+
Box,
8+
Hidden,
9+
Toolbar,
10+
makeStyles
11+
} from '@material-ui/core';
12+
import Logo from 'src/components/Logo';
13+
import OpenSource from './OpenSource';
14+
15+
const useStyles = makeStyles(theme => ({
16+
root: {
17+
zIndex: theme.zIndex.drawer + 100,
18+
backgroundColor: theme.palette.background.default,
19+
paddingLeft: 70,
20+
paddingRight: 70,
21+
[theme.breakpoints.down('md')]: {
22+
paddingLeft: 15,
23+
paddingRight: 15
24+
}
25+
},
26+
toolbar: {
27+
minHeight: 64
28+
},
29+
menuButton: {
30+
float: 'right',
31+
color: '#000',
32+
marginRight: '0px'
33+
},
34+
list: {
35+
width: '100% !important',
36+
display: 'flex',
37+
alignItems: 'center',
38+
justifyContent: 'center'
39+
},
40+
textStyle: {
41+
textDecoration: 'none'
42+
}
43+
}));
44+
45+
function TopBar({ className, onMobileNavOpen, ...rest }) {
46+
const classes = useStyles();
47+
48+
return (
49+
<AppBar className={clsx(classes.root, className)} {...rest}>
50+
<Toolbar className={classes.toolbar}>
51+
<RouterLink to="/">
52+
<Logo className={classes.logo} />
53+
</RouterLink>
54+
<Hidden smDown>
55+
<Box ml={2} flexGrow={1} />
56+
<Box ml={2} flexGrow={0.05} />
57+
58+
<Box ml={2}>
59+
<OpenSource />
60+
</Box>
61+
<Box ml={2} flexGrow={0.05} />
62+
63+
</Hidden>
64+
</Toolbar>
65+
</AppBar>
66+
);
67+
}
68+
69+
TopBar.propTypes = {
70+
className: PropTypes.string,
71+
onMobileNavOpen: PropTypes.func
72+
};
73+
74+
export default TopBar;

src/layouts/CLLayout/index.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import React from 'react';
2+
import PropTypes from 'prop-types';
3+
import { makeStyles } from '@material-ui/core';
4+
import TopBar from './TopBar';
5+
6+
const useStyles = makeStyles(theme => ({
7+
root: {
8+
backgroundColor: theme.palette.background.default,
9+
display: 'flex',
10+
height: '100%',
11+
overflow: 'hidden',
12+
width: '100%'
13+
},
14+
wrapper: {
15+
display: 'flex',
16+
flex: '1 1 auto',
17+
overflow: 'hidden',
18+
paddingTop: 64
19+
},
20+
contentContainer: {
21+
display: 'flex',
22+
flex: '1 1 auto',
23+
overflow: 'hidden'
24+
},
25+
content: {
26+
flex: '1 1 auto',
27+
height: '100%',
28+
overflow: 'auto'
29+
}
30+
}));
31+
32+
function CLLayout({ children }) {
33+
const classes = useStyles();
34+
35+
return (
36+
<div className={classes.root}>
37+
<TopBar />
38+
<div className={classes.wrapper}>
39+
<div className={classes.contentContainer}>
40+
<div className={classes.content}>{children}</div>
41+
</div>
42+
</div>
43+
</div>
44+
);
45+
}
46+
47+
CLLayout.propTypes = {
48+
children: PropTypes.any
49+
};
50+
51+
export default CLLayout;

src/views/pages/CLView/Apply.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ import {
1111
Hidden
1212
} from '@material-ui/core';
1313

14-
const background = 'linear-gradient(270.72deg, #180255 0.25%, #000000 97.54%)';
1514

1615
const useStyles = makeStyles(theme => ({
1716
root: {
1817
minHeight: '350px',
1918
color: '#FFF',
20-
background,
2119
padding: '100px 70px',
2220
[theme.breakpoints.down('md')]: {
2321
paddingLeft: 15,
@@ -54,7 +52,7 @@ function Apply({ className, ...rest }) {
5452
const classes = useStyles();
5553

5654
return (
57-
<div className={clsx(classes.root, className)} {...rest}>
55+
<div className={clsx(classes.root, className)} style={{ backgroundImage: 'url("/static/campusLeaders/apply.png")', backgroundSize: 'cover', backgroundRepeat: 'no-repeat' }} {...rest}>
5856
<Grid container maxWidth="lg">
5957
<Grid item lg={9} md={12} sm={12} xs={12} className={classes.applyleft}>
6058
<div className={classes.main}>

src/views/pages/CLView/CLViewData.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,23 @@ export const benefits = [
2121
detail: 'Connect with our mentors and Industry experts linked with us.'
2222
}
2323
];
24+
25+
export const values = [
26+
{
27+
id: '1',
28+
detail: 'He/she shall be entusiastic about going social and build & contribute for the community'
29+
},
30+
{
31+
id: '2',
32+
detail:
33+
'A Leader shall always have a way of talking people out from problems and leading them to do that for others too'
34+
},
35+
{
36+
id: '3',
37+
detail: 'He/she should be connecting to the resources available in community that might help in building a better & more helpful community'
38+
},
39+
{
40+
id: '4',
41+
detail: 'Connect with our mentors and Industry experts linked with us.'
42+
}
43+
];

src/views/pages/CLView/Hero.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ import {
1010
makeStyles
1111
} from '@material-ui/core';
1212

13-
const background = 'linear-gradient(270.72deg, #180255 0.25%, #000000 97.54%)';
1413

1514
const useStyles = makeStyles(theme => ({
1615
root: {
1716
minHeight: '350px',
1817
color: '#FFF',
19-
background,
2018
padding: '100px 70px',
2119
[theme.breakpoints.down('md')]: {
2220
paddingLeft: 15,
@@ -48,7 +46,7 @@ function Hero({ className, ...rest }) {
4846
const classes = useStyles();
4947

5048
return (
51-
<div className={clsx(classes.root, className)} {...rest}>
49+
<div className={clsx(classes.root, className)} style={{ backgroundImage: 'url("/static/campusLeaders/hero.png")', backgroundSize: 'cover', backgroundRepeat: 'no-repeat' }} {...rest}>
5250
<Container maxWidth="lg">
5351
<div className={classes.main}>
5452
<Typography variant="h1">Campus Leaders</Typography>

0 commit comments

Comments
 (0)