2020-04-27 02:53:04 -07:00
|
|
|
<template>
|
2020-07-27 15:27:11 -07:00
|
|
|
<div class="StatusContent">
|
2020-04-27 02:53:04 -07:00
|
|
|
<slot name="header" />
|
2021-06-07 08:41:55 -07:00
|
|
|
<StatusText :status="status">
|
|
|
|
<div v-if="status.poll && status.poll.options">
|
|
|
|
<poll :base-poll="status.poll" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div
|
|
|
|
v-if="status.attachments.length !== 0"
|
|
|
|
class="attachments media-body"
|
2020-06-26 04:07:39 -07:00
|
|
|
>
|
2021-06-07 08:41:55 -07:00
|
|
|
<attachment
|
|
|
|
v-for="attachment in nonGalleryAttachments"
|
|
|
|
:key="attachment.id"
|
|
|
|
class="non-gallery"
|
|
|
|
:size="attachmentSize"
|
|
|
|
:nsfw="nsfwClickthrough"
|
|
|
|
:attachment="attachment"
|
|
|
|
:allow-play="true"
|
|
|
|
:set-media="setMedia()"
|
|
|
|
@play="$emit('mediaplay', attachment.id)"
|
|
|
|
@pause="$emit('mediapause', attachment.id)"
|
2020-07-06 04:01:03 -07:00
|
|
|
/>
|
2021-06-07 08:41:55 -07:00
|
|
|
<gallery
|
|
|
|
v-if="galleryAttachments.length > 0"
|
|
|
|
:nsfw="nsfwClickthrough"
|
|
|
|
:attachments="galleryAttachments"
|
|
|
|
:set-media="setMedia()"
|
2020-08-31 01:50:26 -07:00
|
|
|
/>
|
2021-06-07 08:41:55 -07:00
|
|
|
</div>
|
2020-04-27 02:53:04 -07:00
|
|
|
|
2021-06-07 08:41:55 -07:00
|
|
|
<div
|
|
|
|
v-if="status.card && !noHeading"
|
|
|
|
class="link-preview media-body"
|
|
|
|
>
|
|
|
|
<link-preview
|
|
|
|
:card="status.card"
|
|
|
|
:size="attachmentSize"
|
|
|
|
:nsfw="nsfwClickthrough"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</StatusText>
|
2020-04-27 02:53:04 -07:00
|
|
|
<slot name="footer" />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./status_content.js" ></script>
|
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
|
|
|
$status-margin: 0.75em;
|
|
|
|
|
2020-07-27 15:27:11 -07:00
|
|
|
.StatusContent {
|
2020-04-27 02:53:04 -07:00
|
|
|
flex: 1;
|
|
|
|
min-width: 0;
|
|
|
|
|
2020-06-26 04:07:39 -07:00
|
|
|
.status-content-wrapper {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
}
|
|
|
|
|
2020-04-27 02:53:04 -07:00
|
|
|
.tall-status {
|
|
|
|
position: relative;
|
|
|
|
height: 220px;
|
|
|
|
overflow-x: hidden;
|
|
|
|
overflow-y: hidden;
|
|
|
|
z-index: 1;
|
|
|
|
.status-content {
|
2020-06-26 04:07:39 -07:00
|
|
|
min-height: 0;
|
2020-04-27 02:53:04 -07:00
|
|
|
mask: linear-gradient(to top, white, transparent) bottom/100% 70px no-repeat,
|
|
|
|
linear-gradient(to top, white, white);
|
|
|
|
/* Autoprefixed seem to ignore this one, and also syntax is different */
|
|
|
|
-webkit-mask-composite: xor;
|
|
|
|
mask-composite: exclude;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.tall-status-hider {
|
|
|
|
display: inline-block;
|
|
|
|
word-break: break-all;
|
|
|
|
position: absolute;
|
|
|
|
height: 70px;
|
|
|
|
margin-top: 150px;
|
|
|
|
width: 100%;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 110px;
|
|
|
|
z-index: 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
.status-unhider, .cw-status-hider {
|
|
|
|
width: 100%;
|
|
|
|
text-align: center;
|
|
|
|
display: inline-block;
|
|
|
|
word-break: break-all;
|
2020-10-20 14:01:28 -07:00
|
|
|
|
|
|
|
svg {
|
|
|
|
color: inherit;
|
|
|
|
}
|
2020-04-27 02:53:04 -07:00
|
|
|
}
|
|
|
|
|
2021-06-07 02:49:54 -07:00
|
|
|
video {
|
2020-06-18 05:41:40 -07:00
|
|
|
max-width: 100%;
|
|
|
|
max-height: 400px;
|
|
|
|
vertical-align: middle;
|
|
|
|
object-fit: contain;
|
|
|
|
}
|
|
|
|
|
2020-06-26 04:07:39 -07:00
|
|
|
.summary-wrapper {
|
|
|
|
margin-bottom: 0.5em;
|
|
|
|
border-style: solid;
|
|
|
|
border-width: 0 0 1px 0;
|
|
|
|
border-color: var(--border, $fallback--border);
|
|
|
|
flex-grow: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.summary {
|
|
|
|
font-style: italic;
|
|
|
|
padding-bottom: 0.5em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tall-subject {
|
|
|
|
position: relative;
|
|
|
|
.summary {
|
|
|
|
max-height: 2em;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.tall-subject-hider {
|
|
|
|
display: inline-block;
|
|
|
|
word-break: break-all;
|
|
|
|
// position: absolute;
|
|
|
|
width: 100%;
|
|
|
|
text-align: center;
|
|
|
|
padding-bottom: 0.5em;
|
|
|
|
}
|
|
|
|
|
2020-04-27 02:53:04 -07:00
|
|
|
.status-content {
|
2020-07-07 13:33:08 -07:00
|
|
|
&.single-line {
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
2020-07-23 06:39:01 -07:00
|
|
|
height: 1.4em;
|
2020-07-07 13:33:08 -07:00
|
|
|
}
|
2020-04-27 02:53:04 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.greentext {
|
|
|
|
color: $fallback--cGreen;
|
2020-06-19 03:49:42 -07:00
|
|
|
color: var(--postGreentext, $fallback--cGreen);
|
2020-04-27 02:53:04 -07:00
|
|
|
}
|
|
|
|
</style>
|