Showing
1 changed file
with
87 additions
and
68 deletions
... | @@ -2,7 +2,6 @@ import React from "react"; | ... | @@ -2,7 +2,6 @@ import React from "react"; |
2 | import styled from "styled-components"; | 2 | import styled from "styled-components"; |
3 | import { Link } from "react-router-dom"; | 3 | import { Link } from "react-router-dom"; |
4 | import { Helmet } from "react-helmet"; | 4 | import { Helmet } from "react-helmet"; |
5 | -import Header from "../../Components/Header"; | ||
6 | import Input from "../../Components/Input"; | 5 | import Input from "../../Components/Input"; |
7 | import Button from "../../Components/Button"; | 6 | import Button from "../../Components/Button"; |
8 | import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | 7 | import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; |
... | @@ -12,6 +11,7 @@ import { | ... | @@ -12,6 +11,7 @@ import { |
12 | faGithub, | 11 | faGithub, |
13 | faGoogle, | 12 | faGoogle, |
14 | } from "@fortawesome/free-brands-svg-icons"; | 13 | } from "@fortawesome/free-brands-svg-icons"; |
14 | +import loginBackground from "../../Imgs/login-background4.jpg"; | ||
15 | 15 | ||
16 | const Wrapper = styled.div` | 16 | const Wrapper = styled.div` |
17 | width: 100%; | 17 | width: 100%; |
... | @@ -20,6 +20,19 @@ const Wrapper = styled.div` | ... | @@ -20,6 +20,19 @@ const Wrapper = styled.div` |
20 | flex-direction: column; | 20 | flex-direction: column; |
21 | justify-content: center; | 21 | justify-content: center; |
22 | align-items: center; | 22 | align-items: center; |
23 | + background-image: url(${loginBackground}); | ||
24 | + background-size: cover; | ||
25 | +`; | ||
26 | + | ||
27 | +const SubWrapper = styled.div` | ||
28 | + background-color: rgba(57, 65, 74, 0.5); | ||
29 | + border-radius: 7px; | ||
30 | + padding: 5%; | ||
31 | + display: flex; | ||
32 | + flex-direction: column; | ||
33 | + justify-content: center; | ||
34 | + align-items: center; | ||
35 | + color: white; | ||
23 | `; | 36 | `; |
24 | 37 | ||
25 | const Box = styled.div` | 38 | const Box = styled.div` |
... | @@ -40,8 +53,9 @@ const StateChanger = styled(Box)` | ... | @@ -40,8 +53,9 @@ const StateChanger = styled(Box)` |
40 | `; | 53 | `; |
41 | 54 | ||
42 | const ToggleSpan = styled.span` | 55 | const ToggleSpan = styled.span` |
56 | + margin-left: 5px; | ||
43 | cursor: pointer; | 57 | cursor: pointer; |
44 | - color: #0652dd; | 58 | + color: #079992; |
45 | `; | 59 | `; |
46 | 60 | ||
47 | const Form = styled(Box)` | 61 | const Form = styled(Box)` |
... | @@ -75,6 +89,10 @@ const SocialLogin = styled(Box)` | ... | @@ -75,6 +89,10 @@ const SocialLogin = styled(Box)` |
75 | opacity: 0.8; | 89 | opacity: 0.8; |
76 | `; | 90 | `; |
77 | 91 | ||
92 | +const StyledLink = styled(Link)` | ||
93 | + color: white; | ||
94 | +`; | ||
95 | + | ||
78 | export default ({ | 96 | export default ({ |
79 | action, | 97 | action, |
80 | setAction, | 98 | setAction, |
... | @@ -86,73 +104,74 @@ export default ({ | ... | @@ -86,73 +104,74 @@ export default ({ |
86 | onSubmit, | 104 | onSubmit, |
87 | }) => ( | 105 | }) => ( |
88 | <> | 106 | <> |
89 | - <Header /> | ||
90 | <Wrapper> | 107 | <Wrapper> |
91 | - <TitleContainer> | 108 | + <SubWrapper> |
92 | - <Title>Linker</Title> | 109 | + <TitleContainer> |
93 | - </TitleContainer> | 110 | + <StyledLink to="/"> |
94 | - <Form> | 111 | + <Title>Linker</Title> |
95 | - {action === "logIn" ? ( | 112 | + </StyledLink> |
96 | - <> | 113 | + </TitleContainer> |
97 | - <Helmet> | 114 | + <Form> |
98 | - <title>Log In</title> | 115 | + {action === "logIn" ? ( |
99 | - </Helmet> | 116 | + <> |
100 | - <form onSubmit={onSubmit}> | 117 | + <Helmet> |
101 | - <Input placeholder={"Email"} type="email" {...email} /> | 118 | + <title>Log In</title> |
102 | - <Input placeholder={"Password"} type="password" {...password} /> | 119 | + </Helmet> |
103 | - <Button text={"Log In"} /> | 120 | + <form onSubmit={onSubmit}> |
104 | - </form> | 121 | + <Input placeholder={"Email"} type="email" {...email} /> |
105 | - </> | 122 | + <Input placeholder={"Password"} type="password" {...password} /> |
106 | - ) : ( | 123 | + <Button text={"Log In"} /> |
107 | - <> | 124 | + </form> |
108 | - <Helmet> | 125 | + </> |
109 | - <title>Sign Up</title> | 126 | + ) : ( |
110 | - </Helmet> | 127 | + <> |
111 | - <form onSubmit={onSubmit}> | 128 | + <Helmet> |
112 | - <Input placeholder={"Email"} type="email" {...email} /> | 129 | + <title>Sign Up</title> |
113 | - <Input placeholder={"UserName"} {...username} /> | 130 | + </Helmet> |
114 | - <Input placeholder={"PhoneNumber"} {...phoneNum} /> | 131 | + <form onSubmit={onSubmit}> |
115 | - <Input placeholder={"Password"} type="password" {...password} /> | 132 | + <Input placeholder={"Email"} type="email" {...email} /> |
116 | - <Input | 133 | + <Input placeholder={"UserName"} {...username} /> |
117 | - placeholder={"Password for validation"} | 134 | + <Input placeholder={"Password"} type="password" {...password} /> |
118 | - type="password" | 135 | + <Input placeholder={"PhoneNumber"} {...phoneNum} /> |
119 | - {...password2} | 136 | + <Button text={"Sign Up"} /> |
120 | - /> | 137 | + </form> |
121 | - <Button text={"Sign Up"} /> | 138 | + </> |
122 | - </form> | 139 | + )} |
123 | - </> | 140 | + </Form> |
124 | - )} | 141 | + <StateChanger> |
125 | - </Form> | 142 | + {action === "logIn" ? ( |
126 | - <StateChanger> | 143 | + <> |
127 | - {action === "logIn" ? ( | 144 | + Don't you have an account ? |
128 | - <> | 145 | + <ToggleSpan onClick={() => setAction("signUp")}> |
129 | - Don't you have an account ? | 146 | + {" "} |
130 | - <ToggleSpan onClick={() => setAction("signUp")}> | 147 | + Sign Up{" "} |
131 | - {" "} | 148 | + </ToggleSpan> |
132 | - Sign Up{" "} | 149 | + </> |
133 | - </ToggleSpan> | 150 | + ) : ( |
134 | - </> | 151 | + <> |
135 | - ) : ( | 152 | + Did you have an account ? |
136 | - <> | 153 | + <ToggleSpan onClick={() => setAction("logIn")}> |
137 | - Did you have an account ? | 154 | + {" "} |
138 | - <ToggleSpan onClick={() => setAction("logIn")}> Log in </ToggleSpan> | 155 | + Log in{" "} |
139 | - </> | 156 | + </ToggleSpan> |
140 | - )} | 157 | + </> |
141 | - </StateChanger> | 158 | + )} |
142 | - <SocialLogin> | 159 | + </StateChanger> |
143 | - <Link to="/facebook"> | 160 | + <SocialLogin> |
144 | - <FontAwesomeIcon icon={faFacebook} /> | 161 | + <StyledLink to="/facebook"> |
145 | - </Link> | 162 | + <FontAwesomeIcon icon={faFacebook} /> |
146 | - <Link to="/google"> | 163 | + </StyledLink> |
147 | - <FontAwesomeIcon icon={faGoogle} /> | 164 | + <StyledLink to="/google"> |
148 | - </Link> | 165 | + <FontAwesomeIcon icon={faGoogle} /> |
149 | - <Link to="/twitter"> | 166 | + </StyledLink> |
150 | - <FontAwesomeIcon icon={faTwitter} /> | 167 | + <StyledLink to="/twitter"> |
151 | - </Link> | 168 | + <FontAwesomeIcon icon={faTwitter} /> |
152 | - <Link to="/github"> | 169 | + </StyledLink> |
153 | - <FontAwesomeIcon icon={faGithub} /> | 170 | + <StyledLink to="/github"> |
154 | - </Link> | 171 | + <FontAwesomeIcon icon={faGithub} /> |
155 | - </SocialLogin> | 172 | + </StyledLink> |
173 | + </SocialLogin> | ||
174 | + </SubWrapper> | ||
156 | </Wrapper> | 175 | </Wrapper> |
157 | </> | 176 | </> |
158 | ); | 177 | ); | ... | ... |
-
Please register or login to post a comment