init elas atelier #1

Merged
nvrl merged 82 commits from ela into main 2026-05-18 13:55:42 +02:00
3 changed files with 15 additions and 4 deletions
Showing only changes of commit 076375ad00 - Show all commits
+7 -2
View File
@@ -234,8 +234,13 @@ export default function Search() {
}`} }`}
> >
<div className="flex items-baseline justify-between gap-3"> <div className="flex items-baseline justify-between gap-3">
<div className={`font-display italic truncate text-lg leading-tight pr-2 ${active ? 'text-[var(--mauve)]' : 'text-[var(--text)]'}`} style={{ paddingInlineEnd: '0.35em' }}> <div className={`font-display italic truncate text-lg leading-tight pr-2 flex items-baseline gap-2 ${active ? 'text-[var(--mauve)]' : 'text-[var(--text)]'}`} style={{ paddingInlineEnd: '0.35em' }}>
{title} <span className="truncate">{title}</span>
{p.draft && (
<span className="text-[9px] font-sans not-italic uppercase tracking-[0.2em] text-[var(--peach)] border border-[var(--peach)]/60 px-1.5 py-0.5 shrink-0" style={{ borderRadius: 1 }}>
Draft
</span>
)}
</div> </div>
<time className="text-[10px] font-sans uppercase tracking-[0.18em] text-[var(--subtext0)] shrink-0" dateTime={p.date}> <time className="text-[10px] font-sans uppercase tracking-[0.18em] text-[var(--subtext0)] shrink-0" dateTime={p.date}>
{formatDate(p.date)} {formatDate(p.date)}
+4 -1
View File
@@ -33,9 +33,12 @@ let siteConfig = {
welcome_subtitle: "An ongoing arrangement of pieces, sketches, and stray observations." welcome_subtitle: "An ongoing arrangement of pieces, sketches, and stray observations."
}; };
const cookieHeader = Astro.request.headers.get('cookie') ?? '';
const fetchHeaders: HeadersInit = cookieHeader ? { cookie: cookieHeader } : {};
try { try {
const [postsRes, configRes] = await Promise.all([ const [postsRes, configRes] = await Promise.all([
fetch(`${API_URL}/api/posts`), fetch(`${API_URL}/api/posts`, { headers: fetchHeaders }),
fetch(`${API_URL}/api/config`) fetch(`${API_URL}/api/config`)
]); ]);
+4 -1
View File
@@ -42,8 +42,11 @@ let post: PostDetail | null = null;
let html = ''; let html = '';
let error = ''; let error = '';
const cookieHeader = Astro.request.headers.get('cookie') ?? '';
const fetchHeaders: HeadersInit = cookieHeader ? { cookie: cookieHeader } : {};
try { try {
const postRes = await fetch(`${API_URL}/api/posts/${encodeURIComponent(slug ?? '')}`); const postRes = await fetch(`${API_URL}/api/posts/${encodeURIComponent(slug ?? '')}`, { headers: fetchHeaders });
if (postRes.ok) { if (postRes.ok) {
post = await postRes.json(); post = await postRes.json();
html = renderMarkdown(post!.content, post!.dimensions); html = renderMarkdown(post!.content, post!.dimensions);