Fork of Chiri for Astro for my blog
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 93856307e5f4eeb75dad33c7e3281050e4e8d7b9 30 lines 677 B view raw
1--- 2import { themeConfig } from '@/config' 3import { formatDate } from '@/utils/date' 4import type { FormattedDateProps } from '@/types' 5 6const { 7 date, 8 format, 9 context = 'default' 10} = Astro.props as FormattedDateProps & { context?: 'list' | 'post' | 'default' } 11--- 12 13<time 14 datetime={date.toISOString()} 15 class={!themeConfig.date.dateOnRight && 16 (themeConfig.date.dateFormat === 'MONTH DAY YYYY' || themeConfig.date.dateFormat === 'DAY MONTH YYYY') && 17 context === 'list' 18 ? 'date-left' 19 : ''} 20> 21 <Fragment set:html={formatDate(date, format)} /> 22</time> 23 24<style> 25 .date-left { 26 display: inline-block; 27 min-width: 86px; 28 text-align: right; 29 } 30</style>