Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/trueberryless/the-thinking-hub. The central knowledge hub for 8 key Computer Science thinking modes. the-thinking-hub.felixs.dev
Something went wrong. Try again.
699 B · 33 lines
Astro
12345678910111213141516171819202122232425262728293031323334---import { themeConfig } from '@/config'import { formatDate } from '@/utils/date'import type { FormattedDateProps } from '@/types'
const { date, format, context = 'default'} = Astro.props as FormattedDateProps & { context?: 'list' | 'post' | 'default' }---
<time datetime={date.toISOString()} class={ !themeConfig.date.dateOnRight && (themeConfig.date.dateFormat === 'MONTH DAY YYYY' || themeConfig.date.dateFormat === 'DAY MONTH YYYY') && context === 'list' ? 'date-left' : '' }> <Fragment set:html={formatDate(date, format)} /></time>
<style> .date-left { display: inline-block; min-width: 86px; text-align: right; }</style>