This commit is contained in:
syuilo
2017-02-15 00:23:57 +09:00
parent 974c787a7c
commit 4255dded54
2 changed files with 65 additions and 13 deletions

View File

@@ -3,7 +3,10 @@
<mk-ellipsis-icon></mk-ellipsis-icon>
</div>
<div class="main" if={ !fetching }>
<button class="read-more" if={ p.reply_to && p.reply_to.reply_to_id && context == null } onclick={ loadContext } disabled={ loadingContext }><i class="fa fa-ellipsis-v" if={ !loadingContext }></i><i class="fa fa-spinner fa-pulse" if={ loadingContext }></i></button>
<button class="read-more" if={ p.reply_to && p.reply_to.reply_to_id && context == null } onclick={ loadContext } disabled={ loadingContext }>
<i class="fa fa-ellipsis-v" if={ !loadingContext }></i>
<i class="fa fa-spinner fa-pulse" if={ loadingContext }></i>
</button>
<div class="context">
<virtual each={ post in context }>
<mk-post-preview post={ post }></mk-post-preview>
@@ -13,15 +16,31 @@
<mk-post-preview post={ p.reply_to }></mk-post-preview>
</div>
<div class="repost" if={ isRepost }>
<p><a class="avatar-anchor" href={ CONFIG.url + '/' + post.user.username }><img class="avatar" src={ post.user.avatar_url + '?thumbnail&size=32' } alt="avatar"/></a><i class="fa fa-retweet"></i><a class="name" href={ CONFIG.url + '/' + post.user.username }>{ post.user.name }</a>がRepost</p>
<p>
<a class="avatar-anchor" href={ CONFIG.url + '/' + post.user.username }>
<img class="avatar" src={ post.user.avatar_url + '?thumbnail&size=32' } alt="avatar"/></a>
<i class="fa fa-retweet"></i><a class="name" href={ CONFIG.url + '/' + post.user.username }>
{ post.user.name }
</a>
がRepost
</p>
</div>
<article>
<header><a class="avatar-anchor" href={ CONFIG.url + '/' + p.user.username }><img class="avatar" src={ p.user.avatar_url + '?thumbnail&size=64' } alt="avatar"/></a><div><a class="name" href={ CONFIG.url + '/' + p.user.username }>{ p.user.name }</a><span class="username">@{ p.user.username }</span></div></header>
<header>
<a class="avatar-anchor" href={ CONFIG.url + '/' + p.user.username }>
<img class="avatar" src={ p.user.avatar_url + '?thumbnail&size=64' } alt="avatar"/>
</a>
<div>
<a class="name" href={ CONFIG.url + '/' + p.user.username }>{ p.user.name }</a>
<span class="username">@{ p.user.username }</span>
</div>
</header>
<div class="body">
<div class="text" ref="text"></div>
<div class="media" if={ p.media }>
<virtual each={ file in p.media }><img src={ file.url + '?thumbnail&size=512' } alt={ file.name } title={ file.name }/></virtual>
</div>
<mk-poll if={ p.poll } post={ p }></mk-poll>
</div><a class="time" href={ url }>
<mk-time time={ p.created_at } mode="detail"></mk-time></a>
<footer>
@@ -42,7 +61,10 @@
<p>Repost</p>
</header>
<ol class="users">
<li class="user" each={ reposts }><a class="avatar-anchor" href={ CONFIG.url + '/' + user.username } title={ user.name }><img class="avatar" src={ user.avatar_url + '?thumbnail&size=32' } alt=""/></a></li>
<li class="user" each={ reposts }>
<a class="avatar-anchor" href={ CONFIG.url + '/' + user.username } title={ user.name }>
<img class="avatar" src={ user.avatar_url + '?thumbnail&size=32' } alt=""/></a>
</li>
</ol>
</div>
<div class="likes" if={ likes && likes.length > 0 }>
@@ -50,7 +72,10 @@
<p>いいね</p>
</header>
<ol class="users">
<li class="user" each={ likes }><a class="avatar-anchor" href={ CONFIG.url + '/' + username } title={ name }><img class="avatar" src={ avatar_url + '?thumbnail&size=32' } alt=""/></a></li>
<li class="user" each={ likes }>
<a class="avatar-anchor" href={ CONFIG.url + '/' + username } title={ name }>
<img class="avatar" src={ avatar_url + '?thumbnail&size=32' } alt=""/></a>
</li>
</ol>
</div>
</div>