forked from AkkomaGang/akkoma-fe
Force oembeds to use 100% width
This commit is contained in:
parent
c3bea8dfd1
commit
fa8fa2d330
2 changed files with 8 additions and 1 deletions
|
@ -33,6 +33,9 @@ const Attachment = {
|
||||||
},
|
},
|
||||||
isSmall () {
|
isSmall () {
|
||||||
return this.size === 'small'
|
return this.size === 'small'
|
||||||
|
},
|
||||||
|
fullwidth () {
|
||||||
|
return fileTypeService.fileType(this.attachment.mimetype) === 'html'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div v-if="size==='hide'">
|
<div v-if="size==='hide'">
|
||||||
<a class="placeholder" v-if="type !== 'html'" target="_blank" :href="attachment.url">[{{nsfw ? "NSFW/" : ""}}{{type.toUpperCase()}}]</a>
|
<a class="placeholder" v-if="type !== 'html'" target="_blank" :href="attachment.url">[{{nsfw ? "NSFW/" : ""}}{{type.toUpperCase()}}]</a>
|
||||||
</div>
|
</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()">
|
<a class="image-attachment" v-if="hidden" @click.prevent="toggleHidden()">
|
||||||
<img :key="nsfwImage" :src="nsfwImage"/>
|
<img :key="nsfwImage" :src="nsfwImage"/>
|
||||||
</a>
|
</a>
|
||||||
|
@ -71,6 +71,9 @@
|
||||||
border-color: var(--border, $fallback--border);
|
border-color: var(--border, $fallback--border);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
.fullwidth {
|
||||||
|
flex-basis: 100%;
|
||||||
|
}
|
||||||
// fixes small gap below video
|
// fixes small gap below video
|
||||||
&.video {
|
&.video {
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
|
@ -117,6 +120,7 @@
|
||||||
|
|
||||||
.oembed {
|
.oembed {
|
||||||
line-height: 1.2em;
|
line-height: 1.2em;
|
||||||
|
flex: 1 0 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
Loading…
Reference in a new issue