This commit is contained in:
2021-08-23 19:14:23 +02:00
parent 2f50ad9d55
commit cfc0ed1ea4
40 changed files with 381 additions and 234 deletions

View File

@@ -2,7 +2,7 @@
<nuxt-link :to="`/blog/${slug}`">
<div class="rounded-lg dark:shadow-white shadow-xl h-116 w-full lg:w-100 text-left bg-gray-100 dark:bg-gray-800 transform hover:scale-103 duration-300 mb-8 lg:mb-0">
<div class="h-2/5 post rounded-t-lg"
:style="{ backgroundImage: `url(${getCover})` }">
:style="{ backgroundImage: `url(https://athena.arthurdanjou.fr/files/${cover})` }">
</div>
<div class="h-3/5 p-4 flex flex-col justify-between">
<div>
@@ -11,8 +11,8 @@
<Tag :content="tag" :pill="true"/>
</div>
</div>
<h1 class="text-2xl font-bold">{{ title }}</h1>
<p class="text-base mt-3 text-gray-700 dark:text-gray-400 text-justify">{{ description }}</p>
<h1 class="text-2xl font-bold">{{ $t(title) }}</h1>
<p class="text-base mt-3 text-gray-700 dark:text-gray-400 text-justify">{{ $t(description) }}</p>
</div>
<div class="flex justify-between">
<h5 class="text-base text-gray-700 dark:text-gray-400">{{ formatDate }}</h5>
@@ -69,8 +69,6 @@ export default defineComponent({
}
},
setup(props: PostProps) {
const getCover = computed(() => require(`~/assets/images/posts/${props.cover}`))
const { i18n } = useContext()
const formatDate = computed(() => {
const [first, second, third]: any = props.date.split('-')
@@ -78,7 +76,6 @@ export default defineComponent({
})
return {
getCover,
formatDate
}
}