Skip to content

Commit f66e62b

Browse files
committed
fix: center aligned navigation dropdown
1 parent ccd1599 commit f66e62b

File tree

1 file changed

+26
-12
lines changed

1 file changed

+26
-12
lines changed

src/components/Navigation.tsx

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,31 @@ export default function Navigation() {
7070
<div className="group relative">
7171
<button className="flex items-center gap-1 text-gray-700 hover:text-gray-900">
7272
Apps
73-
<svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
74-
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 9l-7 7-7-7" />
73+
<svg
74+
className="h-4 w-4"
75+
fill="none"
76+
viewBox="0 0 24 24"
77+
stroke="currentColor"
78+
>
79+
<path
80+
strokeLinecap="round"
81+
strokeLinejoin="round"
82+
strokeWidth={2}
83+
d="M19 9l-7 7-7-7"
84+
/>
7585
</svg>
7686
</button>
77-
<div className="invisible group-hover:visible absolute left-0 top-full mt-1 w-40 rounded-lg bg-white shadow-lg ring-1 ring-black/5">
78-
<a
79-
href="https://cornac.preferred.ai"
80-
target="_blank"
81-
rel="noopener noreferrer"
82-
className="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 rounded-lg"
83-
>
84-
Cornac
85-
</a>
87+
<div className="invisible group-hover:visible absolute left-1/2 -translate-x-1/2 top-full pt-1 w-28">
88+
<div className="rounded-lg bg-white shadow-lg ring-1 ring-black/5">
89+
<a
90+
href="https://cornac.preferred.ai"
91+
target="_blank"
92+
rel="noopener noreferrer"
93+
className="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 rounded-lg"
94+
>
95+
Cornac
96+
</a>
97+
</div>
8698
</div>
8799
</div>
88100
<Link
@@ -186,7 +198,9 @@ export default function Navigation() {
186198
Papers
187199
</Link>
188200
<div>
189-
<div className="px-4 py-2 text-xs font-semibold text-gray-400 uppercase tracking-wider">Apps</div>
201+
<div className="px-4 py-2 text-xs font-semibold text-gray-400 uppercase tracking-wider">
202+
Apps
203+
</div>
190204
<a
191205
href="https://cornac.preferred.ai"
192206
target="_blank"

0 commit comments

Comments
 (0)