2022-11-14 02:56:48 +00:00
|
|
|
<script setup lang="ts">
|
2022-11-14 03:33:09 +00:00
|
|
|
import type { Status } from 'masto'
|
2022-11-14 02:56:48 +00:00
|
|
|
|
2022-11-14 03:33:09 +00:00
|
|
|
const { status } = defineProps<{
|
|
|
|
status: Status
|
2022-11-30 18:22:15 +00:00
|
|
|
minimized?: boolean
|
2022-11-14 02:56:48 +00:00
|
|
|
}>()
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-11-14 03:33:09 +00:00
|
|
|
<div class="status-media-container" :class="`status-media-container-${status.mediaAttachments.length}`">
|
|
|
|
<template v-for="attachment of status.mediaAttachments" :key="attachment.id">
|
2022-11-30 03:27:19 +00:00
|
|
|
<StatusAttachment
|
|
|
|
:attachment="attachment"
|
|
|
|
:attachments="status.mediaAttachments"
|
2022-11-30 18:22:15 +00:00
|
|
|
:class="{ 'max-h-72': minimized }"
|
|
|
|
w-full
|
|
|
|
h-full
|
2022-11-30 03:27:19 +00:00
|
|
|
/>
|
2022-11-14 03:33:09 +00:00
|
|
|
</template>
|
|
|
|
</div>
|
2022-11-14 02:56:48 +00:00
|
|
|
</template>
|
2022-11-14 03:33:09 +00:00
|
|
|
|
|
|
|
<style lang="postcss">
|
|
|
|
.status-media-container {
|
|
|
|
--at-apply: gap-0.5;
|
2022-11-21 13:38:10 +00:00
|
|
|
position: relative;
|
2022-11-14 03:33:09 +00:00
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
.status-media-container-1 {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
}
|
|
|
|
.status-media-container-2 {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 1fr 1fr;
|
|
|
|
}
|
|
|
|
.status-media-container-3 {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 1fr 1fr;
|
|
|
|
}
|
|
|
|
.status-media-container-4 {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 1fr 1fr;
|
|
|
|
}
|
|
|
|
</style>
|