diff --git a/src/components/LatestDispatchBanner.astro b/src/components/LatestDispatchBanner.astro new file mode 100644 index 0000000..ed74b37 --- /dev/null +++ b/src/components/LatestDispatchBanner.astro @@ -0,0 +1,121 @@ +--- +import Avatar from './Avatar.astro'; +import { getLatestPublishedDispatches } from '../lib/db'; +import { + dispatchSlug, dispatchExcerptParas, relativeTime, +} from '../lib/format'; + +const [latest] = getLatestPublishedDispatches(1); +const excerpt = latest ? dispatchExcerptParas(latest).lead : ''; +--- +{latest && ( + +)} + +