feat(ui): unified AppHeader, logo brand, tagline update, and header simplification
- Brand component now renders horizontal SVG logo instead of text - New AppHeader shared component replaces per-route header boilerplate - Tagline updated to "Outils pour ostéopathes animaliers" - All routes use AppHeader (HomeRoute, EditorsRoute, NewReportRoute, SvgEditorRoute) - ReportHeader and Footer simplified - DEPLOY.md URLs updated zoosteo.fr → faunosteo.com - Logo assets added (favicon.svg, logo-horizontal.svg, apple-touch-icon.png) - Removed unused eslint-disable directive in SvgEditorRoute Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
2d6ed809e2
commit
1f30280762
25 files changed
+141
-153
No files matched your search
@@ -1,11 +1,8 @@
|
||||
import { Link } from 'react-router-dom'
|
||||
import type { Report } from '@/domain/schema/report'
|
||||
import Brand from '@/components/brand/Brand'
|
||||
import LanguageSwitcher from '@/components/brand/LanguageSwitcher'
|
||||
import AppHeader from '@/components/brand/AppHeader'
|
||||
import Button from '@/components/ui/Button'
|
||||
import { formatDate } from '@/lib/dates'
|
||||
import { useT } from '@/i18n/useT'
|
||||
import { useConfig } from '@/app/providers/ConfigProvider'
|
||||
import { useLocaleStore } from '@/state/localeStore'
|
||||
|
||||
export interface ReportHeaderProps {
|
||||
@@ -15,34 +12,20 @@ export interface ReportHeaderProps {
|
||||
|
||||
export default function ReportHeader({ report, onEditInfos }: ReportHeaderProps) {
|
||||
const t = useT()
|
||||
const cfg = useConfig()
|
||||
const locale = useLocaleStore((s) => s.locale)
|
||||
return (
|
||||
<header className="flex items-center justify-between gap-4 px-6 py-3 border-b border-[var(--color-border)] bg-[var(--color-surface)]">
|
||||
<div className="flex items-baseline gap-3">
|
||||
<Link
|
||||
to="/"
|
||||
aria-label={t('common.back_to_home')}
|
||||
className="rounded-md px-1 py-0.5 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)]"
|
||||
>
|
||||
<Brand />
|
||||
</Link>
|
||||
<span className="text-sm text-[var(--color-ink-muted)]">{cfg.tagline}</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="text-sm text-right text-[var(--color-ink-muted)]">
|
||||
<div className="text-[var(--color-ink)] font-medium">
|
||||
{report.animal.name} · {report.owner.name}
|
||||
</div>
|
||||
<div>{formatDate(report.date, locale)}</div>
|
||||
<AppHeader>
|
||||
<div className="text-xs sm:text-sm text-right text-[var(--color-ink-muted)]">
|
||||
<div className="text-[var(--color-ink)] font-medium truncate max-w-[10rem] sm:max-w-none">
|
||||
{report.animal.name} · {report.owner.name}
|
||||
</div>
|
||||
{onEditInfos && (
|
||||
<Button variant="secondary" size="sm" onClick={onEditInfos}>
|
||||
{t('editor.edit_infos')}
|
||||
</Button>
|
||||
)}
|
||||
<LanguageSwitcher />
|
||||
<div className="hidden sm:block">{formatDate(report.date, locale)}</div>
|
||||
</div>
|
||||
</header>
|
||||
{onEditInfos && (
|
||||
<Button variant="secondary" size="sm" onClick={onEditInfos}>
|
||||
{t('editor.edit_infos')}
|
||||
</Button>
|
||||
)}
|
||||
</AppHeader>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user