Commit ·
d87c1fb
1
Parent(s): 5592d96
Make header fit on mobile (icon-only nav, hide subtitle)
Browse filesCo-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
frontend/src/components/layout/Header.tsx
CHANGED
|
@@ -6,42 +6,42 @@ export function Header() {
|
|
| 6 |
|
| 7 |
return (
|
| 8 |
<header className="border-b border-gray-200 bg-white sticky top-0 z-50 shadow-sm">
|
| 9 |
-
<div className="max-w-7xl mx-auto px-6 py-4 flex items-center justify-between gap-6">
|
| 10 |
-
<Link to="/" className="flex items-center gap-3 hover:opacity-80 transition-opacity">
|
| 11 |
-
<div className="w-9 h-9 bg-slate-900 rounded-lg flex items-center justify-center">
|
| 12 |
<Database className="w-5 h-5 text-white" />
|
| 13 |
</div>
|
| 14 |
-
<div>
|
| 15 |
-
<div className="text-xl font-semibold text-slate-900">MuSProt</div>
|
| 16 |
-
<div className="text-xs text-slate-500">Multistate Protein Structure Database</div>
|
| 17 |
</div>
|
| 18 |
</Link>
|
| 19 |
|
| 20 |
-
<nav className="flex items-center gap-2">
|
| 21 |
<Link
|
| 22 |
to="/"
|
| 23 |
-
className={`flex items-center gap-1.5 px-3 py-2 text-sm rounded-lg transition-colors ${
|
| 24 |
location.pathname === '/' ? 'bg-slate-100 text-slate-900 font-semibold' : 'text-slate-600 hover:bg-slate-50'
|
| 25 |
}`}
|
| 26 |
>
|
| 27 |
-
<Database className="w-4 h-4" />
|
| 28 |
-
Explorer
|
| 29 |
</Link>
|
| 30 |
<Link
|
| 31 |
to="/docs"
|
| 32 |
-
className={`flex items-center gap-1.5 px-3 py-2 text-sm rounded-lg transition-colors ${
|
| 33 |
location.pathname === '/docs' ? 'bg-slate-100 text-slate-900 font-semibold' : 'text-slate-600 hover:bg-slate-50'
|
| 34 |
}`}
|
| 35 |
>
|
| 36 |
-
<BookOpen className="w-4 h-4" />
|
| 37 |
-
Docs
|
| 38 |
</Link>
|
| 39 |
<a
|
| 40 |
href="/api/protein/download/db"
|
| 41 |
-
className="flex items-center gap-1.5 px-4 py-2 text-sm font-medium text-white bg-slate-900 rounded-lg hover:bg-slate-700 transition-colors"
|
| 42 |
>
|
| 43 |
-
<Download className="w-4 h-4" />
|
| 44 |
-
Download DB
|
| 45 |
</a>
|
| 46 |
</nav>
|
| 47 |
</div>
|
|
|
|
| 6 |
|
| 7 |
return (
|
| 8 |
<header className="border-b border-gray-200 bg-white sticky top-0 z-50 shadow-sm">
|
| 9 |
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between gap-3 sm:gap-6">
|
| 10 |
+
<Link to="/" className="flex items-center gap-3 hover:opacity-80 transition-opacity min-w-0">
|
| 11 |
+
<div className="w-9 h-9 bg-slate-900 rounded-lg flex items-center justify-center shrink-0">
|
| 12 |
<Database className="w-5 h-5 text-white" />
|
| 13 |
</div>
|
| 14 |
+
<div className="min-w-0">
|
| 15 |
+
<div className="text-xl font-semibold text-slate-900 truncate">MuSProt</div>
|
| 16 |
+
<div className="hidden sm:block text-xs text-slate-500 truncate">Multistate Protein Structure Database</div>
|
| 17 |
</div>
|
| 18 |
</Link>
|
| 19 |
|
| 20 |
+
<nav className="flex items-center gap-1 sm:gap-2 shrink-0">
|
| 21 |
<Link
|
| 22 |
to="/"
|
| 23 |
+
className={`flex items-center gap-1.5 px-2.5 sm:px-3 py-2 text-sm rounded-lg transition-colors ${
|
| 24 |
location.pathname === '/' ? 'bg-slate-100 text-slate-900 font-semibold' : 'text-slate-600 hover:bg-slate-50'
|
| 25 |
}`}
|
| 26 |
>
|
| 27 |
+
<Database className="w-4 h-4 shrink-0" />
|
| 28 |
+
<span className="hidden sm:inline">Explorer</span>
|
| 29 |
</Link>
|
| 30 |
<Link
|
| 31 |
to="/docs"
|
| 32 |
+
className={`flex items-center gap-1.5 px-2.5 sm:px-3 py-2 text-sm rounded-lg transition-colors ${
|
| 33 |
location.pathname === '/docs' ? 'bg-slate-100 text-slate-900 font-semibold' : 'text-slate-600 hover:bg-slate-50'
|
| 34 |
}`}
|
| 35 |
>
|
| 36 |
+
<BookOpen className="w-4 h-4 shrink-0" />
|
| 37 |
+
<span className="hidden sm:inline">Docs</span>
|
| 38 |
</Link>
|
| 39 |
<a
|
| 40 |
href="/api/protein/download/db"
|
| 41 |
+
className="flex items-center gap-1.5 px-3 sm:px-4 py-2 text-sm font-medium text-white bg-slate-900 rounded-lg hover:bg-slate-700 transition-colors"
|
| 42 |
>
|
| 43 |
+
<Download className="w-4 h-4 shrink-0" />
|
| 44 |
+
<span className="hidden sm:inline">Download DB</span>
|
| 45 |
</a>
|
| 46 |
</nav>
|
| 47 |
</div>
|