-
Notifications
You must be signed in to change notification settings - Fork 0
/
Navigation.tsx
130 lines (126 loc) · 5.97 KB
/
Navigation.tsx
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
import { useRouter } from "next/router";
import Link from "next/link";
export default function Navbar() {
// Fetch the router
const router = useRouter();
return (
<div className="w-full mx-auto px-10 py-10 md:py-16 z-10">
<div className="flex md:flex-row justify-between items-center select-none">
<div className="flex flex-col">
<Link href="/" legacyBehavior>
<a>
<h1 className="text-xl">
Behn Hayhoe
</h1>
<p>
Software Engineer
</p>
</a>
</Link>
</div>
<div className="space-x-8 hidden md:block">
<Link href="/about" legacyBehavior>
<a
className={`text-base ${router.asPath === "/about"
? "font-bold"
: ""
}`}
>
About{" "}
{router.asPath === "/about" && (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
className="bi bi-arrow-down inline-block h-3 w-3"
viewBox="0 0 16 16"
>
<path
fillRule="evenodd"
d="M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"
/>
</svg>
)}
</a>
</Link>
<Link href="/experience" legacyBehavior>
<a
className={`text-base ${router.asPath === "/experience"
? "font-bold"
: ""
}`}
>
Experience{" "}
{router.asPath === "/experience" && (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
className="bi bi-arrow-down inline-block h-3 w-3"
viewBox="0 0 16 16"
>
<path
fillRule="evenodd"
d="M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"
/>
</svg>
)}
</a>
</Link>
<Link href="/blog" legacyBehavior>
<a
className={`text-base ${router.asPath === "/blog"
? "font-bold"
: ""
}`}
>
Blog{" "}
{router.asPath === "/blog" && (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
className="bi bi-arrow-down inline-block h-3 w-3"
viewBox="0 0 16 16"
>
<path
fillRule="evenodd"
d="M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"
/>
</svg>
)}
</a>
</Link>
<Link href="/listening" legacyBehavior>
<a
className={`text-base ${router.asPath === "/listening"
? "font-bold"
: ""
}`}
>
Listening
{router.asPath === "/listening" && (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
className="bi bi-arrow-down inline-block h-3 w-3"
viewBox="0 0 16 16"
>
<path
fillRule="evenodd"
d="M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"
/>
</svg>
)}
</a>
</Link>
</div>
</div>
</div>
);
}