From e722ae0e7e7b1658062319ee26b37a5880bd5fb7 Mon Sep 17 00:00:00 2001 From: Ahmed Shatat Date: Sat, 28 Jul 2018 17:18:14 +0300 Subject: [PATCH 1/5] header front-end with notifications --- frontend/src/components/Header/Header.js | 0 .../Header/HeaderTitle/HeaderTitle.js | 20 +++++++ .../Header/HeaderTitle/careandshare.png | Bin 0 -> 36698 bytes .../Notification/Notification.js | 18 +++++++ .../Header/Notifications/Notifications.js | 0 .../components/Header/Notifications/index.js | 39 ++++++++++++++ .../components/Header/Notifications/style.css | 50 +++++++++++++++++ frontend/src/components/Header/index.js | 29 ++++++++++ frontend/src/components/Header/style.css | 51 ++++++++++++++++++ 9 files changed, 207 insertions(+) delete mode 100644 frontend/src/components/Header/Header.js create mode 100755 frontend/src/components/Header/HeaderTitle/careandshare.png delete mode 100644 frontend/src/components/Header/Notifications/Notifications.js create mode 100644 frontend/src/components/Header/Notifications/index.js create mode 100644 frontend/src/components/Header/Notifications/style.css create mode 100644 frontend/src/components/Header/index.js create mode 100644 frontend/src/components/Header/style.css diff --git a/frontend/src/components/Header/Header.js b/frontend/src/components/Header/Header.js deleted file mode 100644 index e69de29..0000000 diff --git a/frontend/src/components/Header/HeaderTitle/HeaderTitle.js b/frontend/src/components/Header/HeaderTitle/HeaderTitle.js index e69de29..6fa312c 100644 --- a/frontend/src/components/Header/HeaderTitle/HeaderTitle.js +++ b/frontend/src/components/Header/HeaderTitle/HeaderTitle.js @@ -0,0 +1,20 @@ +import React, { Component } from 'react'; +import logo from './careandshare.png'; + +import ('../style.css'); + +class Title extends Component { + state = { + + } + + render(){ + return( + + logo + + ) + } +} + +export default Title; \ No newline at end of file diff --git a/frontend/src/components/Header/HeaderTitle/careandshare.png b/frontend/src/components/Header/HeaderTitle/careandshare.png new file mode 100755 index 0000000000000000000000000000000000000000..10dae4cdebc35b2ddaa68329f3503229e57531a7 GIT binary patch literal 36698 zcmeFZ1ymGT*FQXTcXxNq&_hatl$3PMFat<;N=bu+f`XKSgd!m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bd&Re_1j6|0W}OyAh6I1zk`%PROaWb?=yEG=f&zYdz;$|n0ulzVikx)m?9T@ zdSF}w<>)P#JV5g3DNV(C;~B>WHFnbazr}Eea`zF>f{o7PZ^uN zv{}{zFy=CTW+47SWm(h1(=@J#5tV^8xsmgy#=<9SiT`h7De2~`Ebtew`9H^;7tX?8 u$n0B7`mO!^hQ_|NpZ{YcnnGo=IRF|zLFhHU82m+L3$V3 +

{this.props.name} wants to connect with you!

+
+ + +
+ + ); + } +} + +export default Notification; \ No newline at end of file diff --git a/frontend/src/components/Header/Notifications/Notifications.js b/frontend/src/components/Header/Notifications/Notifications.js deleted file mode 100644 index e69de29..0000000 diff --git a/frontend/src/components/Header/Notifications/index.js b/frontend/src/components/Header/Notifications/index.js new file mode 100644 index 0000000..d8b9f5b --- /dev/null +++ b/frontend/src/components/Header/Notifications/index.js @@ -0,0 +1,39 @@ +import React, { Component } from 'react'; +import FontAwesomeIcon from 'react-fontawesome' + +import Notification from './Notification/Notification'; + +import('./style.css'); + +class Notifications extends Component { + state = { + toggle: false, + } + + toggleNotification = (e) => { + this.setState(prevState => ({ + toggle: !prevState.toggle + })); + } + + render () { + const notifications = this.props.connectReq.length? this.props.connectReq.map(element => { + return + }):

You have no notifications

; + + return( + + + + + {this.state.toggle? +
+ {notifications} +
: '' + } +
+ ); + } +} + +export default Notifications; \ No newline at end of file diff --git a/frontend/src/components/Header/Notifications/style.css b/frontend/src/components/Header/Notifications/style.css new file mode 100644 index 0000000..31c7630 --- /dev/null +++ b/frontend/src/components/Header/Notifications/style.css @@ -0,0 +1,50 @@ +.notifications { + width: 320px; + min-height: 100px; + background-color: #DFE2DB; + padding: 10px; + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + position: absolute; + top: 30px; + z-index: 1; +} + +.notifications .wrapper { + background-color: rgba(255, 255, 255, 0.8); + width: 300px; + height: 110px; + display: flex; + justify-content: center; + align-items: center; + flex-wrap: wrap; + margin-top: 7px; +} + +.notifications .wrapper div { + display: flex; + width: 80%; + justify-content: space-evenly; +} +.notifications .wrapper p { + width: 80%; + text-align: center; +} +.notifications .wrapper button { + cursor: pointer; + width: 90px; + height: 35px; + text-align: center; + border-radius: 18px; + background-color: #48A1AF; + border: none; +} +.notifications .wrapper button:hover { + box-shadow: 0 2px 5px -2px #000; +} + +.notifications .wrapper button:nth-child(2) { + background-color: #848484; +} \ No newline at end of file diff --git a/frontend/src/components/Header/index.js b/frontend/src/components/Header/index.js new file mode 100644 index 0000000..648162b --- /dev/null +++ b/frontend/src/components/Header/index.js @@ -0,0 +1,29 @@ +import React, { Component } from 'react'; +import FontAwesomeIcon from 'react-fontawesome' + +import HeaderTitle from './HeaderTitle/HeaderTitle'; +import Notifications from './Notifications'; + +import ('./style.css') + +class Header extends Component { + + + render(){ + return( +
+ + + + + + + + + +
+ ); + } +} + +export default Header; \ No newline at end of file diff --git a/frontend/src/components/Header/style.css b/frontend/src/components/Header/style.css new file mode 100644 index 0000000..2cbedab --- /dev/null +++ b/frontend/src/components/Header/style.css @@ -0,0 +1,51 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +.App { + width: 375px; + height: 667px; + max-width: 375px; + max-height: 667px; + margin: 0 auto; +} + +.App-header { + position: relative; + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 120px; + background-color: #48A1AF; + box-shadow: 0px 4px 10px -6px #000; +} + +.App-header a { + position: absolute; + font-size: 24px; + margin: 5px; + cursor: pointer; +} + +.App-header .menu { + left: 0; + top: 0; +} + +.App-header .angle-left { + left: 0; + bottom: 0; +} + +.App-header .notification { + font-size: 18px; + right: 0; + top: 0; +} + +.App-header-title { + width: 200px; +} \ No newline at end of file From 8d659f802fe32a40335086b0b908ba751905a473 Mon Sep 17 00:00:00 2001 From: Ahmed Shatat Date: Sat, 28 Jul 2018 17:39:04 +0300 Subject: [PATCH 2/5] add notification number --- .../src/components/Header/Notifications/index.js | 7 ++++--- .../src/components/Header/Notifications/style.css | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Header/Notifications/index.js b/frontend/src/components/Header/Notifications/index.js index d8b9f5b..ce315b4 100644 --- a/frontend/src/components/Header/Notifications/index.js +++ b/frontend/src/components/Header/Notifications/index.js @@ -17,14 +17,15 @@ class Notifications extends Component { } render () { - const notifications = this.props.connectReq.length? this.props.connectReq.map(element => { + const { connectReq } = this.props; + const notifications = connectReq.length? connectReq.map(element => { return }):

You have no notifications

; - + const bell = (connectReq.length && !this.state.toggle)?
{connectReq.length}
: ; return( - + {bell} {this.state.toggle?
diff --git a/frontend/src/components/Header/Notifications/style.css b/frontend/src/components/Header/Notifications/style.css index 31c7630..aa3897b 100644 --- a/frontend/src/components/Header/Notifications/style.css +++ b/frontend/src/components/Header/Notifications/style.css @@ -47,4 +47,18 @@ .notifications .wrapper button:nth-child(2) { background-color: #848484; +} + +.notification .num { + display: block; + width: 20px; + height: 20px; + border-radius: 50%; + background-color: #FC2E2E; + color: #fff; + text-align: center; + font-size: 19px; + position: absolute; + right: 10px; + top: 8px; } \ No newline at end of file From 45642011525af05fd74867bc7d1931ded12c1f7a Mon Sep 17 00:00:00 2001 From: Ahmed Shatat Date: Sat, 28 Jul 2018 18:06:53 +0300 Subject: [PATCH 3/5] add dynamic header --- frontend/src/components/Header/HeaderTitle/HeaderTitle.js | 8 +++----- frontend/src/components/Header/Notifications/index.js | 3 +++ frontend/src/components/Header/index.js | 2 +- frontend/src/components/Header/style.css | 6 ++++++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/Header/HeaderTitle/HeaderTitle.js b/frontend/src/components/Header/HeaderTitle/HeaderTitle.js index 6fa312c..1bb33b3 100644 --- a/frontend/src/components/Header/HeaderTitle/HeaderTitle.js +++ b/frontend/src/components/Header/HeaderTitle/HeaderTitle.js @@ -4,14 +4,12 @@ import logo from './careandshare.png'; import ('../style.css'); class Title extends Component { - state = { - - } - render(){ + const { title } = this.props; + return( - logo + {title?

{title}

:logo}
) } diff --git a/frontend/src/components/Header/Notifications/index.js b/frontend/src/components/Header/Notifications/index.js index ce315b4..7364777 100644 --- a/frontend/src/components/Header/Notifications/index.js +++ b/frontend/src/components/Header/Notifications/index.js @@ -18,10 +18,13 @@ class Notifications extends Component { render () { const { connectReq } = this.props; + const notifications = connectReq.length? connectReq.map(element => { return }):

You have no notifications

; + const bell = (connectReq.length && !this.state.toggle)?
{connectReq.length}
: ; + return( diff --git a/frontend/src/components/Header/index.js b/frontend/src/components/Header/index.js index 648162b..231fb00 100644 --- a/frontend/src/components/Header/index.js +++ b/frontend/src/components/Header/index.js @@ -13,7 +13,7 @@ class Header extends Component { return(
- + diff --git a/frontend/src/components/Header/style.css b/frontend/src/components/Header/style.css index 2cbedab..7332b47 100644 --- a/frontend/src/components/Header/style.css +++ b/frontend/src/components/Header/style.css @@ -28,6 +28,12 @@ font-size: 24px; margin: 5px; cursor: pointer; + text-decoration: none; + color: #000; +} + +.App-header h1 { + font-size: 30px; } .App-header .menu { From 10773ec572ae126e4a2423a4cf738d53b290ea83 Mon Sep 17 00:00:00 2001 From: Ahmed Shatat Date: Sat, 28 Jul 2018 20:37:51 +0300 Subject: [PATCH 4/5] add transition to notification menu CSS --- frontend/src/components/Header/Notifications/index.js | 6 ++++-- frontend/src/components/Header/Notifications/style.css | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Header/Notifications/index.js b/frontend/src/components/Header/Notifications/index.js index 7364777..bd06d34 100644 --- a/frontend/src/components/Header/Notifications/index.js +++ b/frontend/src/components/Header/Notifications/index.js @@ -30,10 +30,12 @@ class Notifications extends Component { {bell} - {this.state.toggle? + {this.state.toggle?
{notifications} -
: '' +
:
+ {notifications} +
}
); diff --git a/frontend/src/components/Header/Notifications/style.css b/frontend/src/components/Header/Notifications/style.css index aa3897b..a3b96f9 100644 --- a/frontend/src/components/Header/Notifications/style.css +++ b/frontend/src/components/Header/Notifications/style.css @@ -10,6 +10,12 @@ position: absolute; top: 30px; z-index: 1; + transition: all 0.5s ease; +} + +.hidden { + transform: translate(50%, -50%) scale(0); + transition: all 0.5s ease; } .notifications .wrapper { @@ -61,4 +67,4 @@ position: absolute; right: 10px; top: 8px; -} \ No newline at end of file +} From 40e0f1477cc72007c1f76835781b34211447cf47 Mon Sep 17 00:00:00 2001 From: Ahmed Shatat Date: Sun, 29 Jul 2018 16:33:03 +0300 Subject: [PATCH 5/5] fix: fix style loading error and statless component --- .../Header/HeaderTitle/HeaderTitle.js | 8 +-- .../Notification/Notification.js | 11 ++-- .../Notifications/Notification/style.css | 39 +++++++++++ .../components/Header/Notifications/index.js | 26 ++++---- .../components/Header/Notifications/style.css | 65 ++++--------------- frontend/src/components/Header/index.js | 7 +- frontend/src/components/Header/style.css | 2 +- 7 files changed, 76 insertions(+), 82 deletions(-) create mode 100644 frontend/src/components/Header/Notifications/Notification/style.css diff --git a/frontend/src/components/Header/HeaderTitle/HeaderTitle.js b/frontend/src/components/Header/HeaderTitle/HeaderTitle.js index 1bb33b3..693a58b 100644 --- a/frontend/src/components/Header/HeaderTitle/HeaderTitle.js +++ b/frontend/src/components/Header/HeaderTitle/HeaderTitle.js @@ -3,16 +3,12 @@ import logo from './careandshare.png'; import ('../style.css'); -class Title extends Component { - render(){ - const { title } = this.props; - +const Title = ({ title }) => { return( {title?

{title}

:logo}
- ) - } + ); } export default Title; \ No newline at end of file diff --git a/frontend/src/components/Header/Notifications/Notification/Notification.js b/frontend/src/components/Header/Notifications/Notification/Notification.js index 9eccaec..0aa5fe2 100644 --- a/frontend/src/components/Header/Notifications/Notification/Notification.js +++ b/frontend/src/components/Header/Notifications/Notification/Notification.js @@ -1,18 +1,17 @@ import React , { Component } from 'react'; -class Notification extends Component { - - render(){ +import './style.css'; + +const Notification = ({name}) => { return ( -
-

{this.props.name} wants to connect with you!

+
+

{name} wants to connect with you!

); - } } export default Notification; \ No newline at end of file diff --git a/frontend/src/components/Header/Notifications/Notification/style.css b/frontend/src/components/Header/Notifications/Notification/style.css new file mode 100644 index 0000000..2575ad3 --- /dev/null +++ b/frontend/src/components/Header/Notifications/Notification/style.css @@ -0,0 +1,39 @@ +.notification-wrapper { + background-color: rgba(255, 255, 255, 0.8); + width: 300px; + height: 110px; + display: flex; + justify-content: center; + align-items: center; + flex-wrap: wrap; + margin-top: 7px; +} + +.notification-wrapper div { + display: flex; + width: 80%; + justify-content: space-evenly; +} + +.notification-wrapper p { + width: 80%; + text-align: center; +} + +.notification-wrapper button { + cursor: pointer; + width: 90px; + height: 35px; + text-align: center; + border-radius: 18px; + background-color: #48A1AF; + border: none; +} + +.notification-wrapper button:hover { + box-shadow: 0 2px 5px -2px #000; +} + +.notification-wrapper button:nth-child(2) { + background-color: #848484; +} diff --git a/frontend/src/components/Header/Notifications/index.js b/frontend/src/components/Header/Notifications/index.js index bd06d34..478a554 100644 --- a/frontend/src/components/Header/Notifications/index.js +++ b/frontend/src/components/Header/Notifications/index.js @@ -3,40 +3,38 @@ import FontAwesomeIcon from 'react-fontawesome' import Notification from './Notification/Notification'; -import('./style.css'); +import './style.css'; class Notifications extends Component { state = { - toggle: false, + show: false, } toggleNotification = (e) => { this.setState(prevState => ({ - toggle: !prevState.toggle + show: !prevState.show })); } render () { const { connectReq } = this.props; - + const { show } = this.state; + const notifications = connectReq.length? connectReq.map(element => { return }):

You have no notifications

; - const bell = (connectReq.length && !this.state.toggle)?
{connectReq.length}
: ; - return( - {bell} - - {this.state.toggle? -
- {notifications} -
:
- {notifications} +
+ {(connectReq.length && !show)?{connectReq.length}:''} +
- } + +
+ {notifications} +
); } diff --git a/frontend/src/components/Header/Notifications/style.css b/frontend/src/components/Header/Notifications/style.css index a3b96f9..fe808f5 100644 --- a/frontend/src/components/Header/Notifications/style.css +++ b/frontend/src/components/Header/Notifications/style.css @@ -1,3 +1,17 @@ +.notification .num { + display: block; + width: 20px; + height: 20px; + border-radius: 50%; + background-color: #FC2E2E; + color: #fff; + text-align: center; + font-size: 19px; + position: absolute; + right: 10px; + top: 8px; +} + .notifications { width: 320px; min-height: 100px; @@ -17,54 +31,3 @@ transform: translate(50%, -50%) scale(0); transition: all 0.5s ease; } - -.notifications .wrapper { - background-color: rgba(255, 255, 255, 0.8); - width: 300px; - height: 110px; - display: flex; - justify-content: center; - align-items: center; - flex-wrap: wrap; - margin-top: 7px; -} - -.notifications .wrapper div { - display: flex; - width: 80%; - justify-content: space-evenly; -} -.notifications .wrapper p { - width: 80%; - text-align: center; -} -.notifications .wrapper button { - cursor: pointer; - width: 90px; - height: 35px; - text-align: center; - border-radius: 18px; - background-color: #48A1AF; - border: none; -} -.notifications .wrapper button:hover { - box-shadow: 0 2px 5px -2px #000; -} - -.notifications .wrapper button:nth-child(2) { - background-color: #848484; -} - -.notification .num { - display: block; - width: 20px; - height: 20px; - border-radius: 50%; - background-color: #FC2E2E; - color: #fff; - text-align: center; - font-size: 19px; - position: absolute; - right: 10px; - top: 8px; -} diff --git a/frontend/src/components/Header/index.js b/frontend/src/components/Header/index.js index 231fb00..19e7529 100644 --- a/frontend/src/components/Header/index.js +++ b/frontend/src/components/Header/index.js @@ -4,21 +4,20 @@ import FontAwesomeIcon from 'react-fontawesome' import HeaderTitle from './HeaderTitle/HeaderTitle'; import Notifications from './Notifications'; -import ('./style.css') +import './style.css'; class Header extends Component { - render(){ return(
- + - +
diff --git a/frontend/src/components/Header/style.css b/frontend/src/components/Header/style.css index 7332b47..7ae84d5 100644 --- a/frontend/src/components/Header/style.css +++ b/frontend/src/components/Header/style.css @@ -4,7 +4,7 @@ box-sizing: border-box; } -.App { +#root { width: 375px; height: 667px; max-width: 375px;