cleanup and refactor i18n + code
This commit is contained in:
parent
65c6003313
commit
703d1d7f08
28 changed files with 206 additions and 553 deletions
|
@ -10,8 +10,6 @@ const { Content, headings } = await render(content)
|
|||
const toc = headings.map((heading) => {
|
||||
return heading
|
||||
})
|
||||
|
||||
import '../styles/vendor/one-dark-pro.css'
|
||||
---
|
||||
|
||||
<div class='sidebar region'>
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
---
|
||||
import type { ArticleFrontmatter, FragmentFrontmatter } from '../content.config'
|
||||
|
||||
type Props = {
|
||||
item: ArticleFrontmatter | FragmentFrontmatter
|
||||
}
|
||||
|
||||
const { item } = Astro.props
|
||||
const locale: 'fr' | 'en' = item.frontmatter.lang
|
||||
const locale: 'fr' | 'en' = item.lang
|
||||
|
||||
let ui = {
|
||||
published: 'Publié le',
|
||||
|
@ -43,9 +49,9 @@ function rawDate(date: Date) {
|
|||
)
|
||||
}
|
||||
{
|
||||
formatDate(item.createdAt) != formatDate(item.updatedAt) &&
|
||||
!!item.createdAt &&
|
||||
!!item.updatedAt && (
|
||||
!!item.createdAt &&
|
||||
!!item.updatedAt &&
|
||||
formatDate(item.createdAt) != formatDate(item.updatedAt) && (
|
||||
<p class='meta__date'>
|
||||
{ui.updated} :
|
||||
<time datetime={rawDate(item.updatedAt)}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue