1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-10-06 18:59:58 +01:00
elk/components/PostBody.vue

30 lines
498 B
Vue
Raw Normal View History

2022-11-13 16:05:32 +00:00
<script setup lang="ts">
import type { Post } from '~/api-client/types'
const props = defineProps<{
post: Post
}>()
</script>
<template>
<div class="post-body" v-html="sanitize(post.content)" />
</template>
<style>
.post-body a {
--at-apply: text-primary hover:underline;
}
.post-body b {
--at-apply: font-bold;
}
.post-body p {
--at-apply: my-1;
}
.post-body a .invisible {
--at-apply: hidden;
}
.post-body a .ellipsis {
--at-apply: truncate overflow-hidden ws-nowrap;
}
</style>