summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-21 13:48:56 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-21 13:48:56 +0900
commitc80b288db30cc15aff78314373f7fd97494d86bf (patch)
tree7bfdfeff7235aae8ea8e76c553dd3ae4cfea9b2b /src/client
parent:art: (diff)
downloadmisskey-c80b288db30cc15aff78314373f7fd97494d86bf.tar.gz
misskey-c80b288db30cc15aff78314373f7fd97494d86bf.tar.bz2
misskey-c80b288db30cc15aff78314373f7fd97494d86bf.zip
Better renote annotation rendering
Co-Authored-By: tamaina <tamaina@hotmail.co.jp>
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/desktop/views/components/notes.note.vue64
-rw-r--r--src/client/app/mobile/views/components/note.vue71
2 files changed, 72 insertions, 63 deletions
diff --git a/src/client/app/desktop/views/components/notes.note.vue b/src/client/app/desktop/views/components/notes.note.vue
index d430eefb7e..59cdc7a209 100644
--- a/src/client/app/desktop/views/components/notes.note.vue
+++ b/src/client/app/desktop/views/components/notes.note.vue
@@ -4,15 +4,13 @@
<x-sub :note="p.reply"/>
</div>
<div class="renote" v-if="isRenote">
- <p>
- <router-link class="avatar-anchor" :to="note.user | userPage" v-user-preview="note.userId">
- <img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/>
- </router-link>
- %fa:retweet%
- <span>{{ '%i18n:!@reposted-by%'.substr(0, '%i18n:!@reposted-by%'.indexOf('{')) }}</span>
- <a class="name" :href="note.user | userPage" v-user-preview="note.userId">{{ note.user | userName }}</a>
- <span>{{ '%i18n:!@reposted-by%'.substr('%i18n:!@reposted-by%'.indexOf('}') + 1) }}</span>
- </p>
+ <router-link class="avatar-anchor" :to="note.user | userPage" v-user-preview="note.userId">
+ <img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/>
+ </router-link>
+ %fa:retweet%
+ <span>{{ '%i18n:!@reposted-by%'.substr(0, '%i18n:!@reposted-by%'.indexOf('{')) }}</span>
+ <a class="name" :href="note.user | userPage" v-user-preview="note.userId">{{ note.user | userName }}</a>
+ <span>{{ '%i18n:!@reposted-by%'.substr('%i18n:!@reposted-by%'.indexOf('}') + 1) }}</span>
<mk-time :time="note.createdAt"/>
</div>
<article>
@@ -324,36 +322,44 @@ root(isDark)
border-radius 4px
> .renote
+ display flex
+ align-items baseline
+ padding 16px 32px
+ line-height 28px
color #9dbb00
background isDark ? linear-gradient(to bottom, #314027 0%, #282c37 100%) : linear-gradient(to bottom, #edfde2 0%, #fff 100%)
- > p
- margin 0
- padding 16px 32px
- line-height 28px
+ .avatar-anchor
+ display inline-block
+
+ .avatar
+ vertical-align bottom
+ width 28px
+ height 28px
+ margin 0 8px 0 0
+ border-radius 6px
- .avatar-anchor
- display inline-block
+ [data-fa]
+ margin-right 4px
- .avatar
- vertical-align bottom
- width 28px
- height 28px
- margin 0 8px 0 0
- border-radius 6px
+ > span
+ flex-shrink 0
- [data-fa]
- margin-right 4px
+ &:last-of-type
+ margin-right 8px
- .name
- font-weight bold
+ .name
+ overflow hidden
+ flex-shrink 1
+ text-overflow ellipsis
+ white-space nowrap
+ font-weight bold
> .mk-time
- position absolute
- top 16px
- right 32px
+ display block
+ margin-left auto
+ flex-shrink 0
font-size 0.9em
- line-height 28px
& + article
padding-top 8px
diff --git a/src/client/app/mobile/views/components/note.vue b/src/client/app/mobile/views/components/note.vue
index 71fa43aea2..6b7c64f047 100644
--- a/src/client/app/mobile/views/components/note.vue
+++ b/src/client/app/mobile/views/components/note.vue
@@ -4,15 +4,13 @@
<x-sub :note="p.reply"/>
</div>
<div class="renote" v-if="isRenote">
- <p>
- <router-link class="avatar-anchor" :to="note.user | userPage">
- <img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
- </router-link>
- %fa:retweet%
- <span>{{ '%i18n:!@reposted-by%'.substr(0, '%i18n:!@reposted-by%'.indexOf('{')) }}</span>
- <router-link class="name" :to="note.user | userPage">{{ note.user | userName }}</router-link>
- <span>{{ '%i18n:!@reposted-by%'.substr('%i18n:!@reposted-by%'.indexOf('}') + 1) }}</span>
- </p>
+ <router-link class="avatar-anchor" :to="note.user | userPage">
+ <img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
+ </router-link>
+ %fa:retweet%
+ <span>{{ '%i18n:!@reposted-by%'.substr(0, '%i18n:!@reposted-by%'.indexOf('{')) }}</span>
+ <router-link class="name" :to="note.user | userPage">{{ note.user | userName }}</router-link>
+ <span>{{ '%i18n:!@reposted-by%'.substr('%i18n:!@reposted-by%'.indexOf('}') + 1) }}</span>
<mk-time :time="note.createdAt"/>
</div>
<article>
@@ -251,42 +249,47 @@ export default Vue.extend({
font-size 16px
> .renote
+ display flex
+ align-items baseline
+ padding 8px 16px
+ line-height 28px
color #9dbb00
background linear-gradient(to bottom, #edfde2 0%, #fff 100%)
- > p
- margin 0
- padding 8px 16px
- line-height 28px
+ @media (min-width 500px)
+ padding 16px
- @media (min-width 500px)
- padding 16px
+ .avatar-anchor
+ display inline-block
+
+ .avatar
+ vertical-align bottom
+ width 28px
+ height 28px
+ margin 0 8px 0 0
+ border-radius 6px
- .avatar-anchor
- display inline-block
+ [data-fa]
+ margin-right 4px
- .avatar
- vertical-align bottom
- width 28px
- height 28px
- margin 0 8px 0 0
- border-radius 6px
+ > span
+ flex-shrink 0
- [data-fa]
- margin-right 4px
+ &:last-of-type
+ margin-right 8px
- .name
- font-weight bold
+ .name
+ overflow hidden
+ flex-shrink 1
+ text-overflow ellipsis
+ white-space nowrap
+ font-weight bold
> .mk-time
- position absolute
- top 8px
- right 16px
+ display block
+ margin-left auto
+ flex-shrink 0
font-size 0.9em
- line-height 28px
-
- @media (min-width 500px)
- top 16px
& + article
padding-top 8px