Claude improvements

This commit is contained in:
Andras Schmelczer 2026-05-11 07:48:33 +01:00
parent a86940da30
commit df2267a968
79 changed files with 2695 additions and 1162 deletions

View file

@ -1,8 +1,8 @@
---
import type { CollectionEntry } from 'astro:content';
import { Image } from 'astro:assets';
import { articlePath, formatDate } from '../lib/site';
import EntryThumbnail from './EntryThumbnail.astro';
import TagList from './TagList.astro';
import { articlePath, formatDate, formatDateShort } from '../lib/site';
interface Props {
posts: CollectionEntry<'posts'>[];
@ -10,7 +10,7 @@ interface Props {
currentTag?: string;
}
const { posts, showYear = false, currentTag } = Astro.props;
const { posts, showYear = true, currentTag } = Astro.props;
---
<ol class="article-list">
@ -20,7 +20,7 @@ const { posts, showYear = false, currentTag } = Astro.props;
return (
<li>
<time datetime={post.data.date.toISOString()}>
{showYear ? formatDate(post.data.date) : formatDate(post.data.date)}
{showYear ? formatDate(post.data.date) : formatDateShort(post.data.date)}
</time>
<div>
<a class="entry-title" href={href}>
@ -29,19 +29,14 @@ const { posts, showYear = false, currentTag } = Astro.props;
<p>{post.data.description}</p>
<TagList tags={post.data.tags} currentTag={currentTag} />
</div>
<a
class="entry-thumbnail article-thumbnail"
<EntryThumbnail
src={post.data.thumbnail.src}
alt={post.data.thumbnail.alt}
href={href}
aria-label={post.data.title}
>
<Image
src={post.data.thumbnail.src}
alt={post.data.thumbnail.alt}
widths={[160, 240, 320, 480]}
sizes="(max-width: 700px) 5rem, 10rem"
loading="lazy"
/>
</a>
class="article-thumbnail"
widths={[120, 180, 240, 320, 480]}
sizes="(max-width: 700px) clamp(64px, 22vw, 80px), (max-width: 960px) 7rem, 8rem"
/>
</li>
);
})