2018-02-15 05:24:46 +01:00
|
|
|
<template>
|
2018-09-12 19:08:17 +02:00
|
|
|
<div class="zvdbznxvfixtmujpsigoccczftvpiwqh">
|
|
|
|
<div class="banner" :style="bannerStyle"></div>
|
|
|
|
<mk-avatar class="avatar" :user="user" :disable-preview="true"/>
|
2019-02-09 21:56:11 +01:00
|
|
|
<mk-follow-button v-if="$store.getters.isSignedIn && user.id != $store.state.i.id" :user="user" class="follow" mini/>
|
2018-09-12 19:08:17 +02:00
|
|
|
<div class="body">
|
2018-12-06 02:02:04 +01:00
|
|
|
<router-link :to="user | userPage" class="name">
|
2018-12-06 03:18:13 +01:00
|
|
|
<mk-user-name :user="user"/>
|
2018-12-06 02:02:04 +01:00
|
|
|
</router-link>
|
2019-01-05 11:59:10 +01:00
|
|
|
<span class="username">@{{ user | acct }} <fa v-if="user.isLocked == true" class="locked" icon="lock" fixed-width/></span>
|
2019-01-19 00:45:12 +01:00
|
|
|
|
2018-09-12 19:08:17 +02:00
|
|
|
<div class="description">
|
2019-01-19 00:45:12 +01:00
|
|
|
<mfm v-if="user.description" :text="user.description" :author="user" :i="$store.state.i" :custom-emojis="user.emojis"/>
|
2018-02-15 05:24:46 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-03-27 09:51:12 +02:00
|
|
|
|
2018-02-15 05:24:46 +01:00
|
|
|
export default Vue.extend({
|
2018-09-12 19:08:17 +02:00
|
|
|
props: ['user'],
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
bannerStyle(): any {
|
|
|
|
if (this.user.bannerUrl == null) return {};
|
|
|
|
return {
|
|
|
|
backgroundColor: this.user.bannerColor && this.user.bannerColor.length == 3 ? `rgb(${ this.user.bannerColor.join(',') })` : null,
|
|
|
|
backgroundImage: `url(${ this.user.bannerUrl })`
|
|
|
|
};
|
|
|
|
}
|
|
|
|
},
|
2018-02-15 05:24:46 +01:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
2018-09-12 19:08:17 +02:00
|
|
|
.zvdbznxvfixtmujpsigoccczftvpiwqh
|
2018-11-08 07:16:39 +01:00
|
|
|
$bg = var(--face)
|
2018-09-12 19:08:17 +02:00
|
|
|
|
2018-11-08 07:16:39 +01:00
|
|
|
height 280px
|
|
|
|
overflow hidden
|
2018-11-09 13:46:35 +01:00
|
|
|
font-size 13px
|
2018-09-12 19:08:17 +02:00
|
|
|
text-align center
|
|
|
|
background $bg
|
|
|
|
box-shadow 0 2px 4px rgba(0, 0, 0, 0.1)
|
2018-11-08 07:16:39 +01:00
|
|
|
color var(--faceText)
|
2018-02-15 05:24:46 +01:00
|
|
|
|
2018-09-12 19:08:17 +02:00
|
|
|
> .banner
|
2018-11-08 07:16:39 +01:00
|
|
|
height 90px
|
2018-09-12 19:08:17 +02:00
|
|
|
background-color #f9f4f4
|
|
|
|
background-position center
|
|
|
|
background-size cover
|
2018-02-15 05:24:46 +01:00
|
|
|
|
2018-04-29 10:17:15 +02:00
|
|
|
> .avatar
|
2018-02-15 05:24:46 +01:00
|
|
|
display block
|
2018-09-12 19:08:17 +02:00
|
|
|
margin -40px auto 0 auto
|
|
|
|
width 80px
|
|
|
|
height 80px
|
|
|
|
border-radius 100%
|
|
|
|
border solid 4px $bg
|
2018-02-15 05:24:46 +01:00
|
|
|
|
2018-11-08 03:20:50 +01:00
|
|
|
> .follow
|
|
|
|
position absolute
|
|
|
|
top 16px
|
|
|
|
right 16px
|
|
|
|
|
2018-09-12 19:08:17 +02:00
|
|
|
> .body
|
2018-11-08 07:16:39 +01:00
|
|
|
padding 0px 24px
|
2018-02-15 05:24:46 +01:00
|
|
|
|
2018-09-12 19:08:17 +02:00
|
|
|
> .name
|
2018-11-08 07:16:39 +01:00
|
|
|
font-size 120%
|
2018-09-12 19:08:17 +02:00
|
|
|
font-weight bold
|
2018-02-15 05:24:46 +01:00
|
|
|
|
2018-09-12 19:08:17 +02:00
|
|
|
> .username
|
|
|
|
display block
|
|
|
|
opacity 0.7
|
2018-02-15 05:24:46 +01:00
|
|
|
|
2019-01-05 11:59:10 +01:00
|
|
|
> .locked
|
|
|
|
opacity 0.8
|
|
|
|
|
2018-09-12 19:08:17 +02:00
|
|
|
> .description
|
2018-11-08 07:16:39 +01:00
|
|
|
margin 8px 0 16px 0
|
2018-02-15 05:24:46 +01:00
|
|
|
|
|
|
|
</style>
|