2018-02-14 11:47:40 +00:00
|
|
|
<template>
|
|
|
|
<div class="mk-user-card">
|
2018-07-24 14:43:14 +00:00
|
|
|
<header :style="user.bannerUrl ? `background-image: url(${user.bannerUrl})` : ''">
|
2018-05-26 01:51:00 +00:00
|
|
|
<mk-avatar class="avatar" :user="user"/>
|
2018-02-14 11:47:40 +00:00
|
|
|
</header>
|
2018-12-06 01:02:04 +00:00
|
|
|
<a class="name" :href="user | userPage" target="_blank">
|
|
|
|
<misskey-flavored-markdown :text="user.name || user.username" :shouldBreak="false" :plainText="true" :custom-emojis="user.emojis"/>
|
|
|
|
</a>
|
2018-05-18 06:42:42 +00:00
|
|
|
<p class="username"><mk-acct :user="user"/></p>
|
2018-11-13 07:19:46 +00:00
|
|
|
<mk-follow-button class="follow-button" :user="user"/>
|
2018-02-14 11:47:40 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-03-27 07:51:12 +00:00
|
|
|
|
2018-02-14 11:47:40 +00:00
|
|
|
export default Vue.extend({
|
2018-04-09 09:52:29 +00:00
|
|
|
props: ['user']
|
2018-02-14 11:47:40 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
.mk-user-card
|
|
|
|
display inline-block
|
|
|
|
width 200px
|
|
|
|
text-align center
|
|
|
|
border-radius 8px
|
|
|
|
background #fff
|
|
|
|
|
|
|
|
> header
|
|
|
|
display block
|
|
|
|
height 80px
|
|
|
|
background-color #ddd
|
|
|
|
background-size cover
|
|
|
|
background-position center
|
|
|
|
border-radius 8px 8px 0 0
|
|
|
|
|
2018-05-26 01:51:00 +00:00
|
|
|
> .avatar
|
|
|
|
position absolute
|
|
|
|
top 20px
|
|
|
|
left calc(50% - 40px)
|
|
|
|
width 80px
|
|
|
|
height 80px
|
|
|
|
border solid 2px #fff
|
|
|
|
border-radius 8px
|
2018-02-14 11:47:40 +00:00
|
|
|
|
|
|
|
> .name
|
|
|
|
display block
|
|
|
|
margin 24px 0 0 0
|
|
|
|
font-size 16px
|
|
|
|
color #555
|
|
|
|
|
|
|
|
> .username
|
|
|
|
margin 0
|
|
|
|
font-size 15px
|
|
|
|
color #ccc
|
|
|
|
|
2018-11-13 07:19:46 +00:00
|
|
|
> .follow-button
|
2018-02-14 11:47:40 +00:00
|
|
|
display inline-block
|
|
|
|
margin 8px 0 16px 0
|
|
|
|
|
|
|
|
</style>
|