This commit is contained in:
syuilo
2018-05-04 16:27:03 +09:00
parent f62603fd9d
commit b5acf15877
18 changed files with 109 additions and 74 deletions

View File

@@ -6,12 +6,20 @@
import Vue from 'vue';
export default Vue.extend({
props: ['image'],
props: {
image: {
type: Object,
required: true
},
raw: {
default: false
}
},
computed: {
style(): any {
return {
'background-color': this.image.properties.avgColor ? `rgb(${this.image.properties.avgColor.join(',')})` : 'transparent',
'background-image': `url(${this.image.url}?thumbnail&size=512)`
'background-image': this.raw ? `url(${this.image.url})` : `url(${this.image.url}?thumbnail&size=512)`
};
}
}

View File

@@ -55,6 +55,7 @@ root(isDark)
> header
display flex
align-items baseline
margin-bottom 4px
white-space nowrap

View File

@@ -37,7 +37,7 @@
<router-link v-for="tag in p.tags" :key="tag" :to="`/search?q=#${tag}`">{{ tag }}</router-link>
</div>
<div class="media" v-if="p.media.length > 0">
<mk-media-list :media-list="p.media"/>
<mk-media-list :media-list="p.media" :raw="true"/>
</div>
<mk-poll v-if="p.poll" :note="p"/>
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>

View File

@@ -49,6 +49,7 @@ root(isDark)
> header
display flex
align-items baseline
margin-bottom 4px
white-space nowrap

View File

@@ -69,6 +69,7 @@ root(isDark)
> header
display flex
align-items baseline
margin-bottom 2px
white-space nowrap

View File

@@ -333,7 +333,7 @@ root(isDark)
> header
display flex
align-items center
align-items baseline
white-space nowrap
@media (min-width 500px)

View File

@@ -124,7 +124,7 @@ root(isDark)
> header
display flex
align-items center
align-items baseline
white-space nowrap
i, .mk-reaction-icon