2022-12-18 13:22:28 +00:00
|
|
|
<script setup lang="ts">
|
2023-01-08 06:21:09 +00:00
|
|
|
import type { mastodon } from 'masto'
|
2022-12-18 13:22:28 +00:00
|
|
|
|
2023-01-06 18:50:31 +00:00
|
|
|
defineProps<{
|
2023-01-08 06:21:09 +00:00
|
|
|
card: mastodon.v1.PreviewCard
|
2022-12-18 13:22:28 +00:00
|
|
|
/** When it is root card in the list, not appear as a child card */
|
|
|
|
root?: boolean
|
|
|
|
/** For the preview image, only the small image mode is displayed */
|
|
|
|
provider?: string
|
|
|
|
}>()
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div
|
2023-01-11 19:08:15 +00:00
|
|
|
max-h-2xl
|
2022-12-18 13:22:28 +00:00
|
|
|
flex flex-col
|
2023-01-11 19:08:15 +00:00
|
|
|
my-auto
|
2022-12-18 13:22:28 +00:00
|
|
|
:class="[
|
2023-01-09 22:49:05 +00:00
|
|
|
root ? 'flex-gap-1' : 'justify-center sm:justify-start',
|
2022-12-18 13:22:28 +00:00
|
|
|
]"
|
|
|
|
>
|
2023-04-29 20:57:26 +00:00
|
|
|
<p text-secondary break-all line-clamp-1>
|
2022-12-18 13:22:28 +00:00
|
|
|
{{ provider }}
|
|
|
|
</p>
|
|
|
|
<strong
|
|
|
|
v-if="card.title" font-normal sm:font-medium line-clamp-1
|
2023-04-29 20:57:26 +00:00
|
|
|
break-all
|
2022-12-18 13:22:28 +00:00
|
|
|
>{{ card.title }}</strong>
|
|
|
|
<p
|
|
|
|
v-if="card.description"
|
2023-04-29 20:57:26 +00:00
|
|
|
line-clamp-1 break-all sm:break-words text-secondary :class="[root ? 'sm:line-clamp-2' : '']"
|
2022-12-18 13:22:28 +00:00
|
|
|
>
|
|
|
|
{{ card.description }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</template>
|