Thanks to visit codestin.com
Credit goes to github.com

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

Commit 3192774

Browse files
author
M-ZubairAhmed
committed
1. top banner component seperated out
2. top-banner included in events and space page
1 parent 7bda55e commit 3192774

File tree

3 files changed

+41
-22
lines changed

3 files changed

+41
-22
lines changed

components/top-banner.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import React from 'react';
2+
3+
export default props => (
4+
<div>
5+
<div>
6+
<div className="top_banner_root">
7+
<h1 className="top_banner_headline">{props.pageTitle}</h1>
8+
<h2>{props.pageSubTitle}</h2>
9+
</div>
10+
<style jsx>{`
11+
.top_banner_root {
12+
background-color: #f4f7fb;
13+
min-height: 200px;
14+
text-align: center;
15+
}
16+
.top_banner_headline {
17+
padding-top: 20px;
18+
font-size: 4em;
19+
color: #df1cb5;
20+
font-weight: 900;
21+
}
22+
`}</style>
23+
</div>
24+
</div>
25+
);

pages/events.js

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import fetch from 'isomorphic-unfetch';
33
import { Card, Divider, Dimmer, Loader } from 'semantic-ui-react';
44

55
import publicPage from '../hocs/public-page';
6+
import TopBanner from '../components/top-banner';
67
import { baseEventsURL, futureEventsURL, pastEventsURL } from '../utils/urls';
78
import RowEvent from '../components/row-events';
89

@@ -98,10 +99,10 @@ class Events extends React.Component {
9899
render() {
99100
return (
100101
<div>
101-
<div className="top_banner_root">
102-
<h1 className="top_banner_headline">Events</h1>
103-
<h2>Because you cannot change the world alone</h2>
104-
</div>
102+
<TopBanner
103+
pageTitle="Events"
104+
pageSubTitle="Because you cannot change the world alone"
105+
/>
105106
<main>
106107
{this.state.loading ? (
107108
<Dimmer active>
@@ -124,17 +125,6 @@ class Events extends React.Component {
124125
align-items: center;
125126
flex-direction: column;
126127
}
127-
.top_banner_root {
128-
background-color: #f4f7fb;
129-
min-height: 200px;
130-
text-align: center;
131-
}
132-
.top_banner_headline {
133-
padding-top: 20px;
134-
font-size: 4em;
135-
color: #df1cb5;
136-
font-weight: 900;
137-
}
138128
`}</style>
139129
</div>
140130
);

pages/space.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
import React from 'react';
22

3-
import Icon from '../components/icon';
3+
import TopBanner from '../components/top-banner';
44
import publicPage from '../hocs/public-page';
55

66
export default publicPage(() => (
77
<div>
8-
<main>
9-
<Icon />
10-
<h3>Under Construction, Coming Soon!...</h3>
11-
</main>
8+
<TopBanner
9+
pageTitle="Space"
10+
pageSubTitle="Physical spaces for collaboration, peer-learning and self-learning"
11+
/>
12+
<main>llll</main>
1213
<style jsx>{`
1314
main {
15+
background-color: #ffffff;
16+
padding-top: 30px;
17+
padding-bottom: 30px;
18+
padding-left: 30px;
19+
padding-right: 30px;
1420
min-height: calc(100vh - 70px);
15-
background: #f4f7fb;
16-
color: #314159;
1721
display: flex;
1822
justify-content: center;
1923
align-items: center;

0 commit comments

Comments
 (0)