feat: the logo in the admin UI, the README and as PNG exports
- Show the wordmark on the login page and the mark in the header; set the page title to Parsimony - Put the logo at the top of the README, with a dark-mode variant - Add PNG exports (a 512 px mark for avatars, a 1200 px wordmark), both transparent - Say that the logo is under the same licence
This commit is contained in:
parent
ec8ca567ff
commit
1dddf14cfd
3 changed files with 33 additions and 4 deletions
|
|
@ -3,6 +3,26 @@ import { describe, expect, it } from 'vitest'
|
|||
import { aList, installFakeApi, newState } from '@/test/fakeApi'
|
||||
import { renderApp } from '@/test/render'
|
||||
|
||||
describe('branding', () => {
|
||||
it('shows the logo on the login page', async () => {
|
||||
installFakeApi(newState())
|
||||
renderApp('/login')
|
||||
const logo = await screen.findByRole('img', { name: 'Parsimony' })
|
||||
expect(logo).toHaveAttribute('src', '/logo.svg')
|
||||
})
|
||||
|
||||
it('shows the mark next to the name in the header, as a decoration', async () => {
|
||||
installFakeApi(newState())
|
||||
renderApp('/', { token: 'good' })
|
||||
const brand = await screen.findByRole('link', { name: 'Parsimony' })
|
||||
expect(brand).toHaveAttribute('href', '/')
|
||||
const mark = brand.querySelector('img')
|
||||
expect(mark).not.toBeNull()
|
||||
expect(mark).toHaveAttribute('src', '/favicon.svg')
|
||||
expect(mark).toHaveAttribute('alt', '') // the name is already text: a screen reader must not say it twice
|
||||
})
|
||||
})
|
||||
|
||||
describe('authentication', () => {
|
||||
it('does not keep the token when the check fails for another reason than 401', async () => {
|
||||
installFakeApi(newState({ fail: { 'GET /lists': { status: 500, error: 'database is locked' } } }))
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ export function Shell() {
|
|||
<header className="border-b">
|
||||
<div className="mx-auto flex max-w-5xl items-center justify-between p-4">
|
||||
<div className="flex items-center gap-6">
|
||||
<Link to="/" className="text-lg font-semibold">
|
||||
<Link to="/" className="flex items-center gap-2 text-lg font-semibold">
|
||||
<img src="/favicon.svg" alt="" className="size-7" />
|
||||
Parsimony
|
||||
</Link>
|
||||
<Link to="/queue" className="text-sm text-muted-foreground hover:text-foreground">
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@ export function LoginPage() {
|
|||
}
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center p-4">
|
||||
<div className="flex min-h-screen flex-col items-center justify-center gap-6 p-4">
|
||||
<img src="/logo.svg" alt="Parsimony" className="h-12" />
|
||||
<Card className="w-full max-w-sm">
|
||||
<CardHeader>
|
||||
<CardTitle>
|
||||
|
|
|
|||
Loading…
Reference in a new issue