|
1 | 1 | /** @jsx jsx */ |
| 2 | +import React from "react"; |
2 | 3 | import { jsx } from "@emotion/core"; |
3 | 4 | import { Link } from "@reach/router"; |
4 | 5 |
|
5 | 6 | function Navbar() { |
| 7 | + const styleMenu = { |
| 8 | + textDecoration: "none", |
| 9 | + color: "inherit", |
| 10 | + padding: "15px", |
| 11 | + borderRight: "1px solid #ddd", |
| 12 | + flex: "auto", |
| 13 | + ":last-child": { |
| 14 | + border: "none" |
| 15 | + } |
| 16 | + }; |
| 17 | + |
6 | 18 | return ( |
7 | | - <nav |
8 | | - css={{ |
9 | | - background: "#fff", |
10 | | - borderBottom: "1px solid #e5edef", |
11 | | - padding: "15px", |
12 | | - marginBottom: "2em" |
13 | | - }} |
14 | | - > |
15 | | - <div |
| 19 | + <> |
| 20 | + <nav |
16 | 21 | css={{ |
17 | | - maxWidth: "900px", |
18 | | - margin: "auto" |
| 22 | + background: "#fff", |
| 23 | + borderBottom: "1px solid #e5edef", |
| 24 | + padding: "15px", |
| 25 | + marginBottom: "2em", |
| 26 | + flex: 1 |
19 | 27 | }} |
20 | 28 | > |
21 | | - <Link to="/" css={{ textDecoration: "none" }}> |
22 | | - <h2 |
23 | | - css={{ |
24 | | - textDecoration: "none", |
25 | | - margin: "0", |
26 | | - fontSize: "35px", |
27 | | - fontWeight: "500", |
28 | | - backgroundImage: |
29 | | - "-webkit-gradient(linear, 0% 0%, 25% 100%,from(#c5e9a1), to(#00b7c6))", |
30 | | - WebkitBackgroundClip: "text", |
31 | | - WebkitTextFillColor: "transparent" |
32 | | - }} |
33 | | - > |
34 | | - Kampu |
35 | | - </h2> |
36 | | - </Link> |
37 | | - </div> |
38 | | - </nav> |
| 29 | + <div |
| 30 | + css={{ |
| 31 | + maxWidth: "900px", |
| 32 | + margin: "auto" |
| 33 | + }} |
| 34 | + > |
| 35 | + <Link to="/" css={{ textDecoration: "none" }}> |
| 36 | + <h2 |
| 37 | + css={{ |
| 38 | + textDecoration: "none", |
| 39 | + margin: "0", |
| 40 | + fontSize: "35px", |
| 41 | + fontWeight: "500", |
| 42 | + backgroundImage: |
| 43 | + "-webkit-gradient(linear, 0% 0%, 25% 100%,from(#c5e9a1), to(#00b7c6))", |
| 44 | + WebkitBackgroundClip: "text", |
| 45 | + WebkitTextFillColor: "transparent" |
| 46 | + }} |
| 47 | + > |
| 48 | + Kampu |
| 49 | + </h2> |
| 50 | + </Link> |
| 51 | + </div> |
| 52 | + <div |
| 53 | + css={{ |
| 54 | + position: "fixed", |
| 55 | + display: "flex", |
| 56 | + bottom: "1px", |
| 57 | + background: "#fff", |
| 58 | + border: "1px solid #ddd", |
| 59 | + right: "0", |
| 60 | + left: "0", |
| 61 | + alignItems: "center", |
| 62 | + justifyContent: "space-around", |
| 63 | + textAlign: "center" |
| 64 | + }} |
| 65 | + > |
| 66 | + <Link to="/" css={styleMenu}> |
| 67 | + Home |
| 68 | + </Link> |
| 69 | + <Link to="/favorites" css={styleMenu}> |
| 70 | + Heart |
| 71 | + </Link> |
| 72 | + <Link to="/" css={styleMenu}> |
| 73 | + Profile |
| 74 | + </Link> |
| 75 | + </div> |
| 76 | + </nav> |
| 77 | + </> |
39 | 78 | ); |
40 | 79 | } |
41 | 80 |
|
|
0 commit comments