Skip to content
Snippets Groups Projects
Commit fa8fa2d3 authored by Shpuld Shpludson's avatar Shpuld Shpludson
Browse files

Force oembeds to use 100% width

parent c3bea8df
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,9 @@ const Attachment = {
},
isSmall () {
return this.size === 'small'
},
fullwidth () {
return fileTypeService.fileType(this.attachment.mimetype) === 'html'
}
},
methods: {
......
......@@ -2,7 +2,7 @@
<div v-if="size==='hide'">
<a class="placeholder" v-if="type !== 'html'" target="_blank" :href="attachment.url">[{{nsfw ? "NSFW/" : ""}}{{type.toUpperCase()}}]</a>
</div>
<div v-else class="attachment" :class="{[type]: true, loading, 'small-attachment': isSmall}" v-show="!isEmpty">
<div v-else class="attachment" :class="{[type]: true, loading, 'small-attachment': isSmall, 'fullwidth': fullwidth}" v-show="!isEmpty">
<a class="image-attachment" v-if="hidden" @click.prevent="toggleHidden()">
<img :key="nsfwImage" :src="nsfwImage"/>
</a>
......@@ -71,6 +71,9 @@
border-color: var(--border, $fallback--border);
overflow: hidden;
}
.fullwidth {
flex-basis: 100%;
}
// fixes small gap below video
&.video {
line-height: 0;
......@@ -117,6 +120,7 @@
.oembed {
line-height: 1.2em;
flex: 1 0 100%;
width: 100%;
margin-right: 15px;
display: flex;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment