Skip to content

Commit c8e3c91

Browse files
ux: unify carousel cards, reorder sections, and slow marquee
Make Recently Buried and Famous Casualties use matching card spacing and section layout, move Recently Buried above Famous Casualties, and reduce carousel speed for a calmer scroll. Made-with: Cursor
1 parent a09520b commit c8e3c91

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/app/page.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,17 @@ export default function Page() {
103103
{idle && (
104104
<div style={{ width: '100%', marginTop: '34px', paddingBottom: 0 }}>
105105
<div style={{ marginBottom: '14px', textAlign: 'center' }}>
106+
<p style={{ fontFamily: FONT, fontSize: '13px', fontWeight: 700, color: '#727272', margin: 0, letterSpacing: '0.12em', textTransform: 'uppercase' }}>
107+
Recently Buried
108+
</p>
109+
</div>
110+
<RecentlyBuried onSelect={handleSelect} />
111+
<div style={{ marginTop: '28px', marginBottom: '14px', textAlign: 'center' }}>
106112
<p style={{ fontFamily: FONT, fontSize: '13px', fontWeight: 700, color: '#727272', margin: 0, letterSpacing: '0.12em', textTransform: 'uppercase' }}>
107113
Famous Casualties
108114
</p>
109115
</div>
110116
<Leaderboard onSelect={handleSelect} />
111-
<RecentlyBuried onSelect={handleSelect} />
112117
</div>
113118
)}
114119

src/components/Leaderboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default function Leaderboard({ onSelect }: Props) {
103103
<div className="marquee-track" style={{
104104
display: 'flex',
105105
gap: '14px',
106-
animation: 'marquee 200s linear infinite',
106+
animation: 'marquee 360s linear infinite',
107107
width: 'max-content',
108108
}}>
109109
{HALL_OF_SHAME.map((entry) => (

src/components/RecentlyBuried.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export default function RecentlyBuried({ onSelect }: Props) {
3535
return `${days}d ago`
3636
}
3737

38-
// Match Famous Casualties px/s: 36 cards × 310px in 80s = 139.5 px/s
39-
const duration = Math.round((entries.length * 310) / 55.8)
38+
// Keep a calmer marquee pace.
39+
const duration = Math.round((entries.length * 310) / 30)
4040

4141
function Card({ entry }: { entry: typeof entries[number] }) {
4242
return (
@@ -82,20 +82,15 @@ export default function RecentlyBuried({ onSelect }: Props) {
8282
<span style={{ fontSize: '14px', fontStyle: 'italic', color: '#4d4d4d', lineHeight: 1.6, fontWeight: 500, marginTop: '2px' }}>
8383
{entry.cause}
8484
</span>
85-
<span style={{ fontSize: '12px', color: '#787878', marginTop: 'auto' }}>
85+
<span style={{ fontSize: '12px', color: '#787878', marginTop: '4px' }}>
8686
{entry.analyzedAt ? timeAgo(entry.analyzedAt) : ''}
8787
</span>
8888
</button>
8989
)
9090
}
9191

9292
return (
93-
<div style={{ width: '100%', marginTop: '28px' }}>
94-
<div style={{ marginBottom: '14px', textAlign: 'center' }}>
95-
<p style={{ fontFamily: FONT, fontSize: '13px', fontWeight: 700, color: '#727272', margin: 0, letterSpacing: '0.12em', textTransform: 'uppercase' }}>
96-
Recently Buried
97-
</p>
98-
</div>
93+
<div style={{ width: '100%' }}>
9994
<div
10095
style={{ width: '100vw', marginLeft: 'calc(50% - 50vw)', overflow: 'hidden', padding: '4px 20px 8px' }}
10196
onMouseEnter={e => { (e.currentTarget.querySelector('.recent-track') as HTMLElement).style.animationPlayState = 'paused' }}

0 commit comments

Comments
 (0)