From f00f7203d0253e0a208ccbc0a2e14e0302d5269b Mon Sep 17 00:00:00 2001 From: faria ejaz Date: Sat, 8 Dec 2018 16:37:59 +0500 Subject: [PATCH 1/3] Revert "Revert "[WIP] redesigning home page"" This reverts commit e5e3b5c776db0dffdbbeae10947b364eaf553fdd. --- .../EventList/EventCard/EventCard.js | 17 ++- client/src/containers/Events/Events.js | 144 +++++++++--------- client/src/index.css | 14 ++ 3 files changed, 100 insertions(+), 75 deletions(-) diff --git a/client/src/components/EventList/EventCard/EventCard.js b/client/src/components/EventList/EventCard/EventCard.js index b7ebdbe..970e677 100644 --- a/client/src/components/EventList/EventCard/EventCard.js +++ b/client/src/components/EventList/EventCard/EventCard.js @@ -11,22 +11,31 @@ import { import moment from 'moment'; import { Link } from 'react-router-dom'; -const DATE_FORMAT = 'LLLL'; +const DATE_FORMAT = 'LL'; +const TIME_FORMAT = 'HH.A'; const EventCard = props => { const card = props.event; return ( - + - + - + {card.title} + + {moment(card.startDatetime).format(TIME_FORMAT)} + {' '} + -   + + {moment(card.endDatetime).format(TIME_FORMAT)} + {card.description} diff --git a/client/src/containers/Events/Events.js b/client/src/containers/Events/Events.js index e433943..a9a43f8 100644 --- a/client/src/containers/Events/Events.js +++ b/client/src/containers/Events/Events.js @@ -10,7 +10,15 @@ import { EventList } from '../../components/EventList/EventList'; import DropSearch, { State as DropSearchState, } from '../../components/DropSearch/DropSearch'; - +import EventCard from '../../components/EventList/EventCard/EventCard'; +import { + Card, + CardImg, + CardText, + CardBody, + CardTitle, + CardSubtitle, +} from 'reactstrap'; const mainTitle = 'Portal for Tech Communities'; const eventNotFound = 'No events found.'; @@ -23,92 +31,86 @@ class Events extends Component { componentDidMount() { this.getData(); } - getSortyByOptions = () => { - return [ - { - label: 'Start Date', - value: 'startDate', - }, - { - label: 'Organisation', - value: 'organisation', - }, - { - label: 'Sponsors', - value: 'sponsers', - }, - { - label: 'Location', - value: 'location', - }, - { - label: 'Tags', - value: 'tags', - }, - { - label: 'Time', - value: 'time', - }, - ]; - }; + // getSortyByOptions = () => { + // return [ + // { + // label: 'Start Date', + // value: 'startDate', + // }, + // { + // label: 'Organisation', + // value: 'organisation', + // }, + // { + // label: 'Sponsors', + // value: 'sponsers', + // }, + // { + // label: 'Location', + // value: 'location', + // }, + // { + // label: 'Tags', + // value: 'tags', + // }, + // { + // label: 'Time', + // value: 'time', + // }, + // ]; + // }; - handleSearchChange = (searchParams: DropSearchState) => { - if (searchParams) searchParams = makeQueryStringTransformable(searchParams); - this.getData(searchParams); - }; + // handleSearchChange = (searchParams: DropSearchState) => { + // if (searchParams) searchParams = makeQueryStringTransformable(searchParams); + // this.getData(searchParams); + // }; getData = e => { const { dispatch } = this.props; dispatch(fetchEvents(e)); }; - handleSubmit = (event: any) => { - event.preventDefault(); + // handleSubmit = (event: any) => { + // event.preventDefault(); - const { - title, - description, - startDateTime, - endDateTime, - organisation, - } = event.nativeEvent.target.elements; + // const { + // title, + // description, + // startDateTime, + // endDateTime, + // organisation, + // } = event.nativeEvent.target.elements; - this.props.dispatch( - postEvent({ - title: title.value, - description: description.value, - startDateTime: startDateTime.value, - endDateTime: endDateTime.value, - organisation: organisation.value, - }) - ); - }; + // this.props.dispatch( + // postEvent({ + // title: title.value, + // description: description.value, + // startDateTime: startDateTime.value, + // endDateTime: endDateTime.value, + // organisation: organisation.value, + // }) + // ); + // }; render() { const { events } = this.props; return (
- -

{mainTitle}

-
- - - - - - - - {events.events.length ? ( - - ) : ( + -

{eventNotFound}

+ + + {events.events.length ? ( + + ) : ( + +

{eventNotFound}

+
+ )} + +
- )} +
); } diff --git a/client/src/index.css b/client/src/index.css index 41bd704..651cd08 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -95,3 +95,17 @@ body { border-top: 1px solid #f5f5f5; padding: 10px; } + +.bgGradient { + font-family: robotto; + background: linear-gradient( + to top left, + rgba(225, 185, 185, 1), + rgba(254, 254, 233, 1) + ); +} + +.cardFormating { + width: 90%; + border-radius: 15px; +} From 9093b137c3928c44fc9f8d6995c93407283f7634 Mon Sep 17 00:00:00 2001 From: faria ejaz Date: Sat, 5 Jan 2019 15:31:38 +0500 Subject: [PATCH 2/3] [WIP] event cards designing --- client/public/index.html | 1 + .../EventList/EventCard/EventCard.js | 31 ++++++++++++++----- client/src/containers/Events/Events.js | 2 +- client/src/index.css | 13 ++++++++ 4 files changed, 38 insertions(+), 9 deletions(-) diff --git a/client/public/index.html b/client/public/index.html index ed0ebaf..aec4443 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -10,6 +10,7 @@ --> +