mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-05-08 22:07:32 +08:00
37 lines
694 B
Vue
37 lines
694 B
Vue
<template>
|
|
<div class="blog-post-meta">
|
|
<span class="post-date">{{ post.date.formatted }}</span> by
|
|
<span v-html="formattedAuthors"></span>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { computed } from 'vue';
|
|
|
|
import { usePosts } from '../composables/use-posts';
|
|
|
|
const { post } = usePosts();
|
|
|
|
const formattedAuthors = computed(() => {
|
|
return post.value.authors
|
|
.map(
|
|
author =>
|
|
`<a class="author" href="${author.link}" target="_blank">${author.name}</a>`
|
|
)
|
|
.join(', ');
|
|
});
|
|
</script>
|
|
|
|
<style>
|
|
.blog-post-meta {
|
|
margin-top: 8px;
|
|
font-size: 14px;
|
|
}
|
|
.author {
|
|
color: var(--vp-c-text-1) !important;
|
|
}
|
|
.post-date {
|
|
color: var(--vp-c-text-2);
|
|
}
|
|
</style>
|