--- import { getCollection } from 'astro:content'; import Base from '../layouts/Base.astro'; const posts = (await getCollection('news', ({ data }) => !data.draft)) .sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()) .slice(0, 3); const fmt = (d) => new Intl.DateTimeFormat('en-GB', { dateStyle: 'long' }).format(d); const iso = (d) => d.toISOString().slice(0, 10); // Reading time from the Markdown body (~220 wpm) — differentiating card metadata; // category/author are identical across all articles, so cards omit them (NN/g). const readMin = (p) => Math.max(1, Math.round((p.body ?? '').split(/\s+/).length / 220)); // Services per the Science Portal spec. Tiles carry no status chrome — honesty // lives at the interaction point (REQUIREMENTS §5): each target page opens with // its own whisper badge. Planned services stay in the grid but subdued (muted, // no link) with availability folded into the description text. // Tile icons: hand-drawn stroke glyphs in the header-icon family (.ico — // currentColor, round caps), aria-hidden. NN/g icon research: icons alone are // ambiguous, but NEXT TO an always-visible label they differentiate otherwise // uniform tiles and speed up grid scanning. const services = [ { title: 'Proposals', href: '/proposals', desc: 'Submit observation proposals, including ToO / MWL requests.', icon: '' }, { title: 'Data Explorer', href: 'https://padc-ctao-data-explorer.obspm.fr/', ext: true, desc: 'Search and download CTAO science data products.', icon: '' }, { title: 'Dashboard', href: '/dashboard', desc: 'Your proposals, data products and support tickets in one place.', icon: '' }, { title: 'User Support', href: '/support', desc: 'Help desk, FAQ, user forum and mailing lists.', icon: '' }, // Two subdued planned tiles complete the 2×3 grid (an orphan 4th tile in a // 3-col grid reads broken); the remaining TBD services stay on the quiet line. { title: 'Software', planned: true, desc: 'Science analysis tools and pipelines — planned.', icon: '' }, { title: 'Documentation', planned: true, desc: 'User guides and technical documentation — planned.', icon: '' }, ]; const planned = ['Scheduling', 'Science alerts']; --- {/* Photographic hero: LST-1 under the La Palma night sky (copied from the content library to /brand/hero.jpg) beneath the Galaxy scrim — text contrast computed worst-case in DESIGN.md. Three elements only: headline, brand subtitle, CTA pair (Apple hero restraint). */}
Cherenkov Telescope Array Observatory

CTAO Science Portal

Exploring the Universe at the Highest Energies

{/* Hero actions = the two REAL things a logged-out visitor can do today: news (SPEC §3.1 lists general information/announcements FIRST; §3.3.1 "displays the main information"; calls for proposals arrive VIA news) and the external Data Explorer. Proposals stays in nav + tiles — a mock doesn't earn hero billing. Search lives in the header. */}
{/* Section order is task-first: Services directly under the hero, news after. NN/g homepage principles — the homepage must give clear starting points for the user's top tasks; for scientists that is proposals/data/support, not reading news. Freshness is still signalled above the fold by the one-line hero teaser, so the 3-card news section can sit below. Surface rhythm (DESIGN.md): services on Moon Gray, editorial news on white. */}

Services

{services.map((s) => ( ))}

Planned services: {planned.join(' · ')}

Latest news

All news →
{posts.map((post) => (
{post.data.cover && }

{post.data.title}

{post.data.description}

· {readMin(post)} min read
))}