Skip to content

Commit 3548002

Browse files
MaxGhenisclaude
andcommitted
Compact hero and sticky nav for better above-the-fold UX
- Replace two-column hero layout with single-column compact header - Swap bordered stat cards for inline stat bar - Add PE mark icon to hero and sticky nav brand - Remove redundant sidebar (top models, preprint card) - Remove redundant CTAs (View leaderboard, Explore households) - Exclude public/paper/ from ESLint, add img-element directives Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 095063d commit 3548002

4 files changed

Lines changed: 81 additions & 270 deletions

File tree

app/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import nextTypeScript from "eslint-config-next/typescript";
33

44
const config = [
55
{
6-
ignores: [".next/**", "dist/**", "node_modules/**", "out/**"],
6+
ignores: [".next/**", "dist/**", "node_modules/**", "out/**", "public/paper/**"],
77
},
88
...nextCoreWebVitals,
99
...nextTypeScript,

app/src/App.tsx

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @next/next/no-img-element */
12
"use client";
23

34
import Link from "next/link";
@@ -105,20 +106,28 @@ export default function App() {
105106
/>
106107

107108
<nav className="sticky top-0 z-40 border-b border-border bg-bg/90 backdrop-blur-md">
108-
<div className="mx-auto flex max-w-7xl items-center gap-4 px-4 sm:px-6">
109+
<div className="mx-auto flex max-w-7xl items-center gap-3 px-4 sm:px-6">
109110
<Link
110111
href="/"
111-
className="shrink-0 py-3 font-[family-name:var(--font-display)] text-lg tracking-tight text-text transition-colors hover:text-primary"
112+
className="shrink-0 py-2.5 flex items-center gap-2 transition-colors hover:opacity-80"
112113
>
113-
PolicyBench
114+
<img
115+
src="/assets/policyengine-mark.svg"
116+
alt="PolicyEngine"
117+
className="h-5 w-5 opacity-80"
118+
/>
119+
<span className="font-[family-name:var(--font-display)] text-base tracking-tight text-text">
120+
PolicyBench
121+
</span>
114122
</Link>
123+
<div className="h-4 w-px bg-border shrink-0" />
115124
<div className="min-w-0 flex-1 overflow-x-auto">
116-
<div className="flex min-w-max gap-1">
125+
<div className="flex min-w-max gap-0.5">
117126
{navItems.map((item) => (
118127
<a
119128
key={item.id}
120129
href={`#${item.id}`}
121-
className={`px-3 py-3 text-[11px] font-medium tracking-wider uppercase transition-colors border-b-2 sm:px-4 ${
130+
className={`px-2.5 py-2.5 text-[11px] font-medium tracking-wider uppercase transition-colors border-b-2 sm:px-3.5 ${
122131
activeNav === item.id
123132
? "border-primary text-primary"
124133
: "border-transparent text-text-secondary hover:text-text"
@@ -134,26 +143,13 @@ export default function App() {
134143
onSelect={handleSelectView}
135144
pillClassName="rounded-full text-[10px] px-2.5 py-1 font-medium transition-colors"
136145
/>
137-
<div className="flex shrink-0 items-center gap-2">
146+
<div className="flex shrink-0 items-center gap-1.5">
138147
<Link
139148
href="/paper"
140-
className="rounded-full border border-border bg-card px-3 py-1.5 text-[11px] font-medium uppercase tracking-wider text-text-secondary transition-colors hover:border-primary/40 hover:text-primary"
149+
className="rounded-full border border-border bg-card px-3 py-1 text-[11px] font-medium uppercase tracking-wider text-text-secondary transition-colors hover:border-primary/40 hover:text-primary"
141150
>
142151
Paper
143152
</Link>
144-
<a
145-
href="https://policyengine.org"
146-
className="inline-flex items-center gap-1.5 rounded-full border border-border bg-card px-2.5 py-1.5 text-[11px] font-medium uppercase tracking-wider text-text-secondary transition-colors hover:border-primary/40 hover:text-primary"
147-
aria-label="By PolicyEngine"
148-
title="By PolicyEngine"
149-
>
150-
<span>by</span>
151-
<img
152-
src="/assets/policyengine-logo.svg"
153-
alt="PolicyEngine"
154-
className="h-3 w-auto"
155-
/>
156-
</a>
157153
</div>
158154
</div>
159155
</nav>

app/src/app/paper/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @next/next/no-img-element */
12
import Link from "next/link";
23

34
const manuscriptPaths = {

0 commit comments

Comments
 (0)