mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-15 21:45:45 +01:00
[wip] darkmode
This commit is contained in:
parent
2145730409
commit
5ace37e3db
8 changed files with 106 additions and 77 deletions
src/client/app
common/views
desktop
|
@ -87,7 +87,7 @@ export default Vue.extend({
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mk-switch
|
root(isDark)
|
||||||
display flex
|
display flex
|
||||||
margin 12px 0
|
margin 12px 0
|
||||||
cursor pointer
|
cursor pointer
|
||||||
|
@ -121,11 +121,12 @@ export default Vue.extend({
|
||||||
&:hover
|
&:hover
|
||||||
> .label
|
> .label
|
||||||
> span
|
> span
|
||||||
color #2e3338
|
color isDark ? #fff : #2e3338
|
||||||
|
|
||||||
> .button
|
> .button
|
||||||
background #ced2da
|
$color = isDark ? #15181d : #ced2da
|
||||||
border-color #ced2da
|
background $color
|
||||||
|
border-color $color
|
||||||
|
|
||||||
> input
|
> input
|
||||||
position absolute
|
position absolute
|
||||||
|
@ -147,14 +148,16 @@ export default Vue.extend({
|
||||||
border-radius 14px
|
border-radius 14px
|
||||||
|
|
||||||
> .button
|
> .button
|
||||||
|
$color = isDark ? #1c1f25 : #dcdfe6
|
||||||
|
|
||||||
display inline-block
|
display inline-block
|
||||||
margin 0
|
margin 0
|
||||||
width 40px
|
width 40px
|
||||||
min-width 40px
|
min-width 40px
|
||||||
height 20px
|
height 20px
|
||||||
min-height 20px
|
min-height 20px
|
||||||
background #dcdfe6
|
background $color
|
||||||
border 1px solid #dcdfe6
|
border 1px solid $color
|
||||||
outline none
|
outline none
|
||||||
border-radius 10px
|
border-radius 10px
|
||||||
transition inherit
|
transition inherit
|
||||||
|
@ -179,12 +182,18 @@ export default Vue.extend({
|
||||||
> span
|
> span
|
||||||
display block
|
display block
|
||||||
line-height 20px
|
line-height 20px
|
||||||
color #4a535a
|
color isDark ? #c4ccd2 : #4a535a
|
||||||
transition inherit
|
transition inherit
|
||||||
|
|
||||||
> p
|
> p
|
||||||
margin 0
|
margin 0
|
||||||
//font-size 90%
|
//font-size 90%
|
||||||
color #9daab3
|
color isDark ? #78858e : #9daab3
|
||||||
|
|
||||||
|
.mk-switch[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-switch:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -109,10 +109,10 @@ export default define({
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mkw-calendar
|
root(isDark)
|
||||||
padding 16px 0
|
padding 16px 0
|
||||||
color #777
|
color isDark ? #c5ced6 :#777
|
||||||
background #fff
|
background isDark ? #282C37 : #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(0, 0, 0, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ export default define({
|
||||||
margin 0 0 2px 0
|
margin 0 0 2px 0
|
||||||
font-size 12px
|
font-size 12px
|
||||||
line-height 18px
|
line-height 18px
|
||||||
color #888
|
color isDark ? #7a8692 : #888
|
||||||
|
|
||||||
> b
|
> b
|
||||||
margin-left 2px
|
margin-left 2px
|
||||||
|
@ -179,7 +179,7 @@ export default define({
|
||||||
> .meter
|
> .meter
|
||||||
width 100%
|
width 100%
|
||||||
overflow hidden
|
overflow hidden
|
||||||
background #eee
|
background isDark ? #1c1f25 : #eee
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
|
|
||||||
> .val
|
> .val
|
||||||
|
@ -198,4 +198,10 @@ export default define({
|
||||||
> .meter > .val
|
> .meter > .val
|
||||||
background #41ddde
|
background #41ddde
|
||||||
|
|
||||||
|
.mkw-calendar[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mkw-calendar:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -65,6 +65,20 @@ button.ui
|
||||||
background $theme-color
|
background $theme-color
|
||||||
border-color $theme-color
|
border-color $theme-color
|
||||||
|
|
||||||
|
html[data-darkmode] button.ui
|
||||||
|
html[data-darkmode] .button.ui
|
||||||
|
color #fff
|
||||||
|
background linear-gradient(to bottom, #313543 0%, #282c37 100%)
|
||||||
|
border-color #1c2023
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background linear-gradient(to bottom, #2c2f3c 0%, #22262f 100%)
|
||||||
|
border-color #151a1d
|
||||||
|
|
||||||
|
&:active
|
||||||
|
background #22262f
|
||||||
|
border-color #151a1d
|
||||||
|
|
||||||
input:not([type]).ui
|
input:not([type]).ui
|
||||||
input[type='text'].ui
|
input[type='text'].ui
|
||||||
input[type='password'].ui
|
input[type='password'].ui
|
||||||
|
|
|
@ -133,9 +133,9 @@ export default Vue.extend({
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mk-calendar
|
root(isDark)
|
||||||
color #777
|
color isDark ? #c5ced6 : #777
|
||||||
background #fff
|
background isDark ? #282C37 : #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(0, 0, 0, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
|
@ -249,4 +249,10 @@ export default Vue.extend({
|
||||||
&:active > div
|
&:active > div
|
||||||
background darken($theme-color, 10%)
|
background darken($theme-color, 10%)
|
||||||
|
|
||||||
|
.mk-calendar[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-calendar:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -374,7 +374,7 @@ export default Vue.extend({
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mk-settings
|
root(isDark)
|
||||||
display flex
|
display flex
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
|
@ -385,13 +385,13 @@ export default Vue.extend({
|
||||||
height 100%
|
height 100%
|
||||||
padding 16px 0 0 0
|
padding 16px 0 0 0
|
||||||
overflow auto
|
overflow auto
|
||||||
border-right solid 1px #ddd
|
border-right solid 1px isDark ? #1c2023 : #ddd
|
||||||
|
|
||||||
> p
|
> p
|
||||||
display block
|
display block
|
||||||
padding 10px 16px
|
padding 10px 16px
|
||||||
margin 0
|
margin 0
|
||||||
color #666
|
color isDark ? #9aa2a7 : #666
|
||||||
cursor pointer
|
cursor pointer
|
||||||
user-select none
|
user-select none
|
||||||
transition margin-left 0.2s ease
|
transition margin-left 0.2s ease
|
||||||
|
@ -400,7 +400,7 @@ export default Vue.extend({
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color #555
|
color isDark ? #fff : #555
|
||||||
|
|
||||||
&.active
|
&.active
|
||||||
margin-left 8px
|
margin-left 8px
|
||||||
|
@ -414,14 +414,14 @@ export default Vue.extend({
|
||||||
|
|
||||||
> section
|
> section
|
||||||
margin 32px
|
margin 32px
|
||||||
color #4a535a
|
color isDark ? #c4ccd2 : #4a535a
|
||||||
|
|
||||||
> h1
|
> h1
|
||||||
margin 0 0 1em 0
|
margin 0 0 1em 0
|
||||||
padding 0 0 8px 0
|
padding 0 0 8px 0
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color #555
|
color isDark ? #e3e7ea : #555
|
||||||
border-bottom solid 1px #eee
|
border-bottom solid 1px isDark ? #1c2023 : #eee
|
||||||
|
|
||||||
&, >>> *
|
&, >>> *
|
||||||
.ui.button.block
|
.ui.button.block
|
||||||
|
@ -439,7 +439,13 @@ export default Vue.extend({
|
||||||
|
|
||||||
> .web
|
> .web
|
||||||
> .div
|
> .div
|
||||||
border-bottom solid 1px #eee
|
border-bottom solid 1px isDark ? #1c2023 : #eee
|
||||||
margin 16px 0
|
margin 16px 0
|
||||||
|
|
||||||
|
.mk-settings[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-settings:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -99,7 +99,7 @@ export default Vue.extend({
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.nav
|
root(isDark)
|
||||||
display inline-block
|
display inline-block
|
||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
|
@ -131,7 +131,7 @@ export default Vue.extend({
|
||||||
padding 0 24px
|
padding 0 24px
|
||||||
font-size 13px
|
font-size 13px
|
||||||
font-variant small-caps
|
font-variant small-caps
|
||||||
color #9eaba8
|
color isDark ? #b8c5ca : #9eaba8
|
||||||
text-decoration none
|
text-decoration none
|
||||||
transition none
|
transition none
|
||||||
cursor pointer
|
cursor pointer
|
||||||
|
@ -140,7 +140,7 @@ export default Vue.extend({
|
||||||
pointer-events none
|
pointer-events none
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color darken(#9eaba8, 20%)
|
color isDark ? #fff : darken(#9eaba8, 20%)
|
||||||
text-decoration none
|
text-decoration none
|
||||||
|
|
||||||
> [data-fa]:first-child
|
> [data-fa]:first-child
|
||||||
|
@ -164,4 +164,10 @@ export default Vue.extend({
|
||||||
@media (max-width 700px)
|
@media (max-width 700px)
|
||||||
padding 0 12px
|
padding 0 12px
|
||||||
|
|
||||||
|
.nav[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.nav:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,16 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="mkw-polls">
|
<div class="mkw-polls">
|
||||||
<template v-if="!props.compact">
|
<mk-widget-container :show-header="!props.compact">
|
||||||
<p class="title">%fa:chart-pie%%i18n:@title%</p>
|
<template slot="header">%fa:chart-pie%%i18n:@title%</template>
|
||||||
<button @click="fetch" title="%i18n:@refresh%">%fa:sync%</button>
|
<button slot="func" title="%i18n:@refresh%" @click="fetch">%fa:sync%</button>
|
||||||
</template>
|
|
||||||
<div class="poll" v-if="!fetching && poll != null">
|
<div class="mkw-polls--body" :data-darkmode="_darkmode_">
|
||||||
<p v-if="poll.text"><router-link to="poll | notePage">{{ poll.text }}</router-link></p>
|
<div class="poll" v-if="!fetching && poll != null">
|
||||||
<p v-if="!poll.text"><router-link to="poll | notePage">%fa:link%</router-link></p>
|
<p v-if="poll.text"><router-link to="poll | notePage">{{ poll.text }}</router-link></p>
|
||||||
<mk-poll :note="poll"/>
|
<p v-if="!poll.text"><router-link to="poll | notePage">%fa:link%</router-link></p>
|
||||||
</div>
|
<mk-poll :note="poll"/>
|
||||||
<p class="empty" v-if="!fetching && poll == null">%i18n:@nothing%</p>
|
</div>
|
||||||
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
<p class="empty" v-if="!fetching && poll == null">%i18n:@nothing%</p>
|
||||||
|
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
||||||
|
</div>
|
||||||
|
</mk-widget-container>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -60,40 +63,7 @@ export default define({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.mkw-polls
|
root(isDark)
|
||||||
background #fff
|
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
|
||||||
border-radius 6px
|
|
||||||
|
|
||||||
> .title
|
|
||||||
margin 0
|
|
||||||
padding 0 16px
|
|
||||||
line-height 42px
|
|
||||||
font-size 0.9em
|
|
||||||
font-weight bold
|
|
||||||
color #888
|
|
||||||
border-bottom solid 1px #eee
|
|
||||||
|
|
||||||
> [data-fa]
|
|
||||||
margin-right 4px
|
|
||||||
|
|
||||||
> button
|
|
||||||
position absolute
|
|
||||||
z-index 2
|
|
||||||
top 0
|
|
||||||
right 0
|
|
||||||
padding 0
|
|
||||||
width 42px
|
|
||||||
font-size 0.9em
|
|
||||||
line-height 42px
|
|
||||||
color #ccc
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
color #aaa
|
|
||||||
|
|
||||||
&:active
|
|
||||||
color #999
|
|
||||||
|
|
||||||
> .poll
|
> .poll
|
||||||
padding 16px
|
padding 16px
|
||||||
font-size 12px
|
font-size 12px
|
||||||
|
@ -120,4 +90,10 @@ export default define({
|
||||||
> [data-fa]
|
> [data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
|
|
||||||
|
.mkw-polls--body[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mkw-polls--body:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -42,9 +42,9 @@ export default define({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.mkw-profile
|
root(isDark)
|
||||||
overflow hidden
|
overflow hidden
|
||||||
background #fff
|
background isDark ? #282c37 : #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(0, 0, 0, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ export default define({
|
||||||
width 58px
|
width 58px
|
||||||
height 58px
|
height 58px
|
||||||
margin 0
|
margin 0
|
||||||
border solid 3px #fff
|
border solid 3px isDark ? #282c37 : #fff
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
vertical-align bottom
|
vertical-align bottom
|
||||||
cursor pointer
|
cursor pointer
|
||||||
|
@ -114,13 +114,19 @@ export default define({
|
||||||
margin 10px 0 0 84px
|
margin 10px 0 0 84px
|
||||||
line-height 16px
|
line-height 16px
|
||||||
font-weight bold
|
font-weight bold
|
||||||
color #555
|
color isDark ? #fff : #555
|
||||||
|
|
||||||
> .username
|
> .username
|
||||||
display block
|
display block
|
||||||
margin 4px 0 8px 84px
|
margin 4px 0 8px 84px
|
||||||
line-height 16px
|
line-height 16px
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
color #999
|
color isDark ? #606984 : #999
|
||||||
|
|
||||||
|
.mkw-profile[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mkw-profile:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue