From e1a646d99f8aa9857d00d074d9c8cbd0cc2b3e64 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 8 Nov 2018 18:46:04 +0100 Subject: [PATCH 01/20] Permitting external links and removing useless "back to corporate" link --- client/src/views/layout/header/imports.js | 8 ++++---- client/src/views/layout/header/index.js | 13 ++++++------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/client/src/views/layout/header/imports.js b/client/src/views/layout/header/imports.js index 77205f165..0a4cc0f0b 100644 --- a/client/src/views/layout/header/imports.js +++ b/client/src/views/layout/header/imports.js @@ -12,7 +12,7 @@ const usersMenus = { { title: 'Your profile', to: '/users/user', icon: Search }, { title: 'Directory', to: '/users/browse', icon: GamepadRounded }, { title: 'Search', to: '/users/search', icon: AccessibilityNew }, - { title: 'Report', to: '/report/users', icon: LibraryAdd } + { title: 'Report', to: 'https://github.com/AdvancedAlgos/UsersModule/issues/new', icon: LibraryAdd, externalLink: true } ] } @@ -24,7 +24,7 @@ const teamsMenus = { { title: 'Your teams', to: '/teams/manage-teams', icon: GamepadRounded }, { title: 'Team members', to: '/teams/team-members', icon: GamepadRounded }, { title: 'Financial beings', to: '/teams/financial-beings', icon: GamepadRounded }, - { title: 'Report', to: '/report/teams', icon: LibraryAdd } + { title: 'Report', to: 'https://github.com/AdvancedAlgos/TeamsModule/issues/new', icon: LibraryAdd, externalLink: true } ] } @@ -36,7 +36,7 @@ const eventsMenus = { { title: 'Your events', to: '/events/my', icon: GamepadRounded }, { title: 'Your hosted events', to: '/events/host', icon: AccessibilityNew }, { title: 'Host an event', to: '/events/create', icon: LibraryAdd }, - { title: 'Report', to: '/report/events', icon: LibraryAdd } + { title: 'Report', to: 'https://github.com/AdvancedAlgos/UsersModule/issues/new', icon: LibraryAdd, externalLink: true } ] } @@ -46,7 +46,7 @@ const keyvaultMenus = { submenus: [ { title: 'Manage keys', to: '/key-vault/browse', icon: Search }, { title: 'Add key', to: '/key-vault/addKey', icon: GamepadRounded }, - { title: 'Report', to: '/report/key-vault', icon: LibraryAdd } + { title: 'Report', to: 'https://github.com/AdvancedAlgos/KeyVaultModule/issues/new', icon: LibraryAdd, externalLink: true } ] } diff --git a/client/src/views/layout/header/index.js b/client/src/views/layout/header/index.js index bcbbfae4b..dcc5c8d95 100644 --- a/client/src/views/layout/header/index.js +++ b/client/src/views/layout/header/index.js @@ -4,9 +4,6 @@ import { Link } from 'react-router-dom' import jwtDecode from 'jwt-decode' import withWidth from '@material-ui/core/withWidth' -// icons -import ExitIcon from '@material-ui/icons/ExitToApp' - // styles import './styles.scss' @@ -92,7 +89,12 @@ class Header extends Component { this.toggleMenuOpen(index, true)}> {title} From 282d1b3085a863cff94e72db171f36a2df1d4ba4 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 9 Nov 2018 15:03:33 +0100 Subject: [PATCH 02/20] Moving styles to entry point and adding a homepage(unfinished) --- client/src/App.js | 1 + .../layout/header => styles}/styles.scss | 38 ++++++++++++ client/src/views/BannerTopBar/index.js | 18 ++++++ client/src/views/home/index.js | 62 +++---------------- client/src/views/layout/header/index.js | 3 - 5 files changed, 65 insertions(+), 57 deletions(-) rename client/src/{views/layout/header => styles}/styles.scss (91%) create mode 100644 client/src/views/BannerTopBar/index.js diff --git a/client/src/App.js b/client/src/App.js index 39d60ce90..206703826 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -7,6 +7,7 @@ import MuiThemeProvider from '@material-ui/core/styles/MuiThemeProvider' import CssBaseline from '@material-ui/core/CssBaseline' import { withStyles } from '@material-ui/core/styles' import { theme, globalStyles } from './styles' +import './styles/styles.scss' import { client } from './graphql/apollo' import Auth from './auth' diff --git a/client/src/views/layout/header/styles.scss b/client/src/styles/styles.scss similarity index 91% rename from client/src/views/layout/header/styles.scss rename to client/src/styles/styles.scss index 41a1fcc7b..01bed32ab 100644 --- a/client/src/views/layout/header/styles.scss +++ b/client/src/styles/styles.scss @@ -265,3 +265,41 @@ header.menu{ } } } + +.bannerTopBar{ + background-image: url(https://advancedalgos.net/img/photos/teams.jpg); + width: 100%; + height: 220px; + &.big{ + height: 100vh; + .caption{ + display: block; + } + } + &.medium{ + height: 50vh; + .caption{ + display: block; + } + } + .caption{ + display: none; + position: relative; + top: 50%; + transform: translateY(-100%); + font-family: Saira; + .title{ + color: white; + font-size: 64px; + line-height: 78px; + font-weight: 100; + } + .text{ + color: white; + font-size: 20px; + line-height: 30px; + font-weight: 600; + padding: 20px 0 0.5em 0; + } + } +} diff --git a/client/src/views/BannerTopBar/index.js b/client/src/views/BannerTopBar/index.js new file mode 100644 index 000000000..255e9888d --- /dev/null +++ b/client/src/views/BannerTopBar/index.js @@ -0,0 +1,18 @@ +import React from 'react' +import Typography from '@material-ui/core/Typography' + +const BannerTopBar = ({ + size, + backgroundUrl, + title, + text +}) => ( +
+
+ {title} + {text} +
+
+) + +export default BannerTopBar diff --git a/client/src/views/home/index.js b/client/src/views/home/index.js index f96414571..13fbe831e 100644 --- a/client/src/views/home/index.js +++ b/client/src/views/home/index.js @@ -1,63 +1,17 @@ import React, { Component } from 'react' -import PropTypes from 'prop-types' - -import CssBaseline from '@material-ui/core/CssBaseline' -import Typography from '@material-ui/core/Typography' -import { withStyles } from '@material-ui/core/styles' - -const styles = theme => ({ - '@global': { - body: { - backgroundColor: theme.palette.common.white - } - }, - layout: { - width: '100%', - height: '100%' - }, - heroContent: { - textColor: theme.palette.common.white, - maxWidth: 600, - height: 800, - margin: '0 auto', - padding: `${theme.spacing.unit * 8}px 0 ${theme.spacing.unit * 6}px` - } -}) +import BannerTopBar from '../BannerTopBar' class Home extends Component { render () { - const { classes } = this.props return ( - - -
-
- - Collaborate. Innovate. Evolve. - - - Welcome to the Advanced Algos Platform - -
-
- -
+ ) } } -Home.propTypes = { - classes: PropTypes.object.isRequired -} - -export default withStyles(styles)(Home) +export default Home diff --git a/client/src/views/layout/header/index.js b/client/src/views/layout/header/index.js index dcc5c8d95..6e024c37b 100644 --- a/client/src/views/layout/header/index.js +++ b/client/src/views/layout/header/index.js @@ -4,9 +4,6 @@ import { Link } from 'react-router-dom' import jwtDecode from 'jwt-decode' import withWidth from '@material-ui/core/withWidth' -// styles -import './styles.scss' - // components import { LoggedIn } from './LoggedIn' From 6ae96ccb4f2fbbd2a50dada77a320724889cac6b Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 9 Nov 2018 15:17:33 +0100 Subject: [PATCH 03/20] Making Banner's font responsive --- client/src/styles/styles.scss | 70 ++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 22 deletions(-) diff --git a/client/src/styles/styles.scss b/client/src/styles/styles.scss index 01bed32ab..a152e5ba1 100644 --- a/client/src/styles/styles.scss +++ b/client/src/styles/styles.scss @@ -1,24 +1,3 @@ -body{ - overflow-y:scroll; - - &::-webkit-scrollbar-track { - border: 1px solid #000; - padding: 2px 0; - background-color: #404040; - } - - &::-webkit-scrollbar { - width: 10px; - } - - &::-webkit-scrollbar-thumb { - border-radius: 10px; - box-shadow: inset 0 0 6px rgba(0,0,0,.3); - background-color: #737272; - border: 1px solid #000; - } -} - $break-big: 1280px; $break-middle: 992px; $break-small: 768px; @@ -40,6 +19,52 @@ $transition-time: 0.3s; $advanced-algos-red: rgb(245,88,88); +@function strip-unit($value) { + @return $value / ($value * 0 + 1); +} + +@mixin fluid-type($min-vw, $max-vw, $min-font-size, $max-font-size) { + $u1: unit($min-vw); + $u2: unit($max-vw); + $u3: unit($min-font-size); + $u4: unit($max-font-size); + + @if $u1 == $u2 and $u1 == $u3 and $u1 == $u4 { + & { + + font-size: $min-font-size; + @media screen and (min-width: $min-vw) { + font-size: calc(#{$min-font-size} + #{strip-unit($max-font-size - $min-font-size)} * ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})); + } + + @media screen and (min-width: $max-vw) { + font-size: $max-font-size; + } + } + } +} + +body{ + overflow-y:scroll; + + &::-webkit-scrollbar-track { + border: 1px solid #000; + padding: 2px 0; + background-color: #404040; + } + + &::-webkit-scrollbar { + width: 10px; + } + + &::-webkit-scrollbar-thumb { + border-radius: 10px; + box-shadow: inset 0 0 6px rgba(0,0,0,.3); + background-color: #737272; + border: 1px solid #000; + } +} + header.menu{ transition: $transition-time; &.notOnTop{ @@ -293,13 +318,14 @@ header.menu{ font-size: 64px; line-height: 78px; font-weight: 100; + @include fluid-type($break-extra-small, $break-big, 26px, 64px); } .text{ color: white; - font-size: 20px; line-height: 30px; font-weight: 600; padding: 20px 0 0.5em 0; + @include fluid-type($break-extra-small, $break-big, 18px, 20px); } } } From 438d4c34a5d04b5b44dd2cfced68738d5dad9f03 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 9 Nov 2018 15:45:36 +0100 Subject: [PATCH 04/20] Adding charts link and dropdown arrows --- client/src/styles/styles.scss | 28 +++++++++++++++++++++++++ client/src/views/layout/header/index.js | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/client/src/styles/styles.scss b/client/src/styles/styles.scss index a152e5ba1..8f148d3b6 100644 --- a/client/src/styles/styles.scss +++ b/client/src/styles/styles.scss @@ -202,6 +202,19 @@ header.menu{ min-width: 240px; min-height: 50px; border-bottom: 1px solid white; + &.hasChildren{ + &:after{ + content: ''; + float: right; + border: solid white; + border-width: 0 2px 2px 0; + padding: 3px; + margin-top: 18px; + margin-right: 7px; + transform: rotate(45deg); + -webkit-transform: rotate(45deg); + } + } &:last-child{ border-bottom: 0; } @@ -250,6 +263,21 @@ header.menu{ padding-bottom: ( $height-large-device - $text-height ) / 2; padding-right: 21px; padding-left: 21px; + &.hasChildren{ + &:after{ + content: ''; + border: solid white; + border-width: 0 2px 2px 0; + display: inline-block; + padding: 3px; + margin-bottom: 2px; + transform: rotate(45deg); + -webkit-transform: rotate(45deg); + } + >a{ + margin-right:6px; + } + } a{ color: white; text-decoration: none; diff --git a/client/src/views/layout/header/index.js b/client/src/views/layout/header/index.js index 6e024c37b..5fb90adbb 100644 --- a/client/src/views/layout/header/index.js +++ b/client/src/views/layout/header/index.js @@ -111,7 +111,7 @@ class Header extends Component {