This commit is contained in:
syuilo 2018-05-29 15:21:03 +09:00
parent 18c9695636
commit 188b2a9b04
6 changed files with 112 additions and 82 deletions

View File

@ -5,9 +5,18 @@
<header> <header>
<router-link class="name" :to="note.user | userPage" v-user-preview="note.userId">{{ note.user | userName }}</router-link> <router-link class="name" :to="note.user | userPage" v-user-preview="note.userId">{{ note.user | userName }}</router-link>
<span class="username"><mk-acct :user="note.user"/></span> <span class="username"><mk-acct :user="note.user"/></span>
<router-link class="time" :to="note | notePage"> <div class="info">
<mk-time :time="note.createdAt"/> <span class="mobile" v-if="note.viaMobile">%fa:mobile-alt%</span>
</router-link> <router-link class="created-at" :to="note | notePage">
<mk-time :time="note.createdAt"/>
</router-link>
<span class="visibility" v-if="note.visibility != 'public'">
<template v-if="note.visibility == 'home'">%fa:home%</template>
<template v-if="note.visibility == 'followers'">%fa:unlock%</template>
<template v-if="note.visibility == 'specified'">%fa:envelope%</template>
<template v-if="note.visibility == 'private'">%fa:lock%</template>
</span>
</div>
</header> </header>
<div class="body"> <div class="body">
<mk-sub-note-content class="text" :note="note"/> <mk-sub-note-content class="text" :note="note"/>
@ -32,24 +41,20 @@ export default Vue.extend({
<style lang="stylus" scoped> <style lang="stylus" scoped>
root(isDark) root(isDark)
display flex
font-size 0.9em font-size 0.9em
&:after
content ""
display block
clear both
> .avatar > .avatar
flex-shrink 0
display block display block
float left
margin 0 12px 0 0 margin 0 12px 0 0
width 48px width 48px
height 48px height 48px
border-radius 8px border-radius 8px
> .main > .main
float left flex 1
width calc(100% - 60px) min-width 0
> header > header
display flex display flex
@ -75,9 +80,18 @@ root(isDark)
text-overflow ellipsis text-overflow ellipsis
color isDark ? #606984 : #d1d8da color isDark ? #606984 : #d1d8da
> .time > .info
margin-left auto margin-left auto
color isDark ? #606984 : #b2b8bb font-size 0.9em
> *
color isDark ? #606984 : #b2b8bb
> .mobile
margin-right 6px
> .visibility
margin-left 6px
> .body > .body

View File

@ -44,27 +44,23 @@ export default Vue.extend({
<style lang="stylus" scoped> <style lang="stylus" scoped>
root(isDark) root(isDark)
display flex
margin 0 margin 0
padding 16px 32px padding 16px 32px
font-size 0.9em font-size 0.9em
background isDark ? #21242d : #fcfcfc background isDark ? #21242d : #fcfcfc
&:after
content ""
display block
clear both
> .avatar > .avatar
flex-shrink 0
display block display block
float left
margin 0 12px 0 0 margin 0 12px 0 0
width 48px width 48px
height 48px height 48px
border-radius 8px border-radius 8px
> .main > .main
float left flex 1
width calc(100% - 60px) min-width 0
> header > header
display flex display flex

View File

@ -387,20 +387,16 @@ root(isDark)
padding-top 8px padding-top 8px
> article > article
display flex
padding 28px 32px 18px 32px padding 28px 32px 18px 32px
&:after
content ""
display block
clear both
&:hover &:hover
> .main > footer > button > .main > footer > button
color isDark ? #707b97 : #888 color isDark ? #707b97 : #888
> .avatar > .avatar
flex-shrink 0
display block display block
float left
margin 0 16px 10px 0 margin 0 16px 10px 0
width 58px width 58px
height 58px height 58px
@ -410,8 +406,8 @@ root(isDark)
//top 74px //top 74px
> .main > .main
float left flex 1
width calc(100% - 74px) min-width 0
> header > header
display flex display flex

View File

@ -9,9 +9,18 @@
<span class="is-bot" v-if="note.user.isBot">%i18n:@bot%</span> <span class="is-bot" v-if="note.user.isBot">%i18n:@bot%</span>
<span class="is-cat" v-if="note.user.isCat">%i18n:@cat%</span> <span class="is-cat" v-if="note.user.isCat">%i18n:@cat%</span>
<span class="username"><mk-acct :user="note.user"/></span> <span class="username"><mk-acct :user="note.user"/></span>
<router-link class="time" :to="note | notePage"> <div class="info">
<mk-time :time="note.createdAt"/> <span class="mobile" v-if="note.viaMobile">%fa:mobile-alt%</span>
</router-link> <router-link class="created-at" :to="note | notePage">
<mk-time :time="note.createdAt"/>
</router-link>
<span class="visibility" v-if="note.visibility != 'public'">
<template v-if="note.visibility == 'home'">%fa:home%</template>
<template v-if="note.visibility == 'followers'">%fa:unlock%</template>
<template v-if="note.visibility == 'specified'">%fa:envelope%</template>
<template v-if="note.visibility == 'private'">%fa:lock%</template>
</span>
</div>
</header> </header>
<div class="body"> <div class="body">
<mk-sub-note-content class="text" :note="note"/> <mk-sub-note-content class="text" :note="note"/>
@ -30,14 +39,16 @@ export default Vue.extend({
<style lang="stylus" scoped> <style lang="stylus" scoped>
root(isDark) root(isDark)
display flex
margin 0 margin 0
padding 0 padding 0
font-size 0.9em font-size 10px
&:after @media (min-width 350px)
content "" font-size 12px
display block
clear both @media (min-width 500px)
font-size 14px
&.smart &.smart
> .main > .main
@ -47,24 +58,26 @@ root(isDark)
align-items center align-items center
> .avatar > .avatar
flex-shrink 0
display block display block
float left margin 0 10px 0 0
margin 0 12px 0 0 width 40px
width 48px height 40px
height 48px
border-radius 8px border-radius 8px
@media (max-width 500px) @media (min-width 350px)
margin 0 10px 0 0 margin 0 10px 0 0
width 44px width 44px
height 44px height 44px
> .main @media (min-width 500px)
float left margin 0 12px 0 0
width calc(100% - 60px) width 48px
height 48px
@media (max-width 500px) > .main
width calc(100% - 54px) flex 1
min-width 0
> header > header
display flex display flex
@ -97,7 +110,7 @@ root(isDark)
align-self center align-self center
margin 0 0.5em 0 0 margin 0 0.5em 0 0
padding 1px 6px padding 1px 6px
font-size 10px font-size 0.8em
color isDark ? #758188 : #aaa color isDark ? #758188 : #aaa
border solid 1px isDark ? #57616f : #ddd border solid 1px isDark ? #57616f : #ddd
border-radius 3px border-radius 3px
@ -112,9 +125,18 @@ root(isDark)
text-overflow ellipsis text-overflow ellipsis
color isDark ? #606984 : #d1d8da color isDark ? #606984 : #d1d8da
> .time > .info
margin-left auto margin-left auto
color isDark ? #606984 : #b2b8bb font-size 0.9em
> *
color isDark ? #606984 : #b2b8bb
> .mobile
margin-right 6px
> .visibility
margin-left 6px
> .body > .body

View File

@ -39,10 +39,17 @@ export default Vue.extend({
<style lang="stylus" scoped> <style lang="stylus" scoped>
root(isDark) root(isDark)
display flex
padding 16px padding 16px
font-size 0.9em font-size 10px
background isDark ? #21242d : #fcfcfc background isDark ? #21242d : #fcfcfc
@media (min-width 350px)
font-size 12px
@media (min-width 500px)
font-size 14px
@media (min-width 600px) @media (min-width 600px)
padding 24px 32px padding 24px 32px
@ -53,30 +60,27 @@ root(isDark)
> header > header
align-items center align-items center
&:after
content ""
display block
clear both
> .avatar > .avatar
flex-shrink 0
display block display block
float left margin 0 8px 0 0
margin 0 10px 0 0 width 38px
width 42px height 38px
height 42px
border-radius 8px border-radius 8px
@media (min-width 350px)
margin-right 10px
width 42px
height 42px
@media (min-width 500px) @media (min-width 500px)
margin-right 14px margin-right 14px
width 50px width 50px
height 50px height 50px
> .main > .main
float left flex 1
width calc(100% - 52px) min-width 0
@media (min-width 500px)
width calc(100% - 64px)
> header > header
display flex display flex
@ -112,7 +116,7 @@ root(isDark)
align-self center align-self center
margin 0 0.5em 0 0 margin 0 0.5em 0 0
padding 1px 5px padding 1px 5px
font-size 10px font-size 0.8em
color isDark ? #758188 : #aaa color isDark ? #758188 : #aaa
border solid 1px isDark ? #57616f : #ddd border solid 1px isDark ? #57616f : #ddd
border-radius 3px border-radius 3px

View File

@ -269,8 +269,6 @@ root(isDark)
&.smart &.smart
> article > article
> .main > .main
width 100%
> header > header
align-items center align-items center
margin-bottom 4px margin-bottom 4px
@ -328,27 +326,28 @@ root(isDark)
padding-top 8px padding-top 8px
> article > article
display flex
padding 16px 16px 9px padding 16px 16px 9px
@media (min-width 600px) @media (min-width 600px)
padding 32px 32px 22px padding 32px 32px 22px
&:after
content ""
display block
clear both
> .avatar > .avatar
flex-shrink 0
display block display block
float left
margin 0 10px 8px 0 margin 0 10px 8px 0
width 48px width 42px
height 48px height 42px
border-radius 6px border-radius 6px
//position -webkit-sticky //position -webkit-sticky
//position sticky //position sticky
//top 62px //top 62px
@media (min-width 350px)
width 48px
height 48px
border-radius 6px
@media (min-width 500px) @media (min-width 500px)
margin-right 16px margin-right 16px
width 58px width 58px
@ -356,11 +355,8 @@ root(isDark)
border-radius 8px border-radius 8px
> .main > .main
float left flex 1
width calc(100% - 58px) min-width 0
@media (min-width 500px)
width calc(100% - 74px)
> header > header
display flex display flex
@ -393,7 +389,7 @@ root(isDark)
align-self center align-self center
margin 0 0.5em 0 0 margin 0 0.5em 0 0
padding 1px 6px padding 1px 6px
font-size 12px font-size 0.8em
color isDark ? #758188 : #aaa color isDark ? #758188 : #aaa
border solid 1px isDark ? #57616f : #ddd border solid 1px isDark ? #57616f : #ddd
border-radius 3px border-radius 3px
@ -422,6 +418,8 @@ root(isDark)
margin-left 6px margin-left 6px
> .body > .body
@media (min-width 700px)
font-size 1.1em
> .cw > .cw
cursor default cursor default