Moving styles to entry point and adding a homepage(unfinished)

This commit is contained in:
Unknown committed 2018-11-09 15:03:33 +01:00
1 parent 5ae0009cd3
commit 282d1b3085
5 files changed
+65 -57

No files matched your search

+18
View File
@@ -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
+8 -54
View File
@@ -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 (
<React.Fragment>
<CssBaseline />
<main className={classes.layout}>
<div className={classes.heroContent}>
<Typography
variant='h2'
align='center'
color='textPrimary'
gutterBottom
>
Collaborate. Innovate. Evolve.
</Typography>
<Typography
variant='h6'
align='center'
color='textSecondary'
component='h3'
>
Welcome to the Advanced Algos Platform
</Typography>
</div>
</main>
</React.Fragment>
<BannerTopBar
size='big'
title='Advanced Algos Platform'
text='Enabling the evolutionary race towards the emergence of superalgos'
backgroundUrl='https://aacorporatesitedevelop.azurewebsites.net/img/photos/superalgos-platform.jpg'
/>
)
}
}
Home.propTypes = {
classes: PropTypes.object.isRequired
}
export default withStyles(styles)(Home)
export default Home
-3
View File
@@ -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'
-267
View File
@@ -1,267 +0,0 @@
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;
$break-extra-small: 532px;
$height-large-device: 131px;
$height-small-device: 220px;
$height-not-top: 87px;
$image-height-big: 75px;
$image-height-small: 45px;
$text-height: 25px;
$mobile-handle-height: 45px;
$transition-time: 0.3s;
$advanced-algos-red: rgb(245,88,88);
header.menu{
transition: $transition-time;
&.notOnTop{
background-color: rgba(0, 0, 0, 0.6);
border-bottom: 1px solid rgba(210, 217, 224, 0.5);
height: $height-not-top;
.container{
border-bottom: 0px;
img.logo{
margin-top: ( $height-not-top - $image-height-small ) / 2;
height: $image-height-small;
}
.mobileHandle{
margin-top: ( $height-not-top - $mobile-handle-height ) / 2 ;
margin-bottom: ( $height-not-top - $mobile-handle-height ) / 2 ;
}
nav.links{
@media screen and (min-width: $break-big) {
ul.primaryMenu{
li.primaryLink{
padding-top: ( $height-not-top - $text-height ) / 2;
padding-bottom: ( $height-not-top - $text-height ) / 2;
}
}
}
}
}
}
position: fixed;
height: $height-large-device;
width: 100vw;
z-index: 125;
@media screen and (max-width: $break-extra-small) {
height: $height-small-device;
}
.container{
height: 100%;
border-bottom: 1px solid rgba(142, 144, 146, 0.3);
width: 100%;
@media screen and (min-width: $break-small) {
width: 750px;
}
@media screen and (min-width: $break-middle) {
width: 970px;
}
@media screen and (min-width: $break-big) {
width: 1270px;
}
padding-left: 15px;
padding-right: 15px;
margin-left: auto;
margin-right: auto;
img.logo{
transition: $transition-time;
margin-top: ( $height-large-device - $image-height-big ) / 2 ;
height: $image-height-big;
}
.mobileHandle.openedMobile{
&:before{
content: "";
position: absolute;
left: 16px;
top: 17px;
width: 1em;
height: 0.15em;
background: $advanced-algos-red;
box-shadow:
0 0.25em 0 0 $advanced-algos-red,
0 0.5em 0 0 $advanced-algos-red;
}
}
.mobileHandle:not(.openedMobile){
&:before{
content: "";
position: absolute;
left: 16px;
top: 17px;
width: 1em;
height: 0.15em;
background: rgba(210, 217, 224, 0.9);
box-shadow:
0 0.25em 0 0 rgba(210, 217, 224, 0.9),
0 0.5em 0 0 rgba(210, 217, 224, 0.9);
}
}
.mobileHandle{
&.openedMobile{
color: $advanced-algos-red;
border: 1px solid $advanced-algos-red;
}
transition: $transition-time;
display: block;
height: $mobile-handle-height;
line-height: $mobile-handle-height;
border: 1px solid rgba(210, 217, 224, 0.5);
text-transform: uppercase;
color: rgba(210, 217, 224, 0.9);
text-align: center;
float: right;
width: auto;
clear: none;
margin-top: ( $height-large-device - $mobile-handle-height ) / 2 ;
margin-bottom: ( $height-large-device - $mobile-handle-height ) / 2 ;
margin-left: 0;
margin-right: 20px;
margin: 41px 0 42px 20px;
padding: 0 18px 0 40px;
position: relative;
text-decoration: none;
border-radius: 31px;
@media screen and (min-width: $break-big) {
display: none;
}
}
nav.links{
@media screen and (max-width: $break-big - 1) {
display: none;
&.openedMobile{
display: block;
}
ul.primaryMenu{
padding-left: 20px;
padding-right: 20px;
background-color: rgba(0, 0, 0, 0.6);
font-family: 'Saira';
font-size: 12px;
font-weight: 700;
line-height: $text-height;
text-transform: uppercase;
list-style: none;
li.primaryLink{
min-width: 240px;
min-height: 50px;
border-bottom: 1px solid white;
&:last-child{
border-bottom: 0;
}
a{
text-transform: uppercase;
display: block;
font-size: 13px;
height: 50px;
line-height: 50px;
font-weight: 700;
letter-spacing: 1px;
padding: 0 40px 0 30px;
text-decoration: none;
color: white;
}
ul.subMenu{
display: none;
list-style: none;
}
&.selected{
ul.subMenu{
display: block;
}
}
}
}
}
@media screen and (min-width: $break-big) {
display: block;
float: right;
ul.primaryMenu{
margin: 0 4px 0 0;
list-style: none;
font-family: 'Saira';
font-size: 12px;
font-weight: 700;
line-height: $text-height;
text-transform: uppercase;
li.primaryLink{
transition: $transition-time;
display: block;
float: left;
position: relative;
padding-top: ( $height-large-device - $text-height ) / 2;
padding-bottom: ( $height-large-device - $text-height ) / 2;
padding-right: 21px;
padding-left: 21px;
a{
color: white;
text-decoration: none;
&.selected{
color: $advanced-algos-red;
}
}
ul.subMenu{
display: none;
position: absolute;
top: 100%;
left: 0;
padding: 18px 30px;
list-style: none;
font-family: 'Saira';
font-size: 12px;
font-weight: 300;
line-height: $text-height;
min-width: 240px;
background-color: rgba(0, 0, 0, 0.6);
li{
height: 30px;
}
}
&.selected{
&>a{
color: $advanced-algos-red;
}
ul.subMenu{
display: block;
}
}
}
}
}
}
}
}