diff --git a/frontend/src/components/react/PostList.tsx b/frontend/src/components/react/PostList.tsx index 26026a2..5c3e8f1 100644 --- a/frontend/src/components/react/PostList.tsx +++ b/frontend/src/components/react/PostList.tsx @@ -128,8 +128,8 @@ export default function PostList({ posts: initialPosts, isAdmin = false }: Props aria-label={`View ${displayTitle}`} >
{hasCover ? ( {formatMonth(post.date)} {formatYear(post.date)} - - {post.reading_time} min
diff --git a/frontend/src/components/react/admin/Login.tsx b/frontend/src/components/react/admin/Login.tsx index 8f2ec51..d328b01 100644 --- a/frontend/src/components/react/admin/Login.tsx +++ b/frontend/src/components/react/admin/Login.tsx @@ -8,7 +8,7 @@ export default function Login() { const [busy, setBusy] = useState(false); const setLoggedIn = useAuth(s => s.setLoggedIn); - async function handleSubmit(e: React.FormEvent) { + async function handleSubmit(e: React.SyntheticEvent) { e.preventDefault(); const token = value.trim(); if (!token) return; diff --git a/frontend/src/components/react/admin/Settings.tsx b/frontend/src/components/react/admin/Settings.tsx index 0c66e11..da81355 100644 --- a/frontend/src/components/react/admin/Settings.tsx +++ b/frontend/src/components/react/admin/Settings.tsx @@ -21,7 +21,7 @@ export default function Settings() { setConfig(prev => ({ ...prev, [key]: value })); } - async function handleSubmit(e: React.FormEvent) { + async function handleSubmit(e: React.SyntheticEvent) { e.preventDefault(); try { await updateConfig(config); diff --git a/frontend/src/pages/posts/[slug].astro b/frontend/src/pages/posts/[slug].astro index ede2331..e7ac27e 100644 --- a/frontend/src/pages/posts/[slug].astro +++ b/frontend/src/pages/posts/[slug].astro @@ -114,8 +114,6 @@ const displayTitle = post ? (post.title || formatSlug(post.slug)) : 'Work';
{formatDate(post.date)} - · - {post.reading_time} min {post.image_count > 0 && ( <> · diff --git a/frontend/src/pages/uploads/[...path].astro b/frontend/src/pages/uploads/[...path].astro index 1711c19..b227453 100644 --- a/frontend/src/pages/uploads/[...path].astro +++ b/frontend/src/pages/uploads/[...path].astro @@ -8,12 +8,9 @@ if (!response.ok) { return new Response(null, { status: 404 }); } -const blob = await response.blob(); -const contentType = response.headers.get('content-type'); - -return new Response(blob, { +return new Response(await response.blob(), { headers: { - 'content-type': contentType || 'application/octet-stream', + 'content-type': response.headers.get('content-type') || 'application/octet-stream', 'cache-control': 'public, max-age=3600' } }); diff --git a/frontend/src/styles/global.css b/frontend/src/styles/global.css index fee5552..581c80e 100644 --- a/frontend/src/styles/global.css +++ b/frontend/src/styles/global.css @@ -548,6 +548,14 @@ code, pre, kbd, samp { filter: saturate(0.94) contrast(1.02); transition: transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1), filter 0.4s ease; } +/* Natural mode — container drops fixed aspect so image shows its true ratio. */ +.plate .plate-image.is-natural { + height: auto; +} +.plate .plate-image.is-natural img { + height: auto; + object-fit: contain; +} .plate:hover .plate-image img { transform: scale(1.03); filter: saturate(1.05) contrast(1.04);