Skip to content

Commit 10d82c5

Browse files
fix: wire broken site links (#5)
1 parent 43826ab commit 10d82c5

5 files changed

Lines changed: 41 additions & 7 deletions

File tree

‎src/components/Awards/Awards.test.jsx‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,12 @@ describe('Awards', () => {
124124
expect(githubLink).not.toHaveAttribute('data-nav-link')
125125
expect(document.querySelector('a[href=""]')).not.toBeInTheDocument()
126126
})
127+
128+
it('points certificate proofs at the shipped certificate images', () => {
129+
render(<Awards />)
130+
expect(screen.getAllByRole('link', { name: 'View certificate', hidden: true }).map(link => link.getAttribute('href'))).toEqual([
131+
'/awards/veritas-ai-certificate.jpg',
132+
'/awards/igem-silver-medal-certificate.jpg',
133+
])
134+
})
127135
})

‎src/components/Awards/awardsData.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const awards = [
6666
myRole: 'Participant · model training and evaluation',
6767
shortSummary:
6868
'Completed the 2026 Summer Cohort, building a practical foundation in machine learning and applying it through a guided model-training project.',
69-
proofUrl: '/awards/veritas-ai-scholars-certificate.pdf',
69+
proofUrl: '/awards/veritas-ai-certificate.jpg',
7070
proofLabel: 'View certificate',
7171
relatedProject: {
7272
label: 'Veritas AI Scholars',
@@ -160,7 +160,7 @@ export const awards = [
160160
myRole: 'Hardware team member',
161161
shortSummary:
162162
'Built hardware for SnaPFAS, an integrated system designed to detect, biodegrade, and safely process PFOA-contaminated water.',
163-
proofUrl: '/awards/igem-2025-member-certificate.pdf',
163+
proofUrl: '/awards/igem-silver-medal-certificate.jpg',
164164
proofLabel: 'View certificate',
165165
relatedProject: {
166166
label: 'BASIS-China team wiki',

‎src/components/FlowingMenu/FlowingMenu.jsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ function MenuItem({ link, text, image, speed, textColor, marqueeBgColor, marquee
140140
<a
141141
className="menu__item-link"
142142
href={link}
143+
data-nav-link
143144
onMouseEnter={handleMouseEnter}
144145
onMouseLeave={handleMouseLeave}
145146
style={{ color: textColor }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
2+
import { render, screen } from '@testing-library/react'
3+
import FlowingMenu from './FlowingMenu.jsx'
4+
5+
describe('FlowingMenu', () => {
6+
beforeEach(() => {
7+
vi.spyOn(HTMLElement.prototype, 'offsetWidth', 'get').mockReturnValue(100)
8+
})
9+
10+
afterEach(() => {
11+
vi.restoreAllMocks()
12+
})
13+
14+
it('marks item links for shared internal navigation', () => {
15+
render(
16+
<FlowingMenu
17+
items={[{ link: '/gallery/paris', text: 'Paris, France', image: '/paris.jpg' }]}
18+
/>
19+
)
20+
21+
const link = screen.getByRole('link', { name: 'Paris, France' })
22+
expect(link).toHaveAttribute('href', '/gallery/paris')
23+
expect(link).toHaveAttribute('data-nav-link')
24+
})
25+
})

‎src/components/Home/Home.jsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ import beijingImg from '/Photography/Beijing/we-o_rd35vfjgdnyzud3fw-china-750439
1717
import miscImg from '/Photography/Miscellaneous/639F42E1-5B22-40AE-BDF9-3974A03E2073_1_105_c.jpeg'
1818

1919
const flowingMenuItems = [
20-
{ link: '#', text: 'Paris, France', image: parisImg },
21-
{ link: '#', text: 'Chaoshan, China', image: chaoshanImg },
22-
{ link: '#', text: 'Beijing, China', image: beijingImg },
23-
{ link: '#', text: 'Miscellaneous', image: miscImg },
20+
{ link: '/gallery/paris', text: 'Paris, France', image: parisImg },
21+
{ link: '/gallery/chaoshan', text: 'Chaoshan, China', image: chaoshanImg },
22+
{ link: '/gallery/beijing', text: 'Beijing, China', image: beijingImg },
23+
{ link: '/gallery/miscellaneous', text: 'Miscellaneous', image: miscImg },
2424
]
2525

2626
// Pre-split the reveal text into .word spans so we can color keywords (#00f0ff)
@@ -80,7 +80,7 @@ const photographyLogos = [
8080

8181
const aiLogos = [
8282
{ src: si('anthropic'), alt: 'Claude', title: 'Claude', href: 'https://claude.ai' },
83-
{ node: txt('Openclaw'), title: 'Openclaw', href: '#' },
83+
{ node: txt('Openclaw'), title: 'Openclaw', href: 'https://openclaw.ai' },
8484
{ src: si('openai'), alt: 'ChatGPT', title: 'ChatGPT', href: 'https://chat.openai.com' },
8585
{ src: si('googlegemini'), alt: 'Gemini', title: 'Gemini', href: 'https://gemini.google.com' },
8686
{ src: si('grok'), alt: 'Grok', title: 'Grok', href: 'https://x.ai' },

0 commit comments

Comments
 (0)