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
@@ -0,0 +1,34 @@
|
||||
import { Link } from 'react-router-dom'
|
||||
import Brand from './Brand'
|
||||
import LanguageSwitcher from './LanguageSwitcher'
|
||||
import { useConfig } from '@/app/providers/ConfigProvider'
|
||||
import { useT } from '@/i18n/useT'
|
||||
|
||||
interface AppHeaderProps {
|
||||
children?: React.ReactNode
|
||||
}
|
||||
|
||||
export default function AppHeader({ children }: AppHeaderProps) {
|
||||
const cfg = useConfig()
|
||||
const t = useT()
|
||||
return (
|
||||
<header className="px-3 sm:px-6 py-2 sm:py-3 border-b border-[var(--color-border)] flex items-center justify-between bg-[var(--color-surface)]">
|
||||
<div className="flex items-center gap-3">
|
||||
<Link
|
||||
to="/"
|
||||
aria-label={t('common.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 size="lg" />
|
||||
</Link>
|
||||
<span className="text-sm text-[var(--color-ink-muted)] hidden sm:inline">
|
||||
{cfg.tagline}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2 sm:gap-4">
|
||||
{children}
|
||||
<LanguageSwitcher />
|
||||
</div>
|
||||
</header>
|
||||
)
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
import { useConfig } from '@/app/providers/ConfigProvider'
|
||||
const HEIGHT = { sm: 'h-7', md: 'h-9', lg: 'h-11' } as const
|
||||
|
||||
export default function Brand({ size = 'md' }: { size?: 'sm' | 'md' | 'lg' }) {
|
||||
const cfg = useConfig()
|
||||
const cls = size === 'lg' ? 'text-3xl' : size === 'sm' ? 'text-base' : 'text-xl'
|
||||
return (
|
||||
<span className={`font-serif font-semibold tracking-tight ${cls}`}>
|
||||
{cfg.brandName}
|
||||
</span>
|
||||
<img
|
||||
src="/logo-horizontal.svg"
|
||||
alt="Faunosteo"
|
||||
className={`${HEIGHT[size]} w-auto`}
|
||||
/>
|
||||
)
|
||||
}
|
||||
@@ -7,18 +7,18 @@ export default function Footer() {
|
||||
const t = useT()
|
||||
const year = new Date().getFullYear()
|
||||
return (
|
||||
<footer className="mt-12 border-t border-neutral-200 bg-neutral-50 py-6 text-center text-sm text-neutral-600">
|
||||
<footer className="mt-8 sm:mt-12 border-t border-neutral-200 bg-neutral-50 py-4 sm:py-6 text-center text-xs sm:text-sm text-neutral-600">
|
||||
<p className="mb-3">
|
||||
© {year} {cfg.footerName}. {t('footer.all_rights_reserved')}
|
||||
</p>
|
||||
<div className="flex items-center justify-center gap-4">
|
||||
© {year} {cfg.footerName}. {t('footer.all_rights_reserved')}{' '}
|
||||
<span className="text-neutral-300">·</span>{' '}
|
||||
<Link
|
||||
to="/editors"
|
||||
className="text-[var(--color-accent)] hover:text-[var(--color-accent-strong)] transition-colors"
|
||||
>
|
||||
{t('footer.editors')}
|
||||
</Link>
|
||||
<span className="text-neutral-300">|</span>
|
||||
</p>
|
||||
<div className="flex flex-wrap items-center justify-center gap-2 sm:gap-4">
|
||||
<span className="flex items-center gap-2">
|
||||
<span>{t('footer.powered_by')}</span>
|
||||
<a
|
||||
@@ -36,9 +36,8 @@ export default function Footer() {
|
||||
/>
|
||||
</a>
|
||||
</span>
|
||||
<span className="text-neutral-300">|</span>
|
||||
<span className="flex items-center gap-1.5">
|
||||
<span>{t('footer.with_help')}</span>
|
||||
<span>{t('footer.in_partnership')}</span>
|
||||
<a
|
||||
href="https://www.instagram.com/paws.iin.harmony"
|
||||
target="_blank"
|
||||
|
||||
@@ -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