Skip to content

Commit 4591276

Browse files
authored
Merge pull request #26 from TryShape/Add-a-Landing-Page-#10
landing page code
2 parents f0ba576 + d8d081f commit 4591276

10 files changed

Lines changed: 804 additions & 95 deletions

File tree

.babelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"next/babel"
44
],
55
"plugins": [
6+
["transform-assets-import-to-string"],
67
[
78
"styled-components",
89
{

components/core/Landing.js

Lines changed: 457 additions & 14 deletions
Large diffs are not rendered by default.

components/utils/Header.js

Lines changed: 75 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,71 @@ import toast from "react-hot-toast";
1212
// icon
1313
import { FaShapes } from "react-icons/fa";
1414

15-
// Button
15+
// Bootstrap
1616
import Button from "react-bootstrap/Button";
17+
import InputGroup from 'react-bootstrap/InputGroup'
18+
import FormControl from 'react-bootstrap/FormControl'
19+
20+
import { FiSearch } from "react-icons/fi";
21+
22+
// Styled Component
23+
import styled from "styled-components";
24+
25+
const AppHeader = styled.div`
26+
position: fixed;
27+
z-index: 1;
28+
top: 0;
29+
right: 0;
30+
display: flex;
31+
justify-content: space-between;
32+
width: 100%;
33+
padding: 0.6rem 0.8rem;
34+
background-color: var(--color-brand);
35+
36+
.navbar-action--primary {
37+
padding: 0.3rem 1rem;
38+
border: solid 1px var(--color-primary-accent);
39+
background-color: var(--color-primary-accent);
40+
font-size: var(--fs-sm);
41+
font-weight: var(--fw-bold);
42+
color: var(--color-neutral-90);
43+
44+
svg {
45+
margin: -2px 0.6rem 0 0;
46+
}
47+
48+
&:hover,
49+
&:focus {
50+
border: solid 1px var(--color-neutral-10);
51+
background-color: var(--color-neutral-10);
52+
color: var(--color-brand);
53+
}
54+
55+
&:active {
56+
background-color: rgba(var(--color-neutral-10-rgb), 90%) !important;
57+
color: var(--color-brand) !important;
58+
}
59+
}
60+
`;
61+
62+
const NavbarSearchInput = styled(InputGroup)`
63+
width: 60% !important;
64+
border-radius: 0.4rem;
65+
background-color: rgba(var(--color-neutral-100-rgb), 0.3);
66+
`;
67+
68+
const NavbarSearchInputText = styled(InputGroup.Text)`
69+
background-color: transparent !important;
70+
border: 0 !important;
71+
`;
72+
73+
const NavbarSearchInputControl = styled(FormControl)`
74+
background-color: transparent !important;
75+
border: 0 !important;
76+
color: var(--color-neutral-10) !important;
77+
`;
78+
79+
InputGroup
1780

1881
const Header = ({ setOpen, user, setUser }) => {
1982
// console.log(user);
@@ -32,7 +95,7 @@ const Header = ({ setOpen, user, setUser }) => {
3295
};
3396

3497
return (
35-
<div>
98+
<AppHeader>
3699
<Link href="/">
37100
<a>
38101
TryShape
@@ -41,6 +104,14 @@ const Header = ({ setOpen, user, setUser }) => {
41104
</span>
42105
</a>
43106
</Link>
107+
<NavbarSearchInput>
108+
<NavbarSearchInputText id="basic-addon1"><FiSearch color='white' /></NavbarSearchInputText>
109+
<NavbarSearchInputControl
110+
placeholder="Search a shape"
111+
aria-label="Search a shape"
112+
aria-describedby="basic-addon1"
113+
/>
114+
</NavbarSearchInput>
44115
{(user.email || user.displayName) ? (
45116
<>
46117
<div>
@@ -60,11 +131,11 @@ const Header = ({ setOpen, user, setUser }) => {
60131
</Button>
61132
</>
62133
) : (
63-
<Button onClick={() => setOpen(true)}>
134+
<Button onClick={() => setOpen(true)} className="navbar-action--primary">
64135
<div>Sign In</div>
65136
</Button>
66137
)}
67-
</div>
138+
</AppHeader>
68139
);
69140
};
70141

0 commit comments

Comments
 (0)