Merge pull request #17 from nikolabjelo/master

Updating top bar
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2018-11-09 17:30:07 +01:00
commit 7953f32ae9
9 files changed
+29 -92

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@advancedalgos/events-client",
"version": "0.0.2",
"version": "0.0.3",
"description": "Advanced Algos Event client-side web app",
"author": "",
"license": "",
@@ -0,0 +1,18 @@
import React from 'react';
import Typography from '@material-ui/core/Typography';
const BannerTopBar = ({
size,
backgroundUrl,
title,
text,
}) => (
<div className={`bannerTopBar ${size}`} style={backgroundUrl ? { backgroundImage: `url(${backgroundUrl})` } : {}}>
<div className='caption'>
<Typography className='title' variant='h1' align='center'>{title}</Typography>
<Typography className='text' variant='h2' align='center'>{text}</Typography>
</div>
</div>
);
export default BannerTopBar;
+2 -2
View File
@@ -18,7 +18,7 @@ import {
import { withStyles } from '@material-ui/core/styles';
import styles from './styles';
import TopBar from '../../TopBar';
import BannerTopBar from '../../BannerTopBar';
import {
Basic,
@@ -72,7 +72,7 @@ class Create extends React.Component {
const { classes } = this.props;
return (
<React.Fragment>
<TopBar />
<BannerTopBar />
<Mutation mutation={hostedEventsCalls.EVENTS_CREATEEVENT}
update={(store, { data }) => {
this.props.history.push(`/events/edit/${data.events_CreateEvent.id}`);
+2 -2
View File
@@ -6,7 +6,7 @@ import { withStyles } from '@material-ui/core/styles';
import styles from './styles';
import TopBar from '../../TopBar';
import BannerTopBar from '../../BannerTopBar';
import { showEventCalls } from '../../../GraphQL/Calls/index';
@@ -14,7 +14,7 @@ class Edit extends React.Component {
render() {
return (
<React.Fragment>
<TopBar />
<BannerTopBar />
<Typography
variant='display1'
align='center'
+2 -2
View File
@@ -1,8 +1,8 @@
import React from 'react';
import TopBar from '../TopBar';
import BannerTopBar from '../BannerTopBar';
const Index = () => (
<TopBar size='big' title='Your events' text='Here will be the list of YOUR events' />
<BannerTopBar size='big' title='Your events' text='Here will be the list of YOUR events' />
);
export default Index;
+2 -2
View File
@@ -1,7 +1,7 @@
import React from 'react';
import { Query } from 'react-apollo';
import TopBar from '../TopBar';
import BannerTopBar from '../BannerTopBar';
import { hostedEventsCalls } from '../../GraphQL/Calls/index';
@@ -9,7 +9,7 @@ import Event from './Event';
const HostedEvent = () => (
<React.Fragment>
<TopBar size='medium' title='Your hosted events' text='You are one of the pillars of this community, thank you' />
<BannerTopBar size='medium' title='Your hosted events' text='You are one of the pillars of this community, thank you' />
<Query
query={hostedEventsCalls.EVENTS_EVENTSBYHOST}
>
+2 -2
View File
@@ -17,7 +17,7 @@ import {
import { withStyles } from '@material-ui/core/styles';
import styles from './styles';
import TopBar from '../TopBar';
import BannerTopBar from '../BannerTopBar';
import { listEventsCalls } from '../../GraphQL/Calls/index';
@@ -53,7 +53,7 @@ class Search extends React.Component {
const { value } = this.state;
return (
<React.Fragment>
<TopBar size='medium' title='Events' text='All the events are going to be listed here' />
<BannerTopBar size='medium' title='Events' text='All the events are going to be listed here' />
<Query
query={listEventsCalls.EVENTS_EVENTS}
>
-42
View File
@@ -1,42 +0,0 @@
import React from 'react';
import { Typography } from '@material-ui/core';
import { withStyles } from '@material-ui/core/styles';
import styles from './styles';
class TopBar extends React.Component {
render() {
const {
classes,
size,
title,
text,
} = this.props;
if (size === 'big') {
return (
<div className={classes.rootBig}>
<div className={classes.captions}>
<Typography className={classes.title} variant='headline' align='center'>{title}</Typography>
<Typography className={classes.text} variant='subheading' align='center'>{text}</Typography>
</div>
</div>
);
}
if (size === 'medium') {
return (
<div className={classes.rootMedium}>
<div className={classes.captions}>
<Typography className={classes.title} variant='headline' align='center'>{title}</Typography>
<Typography className={classes.text} variant='subheading' align='center'>{text}</Typography>
</div>
</div>
);
}
return (
<div className={classes.rootSmall} />
);
}
}
export default withStyles(styles)(TopBar);
-39
View File
@@ -1,39 +0,0 @@
const styles = () => ({
rootBig: {
backgroundImage: 'url(https://aacorporatesitedevelop.azurewebsites.net/img/photos/connect.jpg)',
width: '100%',
height: '100vh',
},
rootMedium: {
backgroundImage: 'url(https://aacorporatesitedevelop.azurewebsites.net/img/photos/connect.jpg)',
width: '100%',
height: '50vh',
},
rootSmall: {
backgroundImage: 'url(https://aacorporatesitedevelop.azurewebsites.net/img/photos/connect.jpg)',
width: '100%',
height: '220px',
},
captions: {
position: 'relative',
top: '50%',
transform: 'translateY(-50%)',
},
title: {
fontFamily: 'Saira',
color: 'white',
fontSize: '64px',
lineHeight: '78px',
fontWeight: 100,
},
text: {
fontFamily: 'Saira',
color: 'white',
fontSize: '20px',
lineHeight: '30px',
fontWeight: 600,
padding: '20px 0 0.5em 0',
},
});
export default styles;