Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" href="/favicon.png" />
<title>Code for Philly</title>
</head>
<body>
Expand Down
Binary file added apps/web/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/web/public/img/logo-horizontal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/web/public/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions apps/web/src/components/AppHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,18 @@ export function AppHeader() {
return (
<header className="sticky top-0 z-40 w-full border-b border-border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 shadow-sm print:hidden">
<div className="container mx-auto flex h-14 items-center px-4 gap-4">
{/* Logo */}
{/* Wordmark — always visible. The horizontal lockup includes
the icon + text, so no separate text node is needed. */}
<Link
to="/"
className="flex items-center gap-2 shrink-0"
className="flex items-center shrink-0"
aria-label="Code for Philly home"
>
<img src="/img/logo.png" alt="" height={32} className="h-8 w-auto" />
<span className="hidden md:inline font-semibold text-foreground">
Code for Philly
</span>
<img
src="/img/logo-horizontal.png"
alt="Code for Philly"
className="h-8 w-auto"
/>
</Link>

{/* Desktop nav */}
Expand Down
7 changes: 5 additions & 2 deletions apps/web/tests/AppHeader.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ describe('AppHeader', () => {
vi.restoreAllMocks();
});

it('renders the site name', async () => {
it('renders a labelled home link with the logo image', async () => {
renderWithRouter(<Wrapped />);
expect(screen.getByText('Code for Philly')).toBeInTheDocument();
const home = screen.getByRole('link', { name: /code for philly home/i });
expect(home).toBeInTheDocument();
expect(home).toHaveAttribute('href', '/');
expect(home.querySelector('img')).toHaveAttribute('alt', 'Code for Philly');
});

it('renders primary nav links', async () => {
Expand Down