init elas atelier #1

Merged
nvrl merged 82 commits from ela into main 2026-05-18 13:55:42 +02:00
6 changed files with 14 additions and 13 deletions
Showing only changes of commit e722c9b4e7 - Show all commits
+2 -4
View File
@@ -128,8 +128,8 @@ export default function PostList({ posts: initialPosts, isAdmin = false }: Props
aria-label={`View ${displayTitle}`} aria-label={`View ${displayTitle}`}
> >
<div <div
className="plate-image" className={`plate-image ${hasCover ? 'is-natural' : ''}`}
style={{ aspectRatio: layout.aspect }} style={hasCover ? undefined : { aspectRatio: layout.aspect }}
> >
{hasCover ? ( {hasCover ? (
<img <img
@@ -170,8 +170,6 @@ export default function PostList({ posts: initialPosts, isAdmin = false }: Props
<span>{formatMonth(post.date)}</span> <span>{formatMonth(post.date)}</span>
<span className="plate-caption-sep" aria-hidden="true">·</span> <span className="plate-caption-sep" aria-hidden="true">·</span>
<span>{formatYear(post.date)}</span> <span>{formatYear(post.date)}</span>
<span className="plate-caption-sep" aria-hidden="true">·</span>
<span>{post.reading_time} min</span>
</div> </div>
</div> </div>
</a> </a>
@@ -8,7 +8,7 @@ export default function Login() {
const [busy, setBusy] = useState(false); const [busy, setBusy] = useState(false);
const setLoggedIn = useAuth(s => s.setLoggedIn); const setLoggedIn = useAuth(s => s.setLoggedIn);
async function handleSubmit(e: React.FormEvent<HTMLFormElement>) { async function handleSubmit(e: React.SyntheticEvent<HTMLFormElement>) {
e.preventDefault(); e.preventDefault();
const token = value.trim(); const token = value.trim();
if (!token) return; if (!token) return;
@@ -21,7 +21,7 @@ export default function Settings() {
setConfig(prev => ({ ...prev, [key]: value })); setConfig(prev => ({ ...prev, [key]: value }));
} }
async function handleSubmit(e: React.FormEvent) { async function handleSubmit(e: React.SyntheticEvent) {
e.preventDefault(); e.preventDefault();
try { try {
await updateConfig(config); await updateConfig(config);
-2
View File
@@ -114,8 +114,6 @@ const displayTitle = post ? (post.title || formatSlug(post.slug)) : 'Work';
<div class="section-rule max-w-md mx-auto mb-6"> <div class="section-rule max-w-md mx-auto mb-6">
<span class="ornament">✦</span> <span class="ornament">✦</span>
<span>{formatDate(post.date)}</span> <span>{formatDate(post.date)}</span>
<span class="ornament">·</span>
<span>{post.reading_time} min</span>
{post.image_count > 0 && ( {post.image_count > 0 && (
<> <>
<span class="ornament">·</span> <span class="ornament">·</span>
+2 -5
View File
@@ -8,12 +8,9 @@ if (!response.ok) {
return new Response(null, { status: 404 }); return new Response(null, { status: 404 });
} }
const blob = await response.blob(); return new Response(await response.blob(), {
const contentType = response.headers.get('content-type');
return new Response(blob, {
headers: { headers: {
'content-type': contentType || 'application/octet-stream', 'content-type': response.headers.get('content-type') || 'application/octet-stream',
'cache-control': 'public, max-age=3600' 'cache-control': 'public, max-age=3600'
} }
}); });
+8
View File
@@ -548,6 +548,14 @@ code, pre, kbd, samp {
filter: saturate(0.94) contrast(1.02); filter: saturate(0.94) contrast(1.02);
transition: transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1), filter 0.4s ease; 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 { .plate:hover .plate-image img {
transform: scale(1.03); transform: scale(1.03);
filter: saturate(1.05) contrast(1.04); filter: saturate(1.05) contrast(1.04);