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
7 changed files with 33 additions and 4 deletions
|
|
@ -1,3 +1,10 @@
|
||||||
|
<p align="center">
|
||||||
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="assets/logo-dark.svg">
|
||||||
|
<img src="assets/logo.svg" alt="Parsimony" height="72">
|
||||||
|
</picture>
|
||||||
|
</p>
|
||||||
|
|
||||||
# parsimony
|
# parsimony
|
||||||
|
|
||||||
A modern, single-binary mailing list manager: an evolution of Mailman.
|
A modern, single-binary mailing list manager: an evolution of Mailman.
|
||||||
|
|
@ -316,6 +323,6 @@ Sending is bounded by the SMTP round trips to your relay: raise `relay.concurren
|
||||||
## Licence
|
## Licence
|
||||||
|
|
||||||
Parsimony is free software, released under the GNU General Public License, version 3 or (at your option) any later
|
Parsimony is free software, released under the GNU General Public License, version 3 or (at your option) any later
|
||||||
version. See [LICENSE](LICENSE). The components in `admin/src/components/ui` come from shadcn/ui (MIT); the Go
|
version. See [LICENSE](LICENSE). The logo in `assets/` (generated by `assets/make-logo.py`) is released under the same licence. The components in `admin/src/components/ui` come from shadcn/ui (MIT); the Go
|
||||||
dependencies (go-smtp, go-message, go-msgauth, modernc.org/sqlite, yaml.v3) use MIT, BSD or Apache 2.0 licences, which are
|
dependencies (go-smtp, go-message, go-msgauth, modernc.org/sqlite, yaml.v3) use MIT, BSD or Apache 2.0 licences, which are
|
||||||
compatible with the GPL.
|
compatible with the GPL.
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>admin</title>
|
<title>Parsimony</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,26 @@ import { describe, expect, it } from 'vitest'
|
||||||
import { aList, installFakeApi, newState } from '@/test/fakeApi'
|
import { aList, installFakeApi, newState } from '@/test/fakeApi'
|
||||||
import { renderApp } from '@/test/render'
|
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', () => {
|
describe('authentication', () => {
|
||||||
it('does not keep the token when the check fails for another reason than 401', async () => {
|
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' } } }))
|
installFakeApi(newState({ fail: { 'GET /lists': { status: 500, error: 'database is locked' } } }))
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@ export function Shell() {
|
||||||
<header className="border-b">
|
<header className="border-b">
|
||||||
<div className="mx-auto flex max-w-5xl items-center justify-between p-4">
|
<div className="mx-auto flex max-w-5xl items-center justify-between p-4">
|
||||||
<div className="flex items-center gap-6">
|
<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
|
Parsimony
|
||||||
</Link>
|
</Link>
|
||||||
<Link to="/queue" className="text-sm text-muted-foreground hover:text-foreground">
|
<Link to="/queue" className="text-sm text-muted-foreground hover:text-foreground">
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,8 @@ export function LoginPage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
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">
|
<Card className="w-full max-w-sm">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle>
|
<CardTitle>
|
||||||
|
|
|
||||||
BIN
assets/logo-mark-512.png
Normal file
BIN
assets/logo-mark-512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
assets/logo.png
Normal file
BIN
assets/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Loading…
Reference in a new issue