1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-13 20:39:58 +00:00
elk/components/status/StatusPreviewCardInfo.vue

37 lines
855 B
Vue
Raw Normal View History

<script setup lang="ts">
2023-01-08 06:21:09 +00:00
import type { mastodon } from 'masto'
2023-01-06 18:50:31 +00:00
defineProps<{
2023-01-08 06:21:09 +00:00
card: mastodon.v1.PreviewCard
/** 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
max-h-2xl
flex flex-col
my-auto
:class="[
root ? 'flex-gap-1' : 'justify-center sm:justify-start',
]"
>
<p text-secondary break-all line-clamp-1>
{{ provider }}
</p>
<strong
v-if="card.title" font-normal sm:font-medium line-clamp-1
break-all
>{{ card.title }}</strong>
<p
v-if="card.description"
line-clamp-1 break-all sm:break-words text-secondary :class="[root ? 'sm:line-clamp-2' : '']"
>
{{ card.description }}
</p>
</div>
</template>