@@ -3,7 +3,11 @@ import { Component } from 'react';
33import { withAuthorization } from '../Session' ;
44import { withFirebase } from '../Firebase' ;
55import { compose } from 'recompose' ;
6-
6+ import styled from "styled-components" ;
7+ import bgImg from "../../assets/bg6.jpg" ;
8+ import imgpng from "../../assets/elearning.png" ;
9+ import { Row , Column } from 'simple-flexbox' ;
10+ import { COLORS } from "../../constants/designConstants" ;
711class Home extends Component {
812 constructor ( props ) {
913 super ( props ) ;
@@ -13,12 +17,106 @@ class Home extends Component {
1317
1418 return (
1519 < div >
16- < h1 > Welcome back, { this . props . firebase . authUser . username } </ h1 >
17- < p > The Home Page is accessible by every signed in user.</ p >
20+
21+ < Container >
22+ < MainContainer >
23+ < h3 > Welcome back, { this . props . firebase . authUser . username } </ h3 >
24+ < FirstFrame >
25+ < InnerFirstFrame >
26+ < h4 > Always reach higher</ h4 >
27+ < p > Never stop chasing those dreams. Lorem ipsum lorem ipsum lorem ipsum < br />
28+ lorem ipsum lorem ipsum.</ p >
29+ < StyledButton > Explore</ StyledButton > </ InnerFirstFrame > </ FirstFrame >
30+ < RowFrame >
31+ < Frame style = { { backgroundColor : '#11917a' , backgroundImage : `${ imgpng } ` } } >
32+ </ Frame >
33+ < Frame style = { { backgroundColor : '#11917a' } } >
34+ </ Frame >
35+ < Frame >
36+ < p style = { { fontSize : '200px' , marginLeft :'auto' , marginRight : 'auto' , height : '50%' } } > 14</ p >
37+ < p > June, 2021</ p >
38+ </ Frame >
39+ </ RowFrame >
40+
41+ </ MainContainer >
1842
43+ < SideFrame >
44+ < h5 style = { { color : 'black' , textAlign : 'center' , marginTop : '5px' } } > Discover courses</ h5 >
45+ < InnerSideFrame >
46+
47+ </ InnerSideFrame >
48+ </ SideFrame >
49+ </ Container >
1950 </ div >
2051 )
2152 }
2253}
54+
55+
56+ const InnerSideFrame = styled . div `
57+ width:100%;
58+ height: 50%;
59+ background-color: #EDEDED;
60+ border-radius: 32px;
61+ ` ;
62+ const RowFrame = styled . div `display:flex;height:auto;` ;
63+ const Frame = styled . div `
64+ display:flex;
65+ border-radius:32px;
66+ height: 260px;
67+ margin: 10px 0;
68+ margin-right: 10px;
69+ min-width: 300px;
70+ max-width: 400px;
71+ `
72+ const InnerFirstFrame = styled . div `
73+ display:flex;
74+ flex-direction:column;
75+ padding-left: 10%;
76+ ` ;
77+ const StyledButton = styled . button `
78+ max-width: 150px;
79+ min-width: 100px;
80+ height: 40px;
81+ border: none;
82+ margin: 1rem 0;
83+ box-shadow: 0px 14px 9 px -15px rgba(0,0,0,0.25);
84+ border-radius: 32px;
85+ background-color: ${ COLORS . primaryBg } ;
86+ color: white;
87+ font-weight: 600;
88+ cursor: pointer;
89+ &:hover {
90+ background-color: #0087e0;
91+ }
92+ ` ;
93+ const MainContainer = styled . div `
94+ width:100%;height:100%;
95+ ` ;
96+ const Container = styled . div `
97+ display:flex;
98+ width: 100%;
99+ height: 100%;
100+ justify-content: space-between;
101+ ` ;
102+ const SideFrame = styled . div `
103+ width: 30%;
104+ height: 80vh;
105+ margin-top: 3%;
106+ background-color: white;
107+ border-radius: 32px;
108+ display: flex;
109+ padding: 15px;
110+ flex-direction: column;
111+ ` ;
112+ const FirstFrame = styled . div `
113+ margin-top: 3%;
114+ width: 90%;
115+ height: 300px;
116+ background-color: #F78888;
117+ border-radius: 32px;
118+ display:flex;
119+ align-items: center;
120+ ` ;
23121const condition = authUser => ! ! authUser ;
24122export default compose ( withFirebase , withAuthorization ( condition ) ) ( Home ) ;
0 commit comments