chore(workspace): move the app to apps/app under a pnpm workspace (step 2)
144 files moved with git mv (pure renames). Root package.json delegates dev/typecheck/test:run/lint/build to the packages; Node 24 LTS and pnpm 10.13.1 pinned (.nvmrc, .node-version, engines, packageManager, root devDependency, engine-strict). Dockerfile builds @faunosteo/app on node:24-alpine and copies apps/app/dist; nginx and runtime config unchanged. CI workflow for Gitea Actions. packages/ reserved (README only). Docs synced: WORKSPACE.md, CLAUDE.md, README, DEPLOY, CHANGELOG, plan. 271/271 tests, typecheck, lint, build green from the root.
This commit is contained in:
1 parent
c8d48ab4cc
commit
8673475293
164 files changed
+348
-128
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>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
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 { brandName } = useConfig()
|
||||
return (
|
||||
<img
|
||||
src="/logo-horizontal.svg"
|
||||
alt={brandName}
|
||||
className={`${HEIGHT[size]} w-auto`}
|
||||
/>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
import { Link } from 'react-router-dom'
|
||||
import { useConfig } from '@/app/providers/ConfigProvider'
|
||||
import { useT } from '@/i18n/useT'
|
||||
|
||||
export default function Footer() {
|
||||
const cfg = useConfig()
|
||||
const t = useT()
|
||||
const year = new Date().getFullYear()
|
||||
return (
|
||||
<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')}{' '}
|
||||
<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>
|
||||
</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
|
||||
href="https://zenquality.fr"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="ZenQuality"
|
||||
className="inline-flex items-center"
|
||||
>
|
||||
<img
|
||||
src="https://zenquality.fr/assets/logo-horizontal-1024.png"
|
||||
alt="ZenQuality"
|
||||
className="h-6 w-auto"
|
||||
loading="lazy"
|
||||
/>
|
||||
</a>
|
||||
</span>
|
||||
<span className="flex items-center gap-1.5">
|
||||
<span>{t('footer.in_partnership')}</span>
|
||||
<a
|
||||
href="https://www.instagram.com/paws.iin.harmony"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-[var(--color-accent)] hover:text-[var(--color-accent-strong)] transition-colors font-medium"
|
||||
>
|
||||
<img
|
||||
src="/Paws_in_harmony.svg"
|
||||
alt="Paws in Harmony"
|
||||
className="h-6 w-auto inline-block align-middle"
|
||||
/>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import { useLocaleStore } from '@/state/localeStore'
|
||||
import { useT } from '@/i18n/useT'
|
||||
import type { Locale } from '@/i18n/types'
|
||||
|
||||
const ITEMS: { value: Locale; labelKey: string; ariaKey: string }[] = [
|
||||
{ value: 'fr', labelKey: 'lang.fr', ariaKey: 'lang.switch_to_fr' },
|
||||
{ value: 'en', labelKey: 'lang.en', ariaKey: 'lang.switch_to_en' },
|
||||
]
|
||||
|
||||
export default function LanguageSwitcher() {
|
||||
const locale = useLocaleStore((s) => s.locale)
|
||||
const setLocale = useLocaleStore((s) => s.setLocale)
|
||||
const t = useT()
|
||||
return (
|
||||
<div
|
||||
role="group"
|
||||
aria-label={t('lang.group_label')}
|
||||
className="inline-flex rounded-full border border-[var(--color-border)] overflow-hidden text-xs font-medium"
|
||||
>
|
||||
{ITEMS.map((item) => {
|
||||
const active = locale === item.value
|
||||
return (
|
||||
<button
|
||||
key={item.value}
|
||||
type="button"
|
||||
aria-label={t(item.ariaKey)}
|
||||
aria-pressed={active}
|
||||
onClick={() => setLocale(item.value)}
|
||||
className={[
|
||||
'px-2.5 py-1 transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)]',
|
||||
active
|
||||
? 'bg-[var(--color-accent)] text-white'
|
||||
: 'text-[var(--color-ink)] hover:bg-[var(--color-surface-strong)]',
|
||||
].join(' ')}
|
||||
>
|
||||
{t(item.labelKey)}
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user