--- import { Image } from 'astro:assets'; import { getCollection } from 'astro:content'; import BaseLayout from '../../layouts/BaseLayout.astro'; import { t } from '../../i18n/ui'; import type { Locale } from '../../lib/locale'; // /en/ 侧由 T4 薄页传 locale='en';zh 路由无人传参,默认 zh 零回归 interface Props { locale?: Locale; } const { locale = 'zh' } = Astro.props; const moments = (await getCollection('moments')).sort( (a, b) => b.data.pubDate.getTime() - a.data.pubDate.getTime(), ); const iso = (d: Date) => d.toISOString(); ---

{t('moments_title', locale)}

{t('moments_note', locale)}

– {' '}{t('pv_viewed', locale)}

    {moments.map((m) => (
  1. {m.data.image && (
    {m.data.text
    )} {m.data.text &&

    {m.data.text}

    } {m.data.tags.length > 0 && (

    {m.data.tags.map((tag) => {`#${tag}`})}

    )}
  2. ))}