2024-11-30 02:19:32 +01:00
|
|
|
<template>
|
2024-12-02 11:17:25 +01:00
|
|
|
<div :class="['prose prose-sm block relative dark:prose-invert duration-200 !max-w-full break-words prose-a:no-underline prose-a:hover:underline', $style.content]" v-html="content">
|
2024-11-30 02:19:32 +01:00
|
|
|
</div>
|
2024-11-30 16:39:02 +01:00
|
|
|
|
2024-12-01 17:56:31 +01:00
|
|
|
<Attachments v-if="attachments.length > 0" :attachments="attachments" />
|
|
|
|
|
|
2024-11-30 19:15:23 +01:00
|
|
|
<div v-if="quote" class="mt-4 rounded border overflow-hidden">
|
2024-11-30 16:39:02 +01:00
|
|
|
<Note :note="quote" :hide-actions="true" :small-layout="true" />
|
|
|
|
|
</div>
|
2024-11-30 02:19:32 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2024-12-01 17:56:31 +01:00
|
|
|
import type { Attachment, Status } from "@versia/client/types";
|
|
|
|
|
import Attachments from "./attachments.vue";
|
2024-11-30 16:39:02 +01:00
|
|
|
import Note from "./note.vue";
|
|
|
|
|
|
2024-11-30 02:19:32 +01:00
|
|
|
const { content } = defineProps<{
|
|
|
|
|
content: string;
|
2024-11-30 16:39:02 +01:00
|
|
|
quote?: NonNullable<Status["quote"]>;
|
2024-12-01 17:56:31 +01:00
|
|
|
attachments: Attachment[];
|
2024-11-30 02:19:32 +01:00
|
|
|
}>();
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style module>
|
|
|
|
|
.content pre:has(code) {
|
|
|
|
|
word-wrap: normal;
|
|
|
|
|
background: transparent;
|
|
|
|
|
background-color: #ffffff0d;
|
|
|
|
|
border-radius: .25rem;
|
|
|
|
|
hyphens: none;
|
|
|
|
|
margin-top: 1rem;
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
padding: .75rem 1rem;
|
|
|
|
|
tab-size: 4;
|
|
|
|
|
white-space: pre;
|
|
|
|
|
word-break: normal;
|
|
|
|
|
word-spacing: normal;
|
|
|
|
|
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
|
|
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
|
|
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), 0 0 #0000;
|
|
|
|
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
|
|
|
--tw-ring-color: hsla(0, 0%, 100%, .1)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content pre code {
|
|
|
|
|
display: block;
|
|
|
|
|
padding: 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content code:not(pre code)::after,
|
|
|
|
|
.content code:not(pre code)::before {
|
|
|
|
|
content: ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content ol li input[type=checkbox],
|
|
|
|
|
.content ul li input[type=checkbox] {
|
|
|
|
|
border-radius:.25rem;
|
|
|
|
|
margin-bottom:0.2rem;
|
|
|
|
|
margin-right:.5rem;
|
|
|
|
|
margin-top:0;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
--tw-text-opacity:1;
|
|
|
|
|
color: var(--theme-primary-400);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content code:not(pre code) {
|
|
|
|
|
border-radius: .25rem;
|
|
|
|
|
padding: .25rem .5rem;
|
|
|
|
|
word-wrap: break-word;
|
|
|
|
|
background: transparent;
|
|
|
|
|
background-color: #ffffff0d;
|
|
|
|
|
hyphens: none;
|
|
|
|
|
margin-top: 1rem;
|
|
|
|
|
tab-size: 4;
|
|
|
|
|
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
|
|
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
|
|
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), 0 0 #0000;
|
|
|
|
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
|
|
|
--tw-ring-color: hsla(0, 0%, 100%, .1)
|
|
|
|
|
}
|
|
|
|
|
</style>
|