Extract user's profile

This commit is contained in:
syuilo
2017-02-22 12:43:15 +09:00
parent ce216d218b
commit f2c5dc468c
10 changed files with 102 additions and 69 deletions

View File

@ -1,11 +1,15 @@
<mk-list-user><a class="avatar-anchor" href={ CONFIG.url + '/' + user.username }><img class="avatar" src={ user.avatar_url + '?thumbnail&size=64' } alt="avatar"/></a>
<mk-list-user>
<a class="avatar-anchor" href={ CONFIG.url + '/' + user.username }>
<img class="avatar" src={ user.avatar_url + '?thumbnail&size=64' } alt="avatar"/>
</a>
<div class="main">
<header>
<div class="left"><a class="name" href={ CONFIG.url + '/' + user.username }>{ user.name }</a><span class="username">@{ user.username }</span></div>
<a class="name" href={ CONFIG.url + '/' + user.username }>{ user.name }</a>
<span class="username">@{ user.username }</span>
</header>
<div class="body">
<p class="followed" if={ user.is_followed }>フォローされています</p>
<div class="bio">{ user.bio }</div>
<div class="description">{ user.description }</div>
</div>
</div>
<mk-follow-button user={ user }></mk-follow-button>
@ -41,31 +45,23 @@
> header
margin-bottom 2px
&:after
content ""
display block
clear both
> .name
display inline
margin 0
padding 0
color #777
font-size 1em
font-weight 700
text-align left
text-decoration none
> .left
float left
&:hover
text-decoration underline
> .name
display inline
margin 0
padding 0
color #777
font-size 1em
font-weight 700
text-align left
text-decoration none
&:hover
text-decoration underline
> .username
text-align left
margin 0 0 0 8px
color #ccc
> .username
text-align left
margin 0 0 0 8px
color #ccc
> .body
> .followed
@ -78,7 +74,7 @@
background #eefaff
border-radius 4px
> .bio
> .description
cursor default
display block
margin 0

View File

@ -3,7 +3,7 @@
<div class="title">
<p class="name" href={ CONFIG.url + '/' + user.username }>{ user.name }</p>
<p class="username">@{ user.username }</p>
<p class="location" if={ user.location }><i class="fa fa-map-marker"></i>{ user.location }</p>
<p class="location" if={ user.profile.location }><i class="fa fa-map-marker"></i>{ user.profile.location }</p>
</div>
<footer><a href={ '/' + user.username }>投稿</a><a href={ '/' + user.username + '/media' }>メディア</a><a href={ '/' + user.username + '/graphs' }>グラフ</a>
<button onclick={ NotImplementedException }><i class="fa fa-ellipsis-h"></i></button>

View File

@ -5,7 +5,7 @@
<p class="name">{ user.name }</p>
<p class="username">@{ user.username }</p>
</div>
<div class="bio">{ user.bio }</div>
<div class="description">{ user.description }</div>
<div class="status">
<div>
<p>投稿</p><a>{ user.posts_count }</a>
@ -69,7 +69,7 @@
font-size 0.8em
color #999
> .bio
> .description
padding 0 16px
font-size 0.7em
color #555

View File

@ -3,9 +3,9 @@
<mk-big-follow-button user={ user }></mk-big-follow-button>
<p class="followed" if={ user.is_followed }>フォローされています</p>
</div>
<div class="bio" if={ user.bio != '' }>{ user.bio }</div>
<div class="birthday" if={ user.birthday }>
<p><i class="fa fa-birthday-cake"></i>{ user.birthday.replace('-', '年').replace('-', '月') + '日' } ({ age(user.birthday) }歳)</p>
<div class="description" if={ user.description }>{ user.description }</div>
<div class="birthday" if={ user.profile.birthday }>
<p><i class="fa fa-birthday-cake"></i>{ user.profile.birthday.replace('-', '年').replace('-', '月') + '日' } ({ age(user.profile.birthday) }歳)</p>
</div>
<div class="twitter" if={ user.twitter }>
<p><i class="fa fa-twitter"></i><a href={ 'https://twitter.com/' + user.twitter.screen_name } target="_blank">@{ user.twitter.screen_name }</a></p>
@ -39,7 +39,7 @@
background #eefaff
border-radius 4px
> .bio
> .description
padding 16px
color #555
border-top solid 1px #eee

View File

@ -1,8 +1,14 @@
<mk-user-preview><a class="avatar-anchor" href={ CONFIG.url + '/' + user.username }><img class="avatar" src={ user.avatar_url + '?thumbnail&size=64' } alt="avatar"/></a>
<mk-user-preview>
<a class="avatar-anchor" href={ CONFIG.url + '/' + user.username }>
<img class="avatar" src={ user.avatar_url + '?thumbnail&size=64' } alt="avatar"/>
</a>
<div class="main">
<header><a class="name" href={ CONFIG.url + '/' + user.username }>{ user.name }</a><span class="username">@{ user.username }</span></header>
<header>
<a class="name" href={ CONFIG.url + '/' + user.username }>{ user.name }</a>
<span class="username">@{ user.username }</span>
</header>
<div class="body">
<div class="bio">{ user.bio }</div>
<div class="description">{ user.description }</div>
</div>
</div>
<style>
@ -75,7 +81,7 @@
> .body
> .bio
> .description
cursor default
display block
margin 0

View File

@ -14,13 +14,13 @@
<span class="username">@{ user.username }</span>
<span class="followed" if={ user.is_followed }>フォローされています</span>
</div>
<div class="bio">{ user.bio }</div>
<div class="description">{ user.description }</div>
<div class="info">
<p class="location" if={ user.location }>
<i class="fa fa-map-marker"></i>{ user.location }
<p class="location" if={ user.profile.location }>
<i class="fa fa-map-marker"></i>{ user.profile.location }
</p>
<p class="birthday" if={ user.birthday }>
<i class="fa fa-birthday-cake"></i>{ user.birthday.replace('-', '年').replace('-', '月') + '日' } ({ age(user.birthday) }歳)
<p class="birthday" if={ user.profile.birthday }>
<i class="fa fa-birthday-cake"></i>{ user.profile.birthday.replace('-', '年').replace('-', '月') + '日' } ({ age(user.profile.birthday) }歳)
</p>
</div>
<div class="friends">
@ -119,7 +119,7 @@
background #f8f8f8
border-radius 4px
> .bio
> .description
margin 8px 0
color #333