-
-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathNav.js
More file actions
187 lines (181 loc) · 4.81 KB
/
Nav.js
File metadata and controls
187 lines (181 loc) · 4.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
import React, { useState } from "react";
import Link from "next/link";
import { slide as Menu } from "react-burger-menu";
import { FaDiscord, FaEnvelope, FaGithub } from "react-icons/fa";
export default function Nav() {
return (
<div
className="navbar fixed w-full flex md:flex-col px-4 md:px-6 py-2 md:py-6 md:pb-7 z-30 bg-sky text-paper md:h-full items-center justify-between
md:static md:w-auto md:bg-paper md:text-sky md:max-h-screen md:justify-between
child:pl-2 child:md:pl-0 child:text-lg "
>
<div>
<Link href="/">
<img src={"/images/logo.svg"} className=" cursor-pointer pl-0 md:pb-3 h-16" />
</Link>
<div
className="md:flex child:pl-3 md:text-xl child:md:pl-1 child:md:pt-2 hidden md:flex-col
child:brightness-100 child:transition"
>
<Link href="/projects">Projects</Link>
<Link href="/team">Team</Link>
<Link href="/blog">Blog</Link>
<Link href="/notes">Notes</Link>
<Link href="/press">Press</Link>
<Link href="/about">About</Link>
<Link href="/faq">FAQ</Link>
<Link href="/donations">Donations</Link>
<Link href="/privacy-policy">Privacy Policy</Link>
<Link href="/dataset-requests">Dataset Requests</Link>
<Link href="/impressum">Impressum</Link>
</div>
</div>
<div className="child:mr-3 -ml-0.5 child:w-8 child:brightness-100 child:transition hidden md:flex">
<a
href="mailto:contact@laion.ai"
target="_blank"
rel="noopener noreferrer"
>
<FaEnvelope />
</a>
<a
href="https://discord.com/invite/eq3cAMZtCC"
target="_blank"
rel="noopener noreferrer"
>
<FaDiscord />
</a>
<a
href="https://github.com/LAION-AI/"
target="_blank"
rel="noopener noreferrer"
>
<FaGithub />
</a>
</div>
<Hamburger />
</div>
);
}
function Hamburger() {
const [isOpen, setOpen] = useState(false);
var style = {
bmBurgerButton: {
position: "fixed",
width: "1.2em",
height: "1.0em",
right: "1.2rem",
top: "1em",
},
bmBurgerBars: {
background: "#fff",
},
bmBurgerBarsHover: {
background: "#fff",
},
bmCrossButton: {
height: "24px",
width: "24px",
},
bmCross: {
background: "#fff",
},
bmMenuWrap: {
position: "fixed",
height: "100%",
top: "0px",
},
bmMenu: {
background: "#1D374E",
padding: "2.5em 1.5em 0",
},
bmMorphShape: {
fill: "#fff",
},
bmItemList: {
color: "#fff",
padding: "0.8em",
},
bmItem: {
display: "inline-block",
},
bmOverlay: {
background: "rgba(0, 0, 0, 0.3)",
position: "fixed",
top: "0px",
left: "0px",
},
};
return (
<div className="md:hidden">
<Menu
right
styles={style}
isOpen={isOpen}
onOpen={() => {
setOpen(true);
}}
onClose={() => {
setOpen(false);
}}
>
<div>
<div
className="child:pb-2 child:child:text-2xl"
onClick={() => {
setOpen(false);
}}
>
<p>
<Link href="/projects">Projects</Link>
</p>
<p>
<Link href="/team">Team</Link>
</p>
<p>
<Link href="/blog">Blog</Link>
</p>
<p>
<Link href="/about">About</Link>
</p>
<p>
<Link href="/faq">FAQ</Link>
</p>
<p>
<Link href="/privacy-policy">Privacy Policy</Link>
</p>
<p>
<Link href="/dataset-requests">Dataset Requests</Link>
</p>
<p>
<Link href="/impressum">Impressum</Link>
</p>
</div>
<div className="child:mr-3 pt-4 child:w-8 child:brightness-100 hover:child:brightness-90 child:transition flex">
<a
href="mailto:contact@laion.ai"
target="_blank"
rel="noopener noreferrer"
>
<FaEnvelope />
</a>
<a
href="https://discord.com/invite/eq3cAMZtCC"
target="_blank"
rel="noopener noreferrer"
>
<FaDiscord />
</a>
<a
href="https://github.com/LAION-AI/"
target="_blank"
rel="noopener noreferrer"
>
<FaGithub />
</a>
</div>
</div>
</Menu>
</div>
);
}