diff --git a/src/components/dev/DevBanner.astro b/src/components/dev/DevBanner.astro index 201bb4c..94ccf13 100644 --- a/src/components/dev/DevBanner.astro +++ b/src/components/dev/DevBanner.astro @@ -22,25 +22,33 @@ const site = import.meta.env.DEV ? await getSite() : null const here = site ? [...forEntry(site.diagnostics, collection, id), ...diagnostics] : [] const elsewhere = site ? site.diagnostics.filter((d) => !here.includes(d)) : [] const notice = status ? NOTICE[status] : undefined +const label = [status && status !== 'published' ? status : null, here.length || null] + .filter(Boolean) + .join(' · ') --- {site && (here.length || elsewhere.length || notice) && ( - + )} diff --git a/src/components/home/ActivityStrip.astro b/src/components/home/ActivityStrip.astro new file mode 100644 index 0000000..bea4f7d --- /dev/null +++ b/src/components/home/ActivityStrip.astro @@ -0,0 +1,31 @@ +--- +import type { Activity } from '@/lib/site/types' + +type Props = { + activity: Activity[] +} + +const { activity } = Astro.props +const total = activity.length +const touched = activity.filter((cell) => cell.touched).length +const latest = activity.at(-1)?.touched ?? false +const summary = `Updated in ${touched} of ${total} recent release${total === 1 ? '' : 's'}${latest ? ', including the latest' : ''}` +--- + +{total > 0 && ( +
+ {summary} + +
+)} diff --git a/src/components/home/Changelog.astro b/src/components/home/Changelog.astro new file mode 100644 index 0000000..5b3213f --- /dev/null +++ b/src/components/home/Changelog.astro @@ -0,0 +1,47 @@ +--- +import { CHANGE_TYPES } from '@/lib/constants/changelog' +import { toMilitaryDTG } from '@/lib/content/dates' +import { trailOf } from '@/lib/site/navigation' +import type { Change, Release } from '@/lib/site/types' + +type Props = { + releases: Release[] +} + +const LIMIT = 4 + +const { releases } = Astro.props + +const labelOf = (kind: Change['kind']) => + CHANGE_TYPES.find((option) => option.value === kind)?.label ?? kind + +const workOf = (change: Change) => (change.article ? trailOf(change.article)[0].title : 'Site') +--- + ++ {change.article ? {change.text} : change.text} +
++{more} more
} +Index
+{work.summary.excerpt}
} +ARE YOU TEST?
+