This commit is contained in:
syuilo 2017-02-11 08:49:50 +09:00
parent 87a461c4ae
commit be113e1c72
3 changed files with 17 additions and 1 deletions

View file

@ -27,7 +27,7 @@ module.exports = function(tokens, shouldBreak, shouldEscape) {
case 'link': case 'link':
return '<mk-url href="' + escape(token.content) + '" target="_blank"></mk-url>'; return '<mk-url href="' + escape(token.content) + '" target="_blank"></mk-url>';
case 'mention': case 'mention':
return '<a href="' + CONFIG.url + '/' + escape(token.username) + '" target="_blank" data-user-preview="' + token.content + '">' + token.content + '</a>'; return '<a href="' + CONFIG.url + '/' + escape(token.username) + '" target="_blank" data-user-preview="' + token.content + '" ' + (me && me.username == token.username ? 'data-is-me' : '') + '>' + token.content + '</a>';
case 'hashtag': // TODO case 'hashtag': // TODO
return '<a>' + escape(token.content) + '</a>'; return '<a>' + escape(token.content) + '</a>';
case 'code': case 'code':

View file

@ -239,6 +239,14 @@
background #f8f8f8 background #f8f8f8
border-radius 2px border-radius 2px
[data-is-me]:after
content "you"
padding 0 4px
margin-left 4px
font-size 80%
color $theme-color-foreground
background $theme-color
> .media > .media
> img > img
display block display block

View file

@ -219,6 +219,14 @@
background #f8f8f8 background #f8f8f8
border-radius 2px border-radius 2px
[data-is-me]:after
content "you"
padding 0 4px
margin-left 4px
font-size 80%
color $theme-color-foreground
background $theme-color
> .media > .media
> img > img
display block display block