tangled
alpha
login
or
join now
isuggest.selfce.st
/
strand
3
fork
atom
alternative tangled frontend (extremely wip)
3
fork
atom
overview
issues
pulls
pipelines
feat: initial navbar
serenity
3 weeks ago
189eba98
f5d65204
+41
-3
2 changed files
expand all
collapse all
unified
split
src
components
Nav
NavBarUnauthed.tsx
routes
index.tsx
+38
-2
src/components/Nav/NavBarUnauthed.tsx
···
1
1
+
import { StrandIcon } from "@/components/Icons/Branding/StrandIcon";
2
2
+
import { Link } from "@tanstack/react-router";
3
3
+
import { motion } from "motion/react";
4
4
+
1
5
export const NavBarUnauthed = () => {
2
6
return (
3
3
-
<div>
4
4
-
<p>Unauthed Nav Bar</p>
7
7
+
<div className="bg-surface0 flex w-full items-center justify-between p-4">
8
8
+
<div className="flex items-center gap-1">
9
9
+
<motion.div initial="initial" whileHover="hover">
10
10
+
<Link
11
11
+
to="/"
12
12
+
className="flex cursor-pointer items-center gap-1 pl-2 text-xl font-semibold"
13
13
+
>
14
14
+
<motion.div
15
15
+
variants={{
16
16
+
hover: { rotate: [0, -10, 10, -10, 10, 0] },
17
17
+
}}
18
18
+
whileTap={{ scale: 0.8 }}
19
19
+
transition={{ duration: 0.5, ease: "easeInOut" }}
20
20
+
>
21
21
+
<StrandIcon />
22
22
+
</motion.div>
23
23
+
<motion.div className="text-text relative inline-block">
24
24
+
<h1>Strand</h1>
25
25
+
<motion.span
26
26
+
className="bg-text absolute bottom-1 left-0 h-0.25 w-full origin-center"
27
27
+
variants={{
28
28
+
initial: { scaleX: 0 },
29
29
+
hover: { scaleX: 1 },
30
30
+
}}
31
31
+
transition={{
32
32
+
type: "spring",
33
33
+
duration: 0.25,
34
34
+
bounce: 0.3,
35
35
+
}}
36
36
+
/>
37
37
+
</motion.div>
38
38
+
</Link>
39
39
+
</motion.div>
40
40
+
</div>
5
41
</div>
6
42
);
7
43
};
+3
-1
src/routes/index.tsx
···
1
1
+
import { NavBarUnauthed } from "@/components/Nav/NavBarUnauthed";
1
2
import { createFileRoute, Link } from "@tanstack/react-router";
2
3
3
4
export const Route = createFileRoute("/")({ component: App });
4
5
5
6
function App() {
6
7
return (
7
7
-
<div className="flex min-w-screen flex-col items-center justify-center gap-4 pt-8">
8
8
+
<div className="flex min-w-screen flex-col items-center justify-center gap-4">
9
9
+
<NavBarUnauthed />
8
10
<h1 className="text-xl font-bold">
9
11
The better frontend for the better forge.
10
12
</h1>