style: format with new style

This commit is contained in:
taskylizard
2024-01-25 16:32:45 +00:00
parent bc3bbaafeb
commit ef422dcda8
43 changed files with 686 additions and 583 deletions

View File

@@ -1,20 +1,20 @@
<script setup lang="ts">
import { useData } from "vitepress";
import Authors from "./components/Authors.vue";
import { useData } from 'vitepress'
import Authors from './components/Authors.vue'
const props = defineProps<{
authors: string[];
}>();
authors: string[]
}>()
const formatDate = (raw: string): string => {
const date = new Date(raw);
return date.toLocaleDateString("en-US", {
month: "short",
day: "numeric",
});
};
const date = new Date(raw)
return date.toLocaleDateString('en-US', {
month: 'short',
day: 'numeric'
})
}
const { frontmatter } = useData();
const { frontmatter } = useData()
</script>
<template>
@@ -22,6 +22,8 @@ const { frontmatter } = useData();
{{ frontmatter.title }}
</h3>
<span>{{ frontmatter.description }} {{ formatDate(frontmatter.date) }}</span>
<span>
{{ frontmatter.description }} {{ formatDate(frontmatter.date) }}
</span>
<Authors :authors="props.authors" />
</template>