Skip to content

Commit 5c2ccdb

Browse files
Reposition navbar to right
Moved the light NavBar to be aligned right in People header and Research header, updating alignment to end. Simplified Research by removing tag filters and related state. Adjusted Research header container to justify-end and kept NavBar in light variant. Removed unused tag UI. X-Lovable-Edit-ID: edt-19b4e768-c293-4fd2-bf5b-9adcd371b9f4
2 parents e78ed87 + 579df4a commit 5c2ccdb

2 files changed

Lines changed: 4 additions & 36 deletions

File tree

src/pages/People.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const People = () => {
99
<div className="light-research min-h-screen bg-background text-foreground">
1010
{/* header */}
1111
<header className="sticky top-0 z-20 bg-background/95 backdrop-blur-sm">
12-
<div className="mx-auto max-w-[1200px] px-8 py-5 flex items-center justify-between">
12+
<div className="mx-auto max-w-[1200px] px-8 py-5 flex items-center justify-end">
1313
<NavBar variant="light" />
1414
</div>
1515
</header>

src/pages/Research.tsx

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
11
import { useState, useMemo } from "react";
2-
import { publications, type Tag } from "@/data/publications";
2+
import { publications } from "@/data/publications";
33
import { Search, ExternalLink } from "lucide-react";
44
import NavBar from "@/components/NavBar";
55

6-
const ALL_TAGS: Tag[] = ["human", "ai systems", "privacy", "security", "trust"];
7-
86
const Research = () => {
97
const [query, setQuery] = useState("");
10-
const [activeTags, setActiveTags] = useState<Set<Tag>>(new Set());
11-
12-
const toggleTag = (tag: Tag) => {
13-
setActiveTags((prev) => {
14-
const next = new Set(prev);
15-
if (next.has(tag)) next.delete(tag);
16-
else next.add(tag);
17-
return next;
18-
});
19-
};
208

219
const filtered = useMemo(() => {
2210
let result = publications;
@@ -30,35 +18,15 @@ const Research = () => {
3018
String(p.year).includes(q)
3119
);
3220
}
33-
if (activeTags.size > 0) {
34-
result = result.filter(
35-
(p) => p.tags && p.tags.some((t) => activeTags.has(t))
36-
);
37-
}
3821
return result;
39-
}, [query, activeTags]);
22+
}, [query]);
4023

4124
return (
4225
<div className="light-research min-h-screen bg-background text-foreground">
4326
{/* header */}
4427
<header className="sticky top-0 z-20 bg-background/95 backdrop-blur-sm">
45-
<div className="mx-auto max-w-[1200px] px-8 py-5 flex items-center justify-between">
28+
<div className="mx-auto max-w-[1200px] px-8 py-5 flex items-center justify-end">
4629
<NavBar variant="light" />
47-
<nav className="flex items-center gap-6">
48-
{ALL_TAGS.map((tag) => (
49-
<button
50-
key={tag}
51-
onClick={() => toggleTag(tag)}
52-
className={`text-sm capitalize transition-colors ${
53-
activeTags.has(tag)
54-
? "text-foreground font-medium underline underline-offset-4 decoration-2"
55-
: "text-muted-foreground hover:text-foreground"
56-
}`}
57-
>
58-
{tag}
59-
</button>
60-
))}
61-
</nav>
6230
</div>
6331
</header>
6432

0 commit comments

Comments
 (0)