summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-09-29 00:48:56 +0900
committerGitHub <noreply@github.com>2018-09-29 00:48:56 +0900
commit8b68c5da372108abdef2fd5fc15133c1f15ef200 (patch)
tree7e9a8bdd7d8842a67540ebe9f4e411db9d5d5095 /src
parentFix 'URL is not defined' in MFM (#2782) (diff)
parentwip (diff)
downloadsharkey-8b68c5da372108abdef2fd5fc15133c1f15ef200.tar.gz
sharkey-8b68c5da372108abdef2fd5fc15133c1f15ef200.tar.bz2
sharkey-8b68c5da372108abdef2fd5fc15133c1f15ef200.zip
Merge pull request #2781 from syuilo/theme
Theme
Diffstat (limited to 'src')
-rw-r--r--src/client/app/app.styl8
-rw-r--r--src/client/app/app.vue3
-rw-r--r--src/client/app/boot.js17
-rw-r--r--src/client/app/common/views/components/autocomplete.vue28
-rw-r--r--src/client/app/common/views/components/avatar.vue15
-rw-r--r--src/client/app/common/views/components/connect-failed.vue12
-rw-r--r--src/client/app/common/views/components/cw-button.vue14
-rw-r--r--src/client/app/common/views/components/forkit.vue6
-rw-r--r--src/client/app/common/views/components/games/reversi/reversi.game.vue30
-rw-r--r--src/client/app/common/views/components/games/reversi/reversi.index.vue40
-rw-r--r--src/client/app/common/views/components/games/reversi/reversi.room.vue51
-rw-r--r--src/client/app/common/views/components/games/reversi/reversi.vue14
-rw-r--r--src/client/app/common/views/components/google.vue20
-rw-r--r--src/client/app/common/views/components/index.ts4
-rw-r--r--src/client/app/common/views/components/instance.vue12
-rw-r--r--src/client/app/common/views/components/media-banner.vue9
-rw-r--r--src/client/app/common/views/components/menu.vue26
-rw-r--r--src/client/app/common/views/components/messaging-room.form.vue22
-rw-r--r--src/client/app/common/views/components/messaging-room.message.vue22
-rw-r--r--src/client/app/common/views/components/messaging-room.vue46
-rw-r--r--src/client/app/common/views/components/messaging.vue60
-rw-r--r--src/client/app/common/views/components/note-header.vue26
-rw-r--r--src/client/app/common/views/components/poll-editor.vue34
-rw-r--r--src/client/app/common/views/components/poll.vue19
-rw-r--r--src/client/app/common/views/components/reaction-picker.vue24
-rw-r--r--src/client/app/common/views/components/reactions-viewer.vue15
-rw-r--r--src/client/app/common/views/components/signin.vue2
-rw-r--r--src/client/app/common/views/components/signup.vue2
-rw-r--r--src/client/app/common/views/components/switch.vue199
-rw-r--r--src/client/app/common/views/components/tag-cloud.vue8
-rw-r--r--src/client/app/common/views/components/theme.vue179
-rw-r--r--src/client/app/common/views/components/trends.vue15
-rw-r--r--src/client/app/common/views/components/ui/button.vue112
-rw-r--r--src/client/app/common/views/components/ui/card.vue21
-rw-r--r--src/client/app/common/views/components/ui/form.vue2
-rw-r--r--src/client/app/common/views/components/ui/form/button.vue40
-rw-r--r--src/client/app/common/views/components/ui/form/radio.vue20
-rw-r--r--src/client/app/common/views/components/ui/input.vue30
-rw-r--r--src/client/app/common/views/components/ui/radio.vue16
-rw-r--r--src/client/app/common/views/components/ui/select.vue24
-rw-r--r--src/client/app/common/views/components/ui/switch.vue25
-rw-r--r--src/client/app/common/views/components/ui/textarea.vue28
-rw-r--r--src/client/app/common/views/components/uploader.vue30
-rw-r--r--src/client/app/common/views/components/url-preview.vue18
-rw-r--r--src/client/app/common/views/components/visibility-chooser.vue25
-rw-r--r--src/client/app/common/views/components/welcome-timeline.vue20
-rw-r--r--src/client/app/common/views/pages/follow.vue37
-rw-r--r--src/client/app/common/views/widgets/analog-clock.vue10
-rw-r--r--src/client/app/common/views/widgets/broadcast.vue15
-rw-r--r--src/client/app/common/views/widgets/calendar.vue19
-rw-r--r--src/client/app/common/views/widgets/donation.vue72
-rw-r--r--src/client/app/common/views/widgets/memo.vue24
-rw-r--r--src/client/app/common/views/widgets/nav.vue16
-rw-r--r--src/client/app/common/views/widgets/posts-monitor.vue12
-rw-r--r--src/client/app/common/views/widgets/rss.vue16
-rw-r--r--src/client/app/common/views/widgets/server.cpu-memory.vue10
-rw-r--r--src/client/app/common/views/widgets/server.cpu.vue10
-rw-r--r--src/client/app/common/views/widgets/server.disk.vue10
-rw-r--r--src/client/app/common/views/widgets/server.memory.vue10
-rw-r--r--src/client/app/common/views/widgets/server.pie.vue10
-rw-r--r--src/client/app/desktop/assets/header-icon.light.svg150
-rw-r--r--src/client/app/desktop/assets/header-icon.svg (renamed from src/client/app/desktop/assets/header-icon.dark.svg)8
-rw-r--r--src/client/app/desktop/script.ts2
-rw-r--r--src/client/app/desktop/style.styl29
-rw-r--r--src/client/app/desktop/ui.styl181
-rw-r--r--src/client/app/desktop/views/components/calendar.vue59
-rw-r--r--src/client/app/desktop/views/components/charts.vue4
-rw-r--r--src/client/app/desktop/views/components/choose-file-from-drive-window.vue32
-rw-r--r--src/client/app/desktop/views/components/choose-folder-from-drive-window.vue20
-rw-r--r--src/client/app/desktop/views/components/context-menu.menu.vue26
-rw-r--r--src/client/app/desktop/views/components/context-menu.vue10
-rw-r--r--src/client/app/desktop/views/components/crop-window.vue24
-rw-r--r--src/client/app/desktop/views/components/dialog.vue10
-rw-r--r--src/client/app/desktop/views/components/drive.file.vue22
-rw-r--r--src/client/app/desktop/views/components/drive.folder.vue22
-rw-r--r--src/client/app/desktop/views/components/drive.vue23
-rw-r--r--src/client/app/desktop/views/components/follow-button.vue37
-rw-r--r--src/client/app/desktop/views/components/home.vue24
-rw-r--r--src/client/app/desktop/views/components/input-dialog.vue30
-rw-r--r--src/client/app/desktop/views/components/note-detail.vue60
-rw-r--r--src/client/app/desktop/views/components/note-preview.vue12
-rw-r--r--src/client/app/desktop/views/components/notes.note.sub.vue14
-rw-r--r--src/client/app/desktop/views/components/notes.note.vue54
-rw-r--r--src/client/app/desktop/views/components/notes.vue26
-rw-r--r--src/client/app/desktop/views/components/notifications.vue22
-rw-r--r--src/client/app/desktop/views/components/post-form-window.vue11
-rw-r--r--src/client/app/desktop/views/components/post-form.vue92
-rw-r--r--src/client/app/desktop/views/components/progress-dialog.vue22
-rw-r--r--src/client/app/desktop/views/components/received-follow-requests-window.vue13
-rw-r--r--src/client/app/desktop/views/components/renote-form.vue19
-rw-r--r--src/client/app/desktop/views/components/settings.profile.vue19
-rw-r--r--src/client/app/desktop/views/components/settings.tags.vue9
-rw-r--r--src/client/app/desktop/views/components/settings.vue144
-rw-r--r--src/client/app/desktop/views/components/sub-note-content.vue2
-rw-r--r--src/client/app/desktop/views/components/timeline.core.vue2
-rw-r--r--src/client/app/desktop/views/components/timeline.vue37
-rw-r--r--src/client/app/desktop/views/components/ui-notification.vue14
-rw-r--r--src/client/app/desktop/views/components/ui.header.account.vue33
-rw-r--r--src/client/app/desktop/views/components/ui.header.nav.vue18
-rw-r--r--src/client/app/desktop/views/components/ui.header.notifications.vue22
-rw-r--r--src/client/app/desktop/views/components/ui.header.post.vue10
-rw-r--r--src/client/app/desktop/views/components/ui.header.search.vue21
-rw-r--r--src/client/app/desktop/views/components/ui.header.vue89
-rw-r--r--src/client/app/desktop/views/components/user-lists-window.vue13
-rw-r--r--src/client/app/desktop/views/components/user-preview.vue27
-rw-r--r--src/client/app/desktop/views/components/users-list.vue6
-rw-r--r--src/client/app/desktop/views/components/widget-container.vue36
-rw-r--r--src/client/app/desktop/views/components/window.vue38
-rw-r--r--src/client/app/desktop/views/pages/admin/admin.announcements.vue2
-rw-r--r--src/client/app/desktop/views/pages/admin/admin.cpu-memory.vue10
-rw-r--r--src/client/app/desktop/views/pages/admin/admin.dashboard.vue4
-rw-r--r--src/client/app/desktop/views/pages/admin/admin.hashtags.vue2
-rw-r--r--src/client/app/desktop/views/pages/admin/admin.suspend-user.vue2
-rw-r--r--src/client/app/desktop/views/pages/admin/admin.unsuspend-user.vue2
-rw-r--r--src/client/app/desktop/views/pages/admin/admin.unverify-user.vue2
-rw-r--r--src/client/app/desktop/views/pages/admin/admin.verify-user.vue2
-rw-r--r--src/client/app/desktop/views/pages/admin/admin.vue4
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.column.vue35
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.note.sub.vue12
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.note.vue63
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.notes.vue24
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.notification.vue14
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.notifications.vue17
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.tl-column.vue4
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.vue18
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.widgets-column.vue13
-rw-r--r--src/client/app/desktop/views/pages/selectdrive.vue32
-rw-r--r--src/client/app/desktop/views/pages/stats/stats.vue4
-rw-r--r--src/client/app/desktop/views/pages/user-list.users.vue125
-rw-r--r--src/client/app/desktop/views/pages/user-list.vue71
-rw-r--r--src/client/app/desktop/views/pages/user/user.followers-you-know.vue12
-rw-r--r--src/client/app/desktop/views/pages/user/user.friends.vue21
-rw-r--r--src/client/app/desktop/views/pages/user/user.header.vue22
-rw-r--r--src/client/app/desktop/views/pages/user/user.photos.vue14
-rw-r--r--src/client/app/desktop/views/pages/user/user.profile.vue14
-rw-r--r--src/client/app/desktop/views/pages/user/user.timeline.vue24
-rw-r--r--src/client/app/desktop/views/pages/user/user.vue26
-rw-r--r--src/client/app/desktop/views/pages/welcome.vue79
-rw-r--r--src/client/app/desktop/views/widgets/polls.vue12
-rw-r--r--src/client/app/desktop/views/widgets/post-form.vue10
-rw-r--r--src/client/app/desktop/views/widgets/profile.vue19
-rw-r--r--src/client/app/desktop/views/widgets/trends.vue8
-rw-r--r--src/client/app/desktop/views/widgets/users.vue15
-rw-r--r--src/client/app/init.css6
-rw-r--r--src/client/app/init.ts60
-rw-r--r--src/client/app/mobile/style.styl10
-rw-r--r--src/client/app/mobile/views/components/dialog.vue10
-rw-r--r--src/client/app/mobile/views/components/drive-file-chooser.vue14
-rw-r--r--src/client/app/mobile/views/components/drive.file-detail.vue42
-rw-r--r--src/client/app/mobile/views/components/drive.file.vue21
-rw-r--r--src/client/app/mobile/views/components/drive.folder.vue10
-rw-r--r--src/client/app/mobile/views/components/drive.vue22
-rw-r--r--src/client/app/mobile/views/components/follow-button.vue22
-rw-r--r--src/client/app/mobile/views/components/mute-button.vue24
-rw-r--r--src/client/app/mobile/views/components/note-card.vue15
-rw-r--r--src/client/app/mobile/views/components/note-detail.vue50
-rw-r--r--src/client/app/mobile/views/components/note-preview.vue12
-rw-r--r--src/client/app/mobile/views/components/note.sub.vue14
-rw-r--r--src/client/app/mobile/views/components/note.vue42
-rw-r--r--src/client/app/mobile/views/components/notes.vue20
-rw-r--r--src/client/app/mobile/views/components/notification.vue14
-rw-r--r--src/client/app/mobile/views/components/notifications.vue18
-rw-r--r--src/client/app/mobile/views/components/post-form.vue30
-rw-r--r--src/client/app/mobile/views/components/sub-note-content.vue2
-rw-r--r--src/client/app/mobile/views/components/ui.header.vue79
-rw-r--r--src/client/app/mobile/views/components/ui.nav.vue28
-rw-r--r--src/client/app/mobile/views/components/users-list.vue6
-rw-r--r--src/client/app/mobile/views/components/widget-container.vue17
-rw-r--r--src/client/app/mobile/views/pages/favorites.vue2
-rw-r--r--src/client/app/mobile/views/pages/home.vue32
-rw-r--r--src/client/app/mobile/views/pages/notifications.vue2
-rw-r--r--src/client/app/mobile/views/pages/received-follow-requests.vue4
-rw-r--r--src/client/app/mobile/views/pages/settings.vue28
-rw-r--r--src/client/app/mobile/views/pages/user-list.vue2
-rw-r--r--src/client/app/mobile/views/pages/user-lists.vue2
-rw-r--r--src/client/app/mobile/views/pages/user.vue40
-rw-r--r--src/client/app/mobile/views/pages/user/home.vue16
-rw-r--r--src/client/app/mobile/views/pages/welcome.vue40
-rw-r--r--src/client/app/store.ts4
-rw-r--r--src/client/app/theme.ts102
-rw-r--r--src/client/assets/title.light.svg140
-rw-r--r--src/client/assets/title.svg (renamed from src/client/assets/title.dark.svg)16
-rw-r--r--src/client/const.styl4
-rw-r--r--src/client/style.styl14
-rw-r--r--src/client/theme/dark.json204
-rw-r--r--src/client/theme/halloween.json17
-rw-r--r--src/client/theme/light.json204
-rw-r--r--src/client/theme/pink.json17
188 files changed, 2114 insertions, 3364 deletions
diff --git a/src/client/app/app.styl b/src/client/app/app.styl
index 3911f83a61..2f0095944c 100644
--- a/src/client/app/app.styl
+++ b/src/client/app/app.styl
@@ -27,7 +27,7 @@ body
z-index 65536
.bar
- background $theme-color
+ background var(--primary)
position fixed
z-index 65537
@@ -44,7 +44,7 @@ body
right 0px
width 100px
height 100%
- box-shadow 0 0 10px $theme-color, 0 0 5px $theme-color
+ box-shadow 0 0 10px var(--primary), 0 0 5px var(--primary)
opacity 1
transform rotate(3deg) translate(0px, -4px)
@@ -64,8 +64,8 @@ body
box-sizing border-box
border solid 2px transparent
- border-top-color $theme-color
- border-left-color $theme-color
+ border-top-color var(--primary)
+ border-left-color var(--primary)
border-radius 50%
animation progress-spinner 400ms linear infinite
diff --git a/src/client/app/app.vue b/src/client/app/app.vue
index e639c9f9ac..778e9f29cf 100644
--- a/src/client/app/app.vue
+++ b/src/client/app/app.vue
@@ -5,6 +5,9 @@
<script lang="ts">
import Vue from 'vue';
import { url, lang } from './config';
+import applyTheme from './common/scripts/theme';
+const darkTheme = require('../theme/dark');
+const halloweenTheme = require('../theme/halloween');
export default Vue.extend({
computed: {
diff --git a/src/client/app/boot.js b/src/client/app/boot.js
index 25aa26dd19..e122e0423a 100644
--- a/src/client/app/boot.js
+++ b/src/client/app/boot.js
@@ -20,6 +20,16 @@
const langs = LANGS;
+ //#region Apply theme
+ const theme = localStorage.getItem('theme');
+ if (theme) {
+ Object.entries(JSON.parse(theme)).forEach(([k, v]) => {
+ if (k == 'meta') return;
+ document.documentElement.style.setProperty(`--${k}`, v.toString());
+ });
+ }
+ //#endregion
+
//#region Load settings
let settings = null;
const vuex = localStorage.getItem('vuex');
@@ -84,13 +94,6 @@
app = isMobile ? 'mobile' : 'desktop';
}
- // Dark/Light
- if (settings) {
- if (settings.device.darkmode) {
- document.documentElement.setAttribute('data-darkmode', 'true');
- }
- }
-
// Script version
const ver = localStorage.getItem('v') || VERSION;
diff --git a/src/client/app/common/views/components/autocomplete.vue b/src/client/app/common/views/components/autocomplete.vue
index ea05afd6dc..bc0120c9ab 100644
--- a/src/client/app/common/views/components/autocomplete.vue
+++ b/src/client/app/common/views/components/autocomplete.vue
@@ -259,15 +259,13 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-autocomplete
position fixed
z-index 65535
max-width 100%
margin-top calc(1em + 8px)
overflow hidden
- background isDark ? #313543 : #fff
+ background var(--faceHeader)
border solid 1px rgba(#000, 0.1)
border-radius 4px
transition top 0.1s ease, left 0.1s ease
@@ -299,16 +297,16 @@ root(isDark)
text-overflow ellipsis
&:hover
- background isDark ? rgba(#fff, 0.1) : rgba(#000, 0.1)
+ background var(--autocompleteItemHoverBg)
&[data-selected='true']
- background $theme-color
+ background var(--primary)
&, *
color #fff !important
&:active
- background darken($theme-color, 10%)
+ background var(--primaryDarken10)
&, *
color #fff !important
@@ -325,15 +323,15 @@ root(isDark)
.name
margin 0 8px 0 0
- color isDark ? rgba(#fff, 0.8) : rgba(#000, 0.8)
+ color var(--autocompleteItemText)
.username
- color isDark ? rgba(#fff, 0.3) : rgba(#000, 0.3)
+ color var(--autocompleteItemTextSub)
> .hashtags > li
.name
- color isDark ? rgba(#fff, 0.8) : rgba(#000, 0.8)
+ color var(--autocompleteItemText)
> .emojis > li
@@ -343,15 +341,9 @@ root(isDark)
width 24px
.name
- color isDark ? rgba(#fff, 0.8) : rgba(#000, 0.8)
+ color var(--autocompleteItemText)
.alias
margin 0 0 0 8px
- color isDark ? rgba(#fff, 0.3) : rgba(#000, 0.3)
-
-.mk-autocomplete[data-darkmode]
- root(true)
-
-.mk-autocomplete:not([data-darkmode])
- root(false)
+ color var(--autocompleteItemTextSub)
</style>
diff --git a/src/client/app/common/views/components/avatar.vue b/src/client/app/common/views/components/avatar.vue
index a2b0fc6bd3..ac018abcfc 100644
--- a/src/client/app/common/views/components/avatar.vue
+++ b/src/client/app/common/views/components/avatar.vue
@@ -58,6 +58,11 @@ export default Vue.extend({
};
}
},
+ mounted() {
+ if (this.user.avatarColor) {
+ this.$el.style.color = `rgb(${this.user.avatarColor.slice(0, 3).join(',')})`;
+ }
+ },
methods: {
onClick(e) {
this.$emit('click', e);
@@ -67,8 +72,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-
-root(isDark)
+.mk-avatar
display inline-block
vertical-align bottom
@@ -79,7 +83,7 @@ root(isDark)
&.cat::before,
&.cat::after
background #df548f
- border solid 4px isDark ? #e0eefd : #202224
+ border solid 4px currentColor
box-sizing border-box
content ''
display inline-block
@@ -105,9 +109,4 @@ root(isDark)
transition border-radius 1s ease
z-index 1
-.mk-avatar[data-darkmode]
- root(true)
-
-.mk-avatar:not([data-darkmode])
- root(false)
</style>
diff --git a/src/client/app/common/views/components/connect-failed.vue b/src/client/app/common/views/components/connect-failed.vue
index 0f686926b0..36cae05665 100644
--- a/src/client/app/common/views/components/connect-failed.vue
+++ b/src/client/app/common/views/components/connect-failed.vue
@@ -39,7 +39,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.mk-connect-failed
width 100%
@@ -70,17 +70,17 @@ export default Vue.extend({
display block
margin 1em auto 0 auto
padding 8px 10px
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
&:focus
- outline solid 3px rgba($theme-color, 0.3)
+ outline solid 3px var(--primaryAlpha03)
&:hover
- background lighten($theme-color, 10%)
+ background var(--primaryLighten10)
&:active
- background darken($theme-color, 10%)
+ background var(--primaryDarken10)
> .thanks
display block
diff --git a/src/client/app/common/views/components/cw-button.vue b/src/client/app/common/views/components/cw-button.vue
index 06087edc93..79917f82ab 100644
--- a/src/client/app/common/views/components/cw-button.vue
+++ b/src/client/app/common/views/components/cw-button.vue
@@ -22,23 +22,17 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.nrvgflfuaxwgkxoynpnumyookecqrrvh
display inline-block
padding 4px 8px
font-size 0.7em
- color isDark ? #393f4f : #fff
- background isDark ? #687390 : #b1b9c1
+ color var(--cwButtonFg)
+ background var(--cwButtonBg)
border-radius 2px
cursor pointer
user-select none
&:hover
- background isDark ? #707b97 : #bbc4ce
-
-.nrvgflfuaxwgkxoynpnumyookecqrrvh[data-darkmode]
- root(true)
-
-.nrvgflfuaxwgkxoynpnumyookecqrrvh:not([data-darkmode])
- root(false)
+ background var(--cwButtonHoverBg)
</style>
diff --git a/src/client/app/common/views/components/forkit.vue b/src/client/app/common/views/components/forkit.vue
index de627181ef..b303b48b79 100644
--- a/src/client/app/common/views/components/forkit.vue
+++ b/src/client/app/common/views/components/forkit.vue
@@ -9,7 +9,7 @@
</template>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.a
display block
@@ -18,8 +18,8 @@
display block
//fill #151513
//color #fff
- fill $theme-color
- color $theme-color-foreground
+ fill var(--primary)
+ color var(--primaryForeground)
.octo-arm
transform-origin 130px 106px
diff --git a/src/client/app/common/views/components/games/reversi/reversi.game.vue b/src/client/app/common/views/components/games/reversi/reversi.game.vue
index fea19d917e..751abe2ecd 100644
--- a/src/client/app/common/views/components/games/reversi/reversi.game.vue
+++ b/src/client/app/common/views/components/games/reversi/reversi.game.vue
@@ -304,9 +304,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.xqnhankfuuilcwvhgsopeqncafzsquya
text-align center
> .go-index
@@ -319,7 +317,7 @@ root(isDark)
> header
padding 8px
- border-bottom dashed 1px isDark ? #4c5761 : #c4cdd4
+ border-bottom dashed 1px var(--reversiGameHeaderLine)
a
color inherit
@@ -386,30 +384,30 @@ root(isDark)
user-select none
&.empty
- border solid 2px isDark ? #51595f : #eee
+ border solid 2px var(--reversiGameEmptyCell)
&.empty.can
- background isDark ? #51595f : #eee
+ background var(--reversiGameEmptyCell)
&.empty.myTurn
- border-color isDark ? #6a767f : #ddd
+ border-color var(--reversiGameEmptyCellMyTurn)
&.can
- background isDark ? #51595f : #eee
+ background var(--reversiGameEmptyCellCanPut)
cursor pointer
&:hover
- border-color darken($theme-color, 10%)
- background $theme-color
+ border-color var(--primaryDarken10)
+ background var(--primary)
&:active
- background darken($theme-color, 10%)
+ background var(--primaryDarken10)
&.prev
- box-shadow 0 0 0 4px rgba($theme-color, 0.7)
+ box-shadow 0 0 0 4px var(--primaryAlpha07)
&.isEnded
- border-color isDark ? #6a767f : #ddd
+ border-color var(--reversiGameEmptyCellMyTurn)
&.none
border-color transparent !important
@@ -458,10 +456,4 @@ root(isDark)
margin 0 8px
min-width 70px
-.xqnhankfuuilcwvhgsopeqncafzsquya[data-darkmode]
- root(true)
-
-.xqnhankfuuilcwvhgsopeqncafzsquya:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/games/reversi/reversi.index.vue b/src/client/app/common/views/components/games/reversi/reversi.index.vue
index d23902aae7..3725aa6cb4 100644
--- a/src/client/app/common/views/components/games/reversi/reversi.index.vue
+++ b/src/client/app/common/views/components/games/reversi/reversi.index.vue
@@ -138,9 +138,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.phgnkghfpyvkrvwiajkiuoxyrdaqpzcx
> h1
margin 0
padding 24px
@@ -148,7 +146,7 @@ root(isDark)
text-align center
font-weight normal
color #fff
- background linear-gradient(to bottom, isDark ? #45730e : #8bca3e, isDark ? #464300 : #d6cf31)
+ background linear-gradient(to bottom, var(--reversiBannerGradientStart), var(--reversiBannerGradientEnd))
& + p
margin 0
@@ -156,7 +154,7 @@ root(isDark)
margin-bottom 12px
text-align center
font-size 14px
- border-bottom solid 1px isDark ? #535f65 : #d3d9dc
+ border-bottom solid 1px var(--faceDivider)
> .play
margin 0 auto
@@ -171,14 +169,14 @@ root(isDark)
padding 16px
font-size 14px
text-align left
- background isDark ? #282c37 : #f5f5f5
+ background var(--reversiDescBg)
border-radius 8px
> section
margin 0 auto
padding 0 16px 16px 16px
max-width 500px
- border-top solid 1px isDark ? #535f65 : #d3d9dc
+ border-top solid 1px var(--faceDivider)
> h2
margin 0
@@ -189,9 +187,9 @@ root(isDark)
.invitation
margin 8px 0
padding 8px
- color isDark ? #fff : #677f84
- background isDark ? #282c37 : #fff
- box-shadow 0 2px 16px rgba(#000, isDark ? 0.7 : 0.15)
+ color var(--text)
+ background var(--face)
+ box-shadow 0 2px 16px var(--reversiListItemShadow)
border-radius 6px
cursor pointer
@@ -200,13 +198,13 @@ root(isDark)
user-select none
&:focus
- border-color $theme-color
+ border-color var(--primary)
&:hover
- background isDark ? #313543 : #f5f5f5
+ box-shadow 0 0 0 100px inset rgba(0, 0, 0, 0.05)
&:active
- background isDark ? #1e222b : #eee
+ box-shadow 0 0 0 100px inset rgba(0, 0, 0, 0.1)
> .avatar
width 32px
@@ -221,9 +219,9 @@ root(isDark)
display block
margin 8px 0
padding 8px
- color isDark ? #fff : #677f84
- background isDark ? #282c37 : #fff
- box-shadow 0 2px 16px rgba(#000, isDark ? 0.7 : 0.15)
+ color var(--text)
+ background var(--face)
+ box-shadow 0 2px 16px var(--reversiListItemShadow)
border-radius 6px
cursor pointer
@@ -232,10 +230,10 @@ root(isDark)
user-select none
&:hover
- background isDark ? #313543 : #f5f5f5
+ box-shadow 0 0 0 100px inset rgba(0, 0, 0, 0.05)
&:active
- background isDark ? #1e222b : #eee
+ box-shadow 0 0 0 100px inset rgba(0, 0, 0, 0.1)
> .avatar
width 32px
@@ -246,10 +244,4 @@ root(isDark)
margin 0 8px
line-height 32px
-.phgnkghfpyvkrvwiajkiuoxyrdaqpzcx[data-darkmode]
- root(true)
-
-.phgnkghfpyvkrvwiajkiuoxyrdaqpzcx:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/games/reversi/reversi.room.vue b/src/client/app/common/views/components/games/reversi/reversi.room.vue
index fef833d63e..9f0d9c23fb 100644
--- a/src/client/app/common/views/components/games/reversi/reversi.room.vue
+++ b/src/client/app/common/views/components/games/reversi/reversi.room.vue
@@ -47,9 +47,9 @@
</header>
<div>
- <mk-switch v-model="game.settings.isLlotheo" @change="updateSettings" text="%i18n:@is-llotheo%"/>
- <mk-switch v-model="game.settings.loopedBoard" @change="updateSettings" text="%i18n:@looped-map%"/>
- <mk-switch v-model="game.settings.canPutEverywhere" @change="updateSettings" text="%i18n:@can-put-everywhere%"/>
+ <ui-switch v-model="game.settings.isLlotheo" @change="updateSettings">%i18n:@is-llotheo%</ui-switch>
+ <ui-switch v-model="game.settings.loopedBoard" @change="updateSettings">%i18n:@looped-map%</ui-switch>
+ <ui-switch v-model="game.settings.canPutEverywhere" @change="updateSettings">%i18n:@can-put-everywhere%</ui-switch>
</div>
</div>
@@ -60,7 +60,7 @@
<div>
<template v-for="item in form">
- <mk-switch v-if="item.type == 'switch'" v-model="item.value" :key="item.id" :text="item.label" @change="onChangeForm(item)">{{ item.desc || '' }}</mk-switch>
+ <ui-switch v-if="item.type == 'switch'" v-model="item.value" :key="item.id" :text="item.label" @change="onChangeForm(item)">{{ item.desc || '' }}</ui-switch>
<div class="card" v-if="item.type == 'radio'" :key="item.id">
<header>
@@ -252,11 +252,9 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.urbixznjwwuukfsckrwzwsqzsxornqij
text-align center
- background isDark ? #191b22 : #f9f9f9
+ background var(--bg)
> header
padding 8px
@@ -273,10 +271,10 @@ root(isDark)
> select
width 100%
padding 12px 14px
- background isDark ? #282C37 : #fff
- border 1px solid isDark ? #6a707d : #dcdfe6
+ background var(--face)
+ border 1px solid var(--reversiMapSelectBorder)
border-radius 4px
- color isDark ? #fff : #606266
+ color var(--text)
cursor pointer
transition border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)
-webkit-appearance none
@@ -284,17 +282,18 @@ root(isDark)
appearance none
&:hover
- border-color isDark ? #a7aebd : #c0c4cc
+ border-color var(--reversiMapSelectHoverBorder)
&:focus
&:active
- border-color $theme-color
+ border-color var(--primary)
> div
> .random
padding 32px 0
font-size 64px
- color isDark ? #4e5961 : #d8d8d8
+ color var(--text)
+ opacity 0.7
> .board
display grid
@@ -302,11 +301,11 @@ root(isDark)
width 300px
height 300px
margin 0 auto
- color isDark ? #fff : #444
+ color var(--text)
> div
background transparent
- border solid 2px isDark ? #6a767f : #ddd
+ border solid 2px var(--faceDivider)
border-radius 6px
overflow hidden
cursor pointer
@@ -331,32 +330,26 @@ root(isDark)
.card
max-width 400px
border-radius 4px
- background isDark ? #282C37 : #fff
- color isDark ? #fff : #303133
- box-shadow 0 2px 12px 0 rgba(#000, isDark ? 0.7 : 0.1)
+ background var(--face)
+ color var(--text)
+ box-shadow 0 2px 12px 0 var(--reversiRoomFormShadow)
> header
padding 18px 20px
- border-bottom 1px solid isDark ? #1c2023 : #ebeef5
+ border-bottom 1px solid var(--faceDivider)
> div
padding 20px
- color isDark ? #fff : #606266
+ color var(--text)
> footer
position sticky
bottom 0
padding 16px
- background rgba(isDark ? #191b22 : #fff, 0.9)
- border-top solid 1px isDark ? #606266 : #c4cdd4
+ background var(--reversiRoomFooterBg)
+ border-top solid 1px var(--faceDivider)
> .status
margin 0 0 16px 0
-.urbixznjwwuukfsckrwzwsqzsxornqij[data-darkmode]
- root(true)
-
-.urbixznjwwuukfsckrwzwsqzsxornqij:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/games/reversi/reversi.vue b/src/client/app/common/views/components/games/reversi/reversi.vue
index 223ec4597a..6eb9511ce9 100644
--- a/src/client/app/common/views/components/games/reversi/reversi.vue
+++ b/src/client/app/common/views/components/games/reversi/reversi.vue
@@ -156,11 +156,9 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
- color isDark ? #fff : #677f84
- background isDark ? #191b22 : #fff
+.vchtoekanapleubgzioubdtmlkribzfd
+ color var(--text)
+ background var(--bg)
> .matching
> h1
@@ -177,10 +175,4 @@ root(isDark)
text-align center
border-top dashed 1px #c4cdd4
-.vchtoekanapleubgzioubdtmlkribzfd[data-darkmode]
- root(true)
-
-.vchtoekanapleubgzioubdtmlkribzfd:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/google.vue b/src/client/app/common/views/components/google.vue
index 8272961ef2..ac71a5e56d 100644
--- a/src/client/app/common/views/components/google.vue
+++ b/src/client/app/common/views/components/google.vue
@@ -26,7 +26,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.mk-google
display flex
margin 8px 0
@@ -37,31 +37,25 @@ root(isDark)
height 40px
font-family sans-serif
font-size 16px
- color isDark ? #dee4e8 : #55595c
- background isDark ? #191b22 : #fff
- border solid 1px isDark ? #495156 : #dadada
+ color var(--googleSearchFg)
+ background var(--googleSearchBg)
+ border solid 1px var(--googleSearchBorder)
border-radius 4px 0 0 4px
&:hover
- border-color isDark ? #777c86 : #b0b0b0
+ border-color var(--googleSearchHoverBorder)
> button
flex-shrink 0
padding 0 16px
- border solid 1px isDark ? #495156 : #dadada
+ border solid 1px var(--googleSearchBorder)
border-left none
border-radius 0 4px 4px 0
&:hover
- background-color isDark ? #2e3440 : #eee
+ background-color var(--googleSearchHoverButton)
&:active
box-shadow 0 2px 4px rgba(#000, 0.15) inset
-.mk-google[data-darkmode]
- root(true)
-
-.mk-google:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/index.ts b/src/client/app/common/views/components/index.ts
index 0a3d0d0ae6..0dea38a7a1 100644
--- a/src/client/app/common/views/components/index.ts
+++ b/src/client/app/common/views/components/index.ts
@@ -1,5 +1,6 @@
import Vue from 'vue';
+import theme from './theme.vue';
import instance from './instance.vue';
import cwButton from './cw-button.vue';
import tagCloud from './tag-cloud.vue';
@@ -30,7 +31,6 @@ import messagingRoom from './messaging-room.vue';
import urlPreview from './url-preview.vue';
import twitterSetting from './twitter-setting.vue';
import fileTypeIcon from './file-type-icon.vue';
-import Switch from './switch.vue';
import Reversi from './games/reversi/reversi.vue';
import welcomeTimeline from './welcome-timeline.vue';
import uiInput from './ui/input.vue';
@@ -44,6 +44,7 @@ import uiSelect from './ui/select.vue';
import formButton from './ui/form/button.vue';
import formRadio from './ui/form/radio.vue';
+Vue.component('mk-theme', theme);
Vue.component('mk-instance', instance);
Vue.component('mk-cw-button', cwButton);
Vue.component('mk-tag-cloud', tagCloud);
@@ -74,7 +75,6 @@ Vue.component('mk-messaging-room', messagingRoom);
Vue.component('mk-url-preview', urlPreview);
Vue.component('mk-twitter-setting', twitterSetting);
Vue.component('mk-file-type-icon', fileTypeIcon);
-Vue.component('mk-switch', Switch);
Vue.component('mk-reversi', Reversi);
Vue.component('mk-welcome-timeline', welcomeTimeline);
Vue.component('ui-input', uiInput);
diff --git a/src/client/app/common/views/components/instance.vue b/src/client/app/common/views/components/instance.vue
index 14c6664eff..c3935cce0e 100644
--- a/src/client/app/common/views/components/instance.vue
+++ b/src/client/app/common/views/components/instance.vue
@@ -26,9 +26,9 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
- color isDark ? #fff : #5b646f
- background isDark ? #21242f : #fff
+.nhasjydimbopojusarffqjyktglcuxjy
+ color var(--text)
+ background var(--face)
text-align center
> .banner
@@ -48,10 +48,4 @@ root(isDark)
display block
padding-bottom 16px
-.nhasjydimbopojusarffqjyktglcuxjy[data-darkmode]
- root(true)
-
-.nhasjydimbopojusarffqjyktglcuxjy:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/media-banner.vue b/src/client/app/common/views/components/media-banner.vue
index 211dbf0208..0f5981d3c4 100644
--- a/src/client/app/common/views/components/media-banner.vue
+++ b/src/client/app/common/views/components/media-banner.vue
@@ -43,7 +43,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.mk-media-banner
width 100%
border-radius 4px
margin-top 4px
@@ -71,7 +71,7 @@ root(isDark)
font-size 1.6em
> .download
- background isDark ? #21242d : #f7f7f7
+ background var(--noteAttachedFile)
> .sensitive
background #111
@@ -82,9 +82,4 @@ root(isDark)
display block
width 100%
-.mk-media-banner[data-darkmode]
- root(true)
-
-.mk-media-banner:not([data-darkmode])
- root(false)
</style>
diff --git a/src/client/app/common/views/components/menu.vue b/src/client/app/common/views/components/menu.vue
index ad5ec619ba..be2c03f54c 100644
--- a/src/client/app/common/views/components/menu.vue
+++ b/src/client/app/common/views/components/menu.vue
@@ -117,10 +117,8 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
- $bg-color = isDark ? #2c303c : #fff
+.onchrpzrvnoruiaenfcqvccjfuupzzwv
+ $bg-color = var(--popupBg)
$border-color = rgba(27, 31, 35, 0.15)
position initial
@@ -132,7 +130,7 @@ root(isDark)
z-index 10000
width 100%
height 100%
- background rgba(#000, isDark ? 0.5 : 0.1)
+ background var(--modalBackdrop)
opacity 0
> .popover
@@ -179,26 +177,20 @@ root(isDark)
display block
padding 8px 16px
width 100%
- color isDark ? #d6dce2 : #111
+ color var(--popupFg)
&:hover
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
text-decoration none
&:active
- color $theme-color-foreground
- background darken($theme-color, 10%)
+ color var(--primaryForeground)
+ background var(--primaryDarken10)
> div
margin 8px 0
height 1px
- background isDark ? #1c2023 : #eee
-
-.onchrpzrvnoruiaenfcqvccjfuupzzwv[data-darkmode]
- root(true)
-
-.onchrpzrvnoruiaenfcqvccjfuupzzwv:not([data-darkmode])
- root(false)
+ background var(--faceDivider)
</style>
diff --git a/src/client/app/common/views/components/messaging-room.form.vue b/src/client/app/common/views/components/messaging-room.form.vue
index f183749fad..c93fd7f78d 100644
--- a/src/client/app/common/views/components/messaging-room.form.vue
+++ b/src/client/app/common/views/components/messaging-room.form.vue
@@ -195,9 +195,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-messaging-form
> textarea
cursor auto
display block
@@ -209,10 +207,10 @@ root(isDark)
padding 8px
resize none
font-size 1em
- color isDark ? #fff : #000
+ color var(--inputText)
outline none
border none
- border-top solid 1px isDark ? #4b5056 : #eee
+ border-top solid 1px var(--faceDivider)
border-radius 0
box-shadow none
background transparent
@@ -234,10 +232,10 @@ root(isDark)
transition color 0.1s ease
&:hover
- color $theme-color
+ color var(--primary)
&:active
- color darken($theme-color, 10%)
+ color var(--primaryDarken10)
transition color 0s ease
.files
@@ -293,19 +291,13 @@ root(isDark)
transition color 0.1s ease
&:hover
- color $theme-color
+ color var(--primary)
&:active
- color darken($theme-color, 10%)
+ color var(--primaryDarken10)
transition color 0s ease
input[type=file]
display none
-.mk-messaging-form[data-darkmode]
- root(true)
-
-.mk-messaging-form:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/messaging-room.message.vue b/src/client/app/common/views/components/messaging-room.message.vue
index 648d0eee18..77bf55c52c 100644
--- a/src/client/app/common/views/components/messaging-room.message.vue
+++ b/src/client/app/common/views/components/messaging-room.message.vue
@@ -59,10 +59,8 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
- $me-balloon-color = $theme-color
+.message
+ $me-balloon-color = var(--primary)
padding 10px 12px 10px 12px
background-color transparent
@@ -179,7 +177,7 @@ root(isDark)
display block
margin 2px 0 0 0
font-size 10px
- color isDark ? rgba(#fff, 0.4) : rgba(#000, 0.4)
+ color var(--messagingRoomMessageInfo)
> [data-fa]
margin-left 4px
@@ -192,7 +190,7 @@ root(isDark)
padding-left 66px
> .balloon
- $color = isDark ? #2d3338 : #eee
+ $color = var(--messagingRoomMessageBg)
float left
background $color
@@ -208,8 +206,7 @@ root(isDark)
> .content
> .text
- if isDark
- color #fff
+ color var(--messagingRoomMessageFg)
> footer
text-align left
@@ -250,18 +247,9 @@ root(isDark)
> .read
user-select none
- margin 0 4px 0 0
- color isDark ? rgba(#fff, 0.5) : rgba(#000, 0.5)
- font-size 11px
&[data-is-deleted]
> .balloon
opacity 0.5
-.message[data-darkmode]
- root(true)
-
-.message:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/messaging-room.vue b/src/client/app/common/views/components/messaging-room.vue
index 1de41855df..98661bc39d 100644
--- a/src/client/app/common/views/components/messaging-room.vue
+++ b/src/client/app/common/views/components/messaging-room.vue
@@ -262,14 +262,12 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-messaging-room
display flex
flex 1
flex-direction column
height 100%
- background isDark ? #191b22 : #fff
+ background var(--messagingRoomBg)
> .body
width 100%
@@ -277,24 +275,15 @@ root(isDark)
margin 0 auto
flex 1
- > .init
- width 100%
- margin 0
- padding 16px 8px 8px 8px
- text-align center
- font-size 0.8em
- color rgba(isDark ? #fff : #000, 0.4)
-
- [data-fa]
- margin-right 4px
-
+ > .init,
> .empty
width 100%
margin 0
padding 16px 8px 8px 8px
text-align center
font-size 0.8em
- color rgba(isDark ? #fff : #000, 0.4)
+ color var(--messagingRoomInfo)
+ opacity 0.5
[data-fa]
margin-right 4px
@@ -305,7 +294,8 @@ root(isDark)
padding 16px
text-align center
font-size 0.8em
- color rgba(isDark ? #fff : #000, 0.4)
+ color var(--messagingRoomInfo)
+ opacity 0.5
[data-fa]
margin-right 4px
@@ -349,7 +339,7 @@ root(isDark)
left 0
right 0
margin 0 auto
- background rgba(isDark ? #fff : #000, 0.1)
+ background var(--messagingRoomDateDividerLine)
> span
display inline-block
@@ -357,8 +347,8 @@ root(isDark)
padding 0 16px
//font-weight bold
line-height 32px
- color rgba(isDark ? #fff : #000, 0.3)
- background isDark ? #191b22 : #fff
+ color var(--messagingRoomDateDividerText)
+ background var(--messagingRoomBg)
> footer
position -webkit-sticky
@@ -369,7 +359,7 @@ root(isDark)
max-width 600px
margin 0 auto
padding 0
- background rgba(isDark ? #282c37 : #fff, 0.95)
+ //background rgba(var(--face), 0.95)
background-clip content-box
> .new-message
@@ -386,15 +376,15 @@ root(isDark)
cursor pointer
line-height 32px
font-size 12px
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
border-radius 16px
&:hover
- background lighten($theme-color, 10%)
+ background var(--primaryLighten10)
&:active
- background darken($theme-color, 10%)
+ background var(--primaryDarken10)
> [data-fa]
position absolute
@@ -410,10 +400,4 @@ root(isDark)
transition opacity 0.5s
opacity 0
-.mk-messaging-room[data-darkmode]
- root(true)
-
-.mk-messaging-room:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/messaging.vue b/src/client/app/common/views/components/messaging.vue
index 6abfc92dca..91453e16ec 100644
--- a/src/client/app/common/views/components/messaging.vue
+++ b/src/client/app/common/views/components/messaging.vue
@@ -167,9 +167,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-messaging
&[data-compact]
font-size 0.8em
@@ -204,12 +202,10 @@ root(isDark)
left 0
z-index 1
width 100%
- background #fff
box-shadow 0 0px 2px rgba(#000, 0.2)
> .form
- padding 8px
- background isDark ? #282c37 : #f7f7f7
+ background rgba(0, 0, 0, 0.02)
> label
display block
@@ -229,32 +225,22 @@ root(isDark)
bottom 0
left 0
width 1em
- line-height 56px
+ line-height 48px
margin auto
color #555
> input
margin 0
- padding 0 0 0 32px
+ padding 0 0 0 42px
width 100%
font-size 1em
- line-height 38px
- color #000
+ line-height 48px
+ color var(--faceText)
outline none
- background isDark ? #191b22 : #fff
- border solid 1px isDark ? #495156 : #eee
+ background transparent
+ border none
border-radius 5px
box-shadow none
- transition color 0.5s ease, border 0.5s ease
-
- &:hover
- border solid 1px isDark ? #b0b0b0 : #ddd
- transition border 0.2s ease
-
- &:focus
- color darken($theme-color, 20%)
- border solid 1px $theme-color
- transition color 0, border 0
> .result
display block
@@ -287,7 +273,7 @@ root(isDark)
&:hover
&:focus
color #fff
- background $theme-color
+ background var(--primary)
.name
color #fff
@@ -297,7 +283,7 @@ root(isDark)
&:active
color #fff
- background darken($theme-color, 10%)
+ background var(--primaryDarken10)
.name
color #fff
@@ -329,21 +315,21 @@ root(isDark)
> a
display block
text-decoration none
- background isDark ? #282c37 : #fff
- border-bottom solid 1px isDark ? #1c2023 : #eee
+ background var(--face)
+ border-bottom solid 1px var(--faceDivider)
*
pointer-events none
user-select none
&:hover
- background isDark ? #1e2129 : #fafafa
+ box-shadow 0 0 0 100px inset rgba(0, 0, 0, 0.05)
- > .avatar
+ .avatar
filter saturate(200%)
&:active
- background isDark ? #14161b : #eee
+ box-shadow 0 0 0 100px inset rgba(0, 0, 0, 0.1)
&[data-is-read]
&[data-is-me]
@@ -383,17 +369,17 @@ root(isDark)
overflow hidden
text-overflow ellipsis
font-size 1em
- color isDark ? #fff : rgba(#000, 0.9)
+ color var(--noteHeaderName)
font-weight bold
transition all 0.1s ease
> .username
margin 0 8px
- color isDark ? #606984 : rgba(#000, 0.5)
+ color var(--noteHeaderAcct)
> .mk-time
margin 0 0 0 auto
- color isDark ? #606984 : rgba(#000, 0.5)
+ color var(--noteHeaderInfo)
font-size 80%
> .avatar
@@ -413,10 +399,10 @@ root(isDark)
overflow hidden
overflow-wrap break-word
font-size 1.1em
- color isDark ? #fff : rgba(#000, 0.8)
+ color var(--faceText)
.me
- color isDark ? rgba(#fff, 0.7) : rgba(#000, 0.4)
+ opacity 0.7
> .image
display block
@@ -461,10 +447,4 @@ root(isDark)
> .avatar
margin 0 12px 0 0
-.mk-messaging[data-darkmode]
- root(true)
-
-.mk-messaging:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/note-header.vue b/src/client/app/common/views/components/note-header.vue
index d25bd430f2..8192d88412 100644
--- a/src/client/app/common/views/components/note-header.vue
+++ b/src/client/app/common/views/components/note-header.vue
@@ -42,9 +42,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.bvonvjxbwzaiskogyhbwgyxvcgserpmu
display flex
align-items baseline
white-space nowrap
@@ -61,7 +59,7 @@ root(isDark)
margin 0 .5em 0 0
padding 0
overflow hidden
- color isDark ? #fff : #627079
+ color var(--noteHeaderName)
font-size 1em
font-weight bold
text-decoration none
@@ -82,19 +80,19 @@ root(isDark)
margin 0 .5em 0 0
padding 1px 6px
font-size 80%
- color isDark ? #758188 : #aaa
- border solid 1px isDark ? #57616f : #ddd
+ color var(--noteHeaderBadgeFg)
+ background var(--noteHeaderBadgeBg)
border-radius 3px
&.is-admin
- border-color isDark ? #d42c41 : #f56a7b
- color isDark ? #d42c41 : #f56a7b
+ background var(--noteHeaderAdminBg)
+ color var(--noteHeaderAdminFg)
> .username
margin 0 .5em 0 0
overflow hidden
text-overflow ellipsis
- color isDark ? #606984 : #ccc
+ color var(--noteHeaderAcct)
flex-shrink 2147483647
> .info
@@ -102,7 +100,7 @@ root(isDark)
font-size 0.9em
> *
- color isDark ? #606984 : #c0c0c0
+ color var(--noteHeaderInfo)
> .mobile
margin-right 8px
@@ -110,15 +108,9 @@ root(isDark)
> .app
margin-right 8px
padding-right 8px
- border-right solid 1px isDark ? #1c2023 : #eaeaea
+ border-right solid 1px var(--faceDivider)
> .visibility
margin-left 8px
-.bvonvjxbwzaiskogyhbwgyxvcgserpmu[data-darkmode]
- root(true)
-
-.bvonvjxbwzaiskogyhbwgyxvcgserpmu:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/poll-editor.vue b/src/client/app/common/views/components/poll-editor.vue
index 30d9799fec..b5c57d48a5 100644
--- a/src/client/app/common/views/components/poll-editor.vue
+++ b/src/client/app/common/views/components/poll-editor.vue
@@ -68,9 +68,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-poll-editor
padding 8px
> .caution
@@ -103,49 +101,43 @@ root(isDark)
padding 6px 8px
width 300px
font-size 14px
- color isDark ? #fff : #000
- background isDark ? #191b22 : #fff
- border solid 1px rgba($theme-color, 0.1)
+ color var(--inputText)
+ background var(--pollEditorInputBg)
+ border solid 1px var(--primaryAlpha01)
border-radius 4px
&:hover
- border-color rgba($theme-color, 0.2)
+ border-color var(--primaryAlpha02)
&:focus
- border-color rgba($theme-color, 0.5)
+ border-color var(--primaryAlpha05)
> button
padding 4px 8px
- color rgba($theme-color, 0.4)
+ color var(--primaryAlpha04)
&:hover
- color rgba($theme-color, 0.6)
+ color var(--primaryAlpha06)
&:active
- color darken($theme-color, 30%)
+ color var(--primaryDarken30)
> .add
margin 8px 0 0 0
vertical-align top
- color $theme-color
+ color var(--primary)
> .destroy
position absolute
top 0
right 0
padding 4px 8px
- color rgba($theme-color, 0.4)
+ color var(--primaryAlpha04)
&:hover
- color rgba($theme-color, 0.6)
+ color var(--primaryAlpha06)
&:active
- color darken($theme-color, 30%)
-
-.mk-poll-editor[data-darkmode]
- root(true)
-
-.mk-poll-editor:not([data-darkmode])
- root(false)
+ color var(--primaryDarken30)
</style>
diff --git a/src/client/app/common/views/components/poll.vue b/src/client/app/common/views/components/poll.vue
index 4fe51d219b..0dc2622f9b 100644
--- a/src/client/app/common/views/components/poll.vue
+++ b/src/client/app/common/views/components/poll.vue
@@ -67,10 +67,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
-
+.mk-poll
> ul
display block
margin 0
@@ -82,8 +79,8 @@ root(isDark)
margin 4px 0
padding 4px 8px
width 100%
- color isDark ? #fff : #000
- border solid 1px isDark ? #5e636f : #eee
+ color var(--pollChoiceText)
+ border solid 1px var(--pollChoiceBorder)
border-radius 4px
overflow hidden
cursor pointer
@@ -99,7 +96,7 @@ root(isDark)
top 0
left 0
height 100%
- background $theme-color
+ background var(--primary)
transition width 1s ease
> span
@@ -110,7 +107,7 @@ root(isDark)
margin-left 4px
> p
- color isDark ? #a3aebf : #000
+ color var(--text)
a
color inherit
@@ -125,10 +122,4 @@ root(isDark)
&:active
background transparent
-.mk-poll[data-darkmode]
- root(true)
-
-.mk-poll:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/reaction-picker.vue b/src/client/app/common/views/components/reaction-picker.vue
index f732e40b9d..13e8cf1f07 100644
--- a/src/client/app/common/views/components/reaction-picker.vue
+++ b/src/client/app/common/views/components/reaction-picker.vue
@@ -210,11 +210,9 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
$border-color = rgba(27, 31, 35, 0.15)
-root(isDark)
+.mk-reaction-picker
position initial
> .backdrop
@@ -224,11 +222,11 @@ root(isDark)
z-index 10000
width 100%
height 100%
- background isDark ? rgba(#000, 0.4) : rgba(#000, 0.1)
+ background var(--modalBackdrop)
opacity 0
> .popover
- $bgcolor = isDark ? #2c303c : #fff
+ $bgcolor = var(--popupBg)
position absolute
z-index 10001
background $bgcolor
@@ -281,8 +279,8 @@ root(isDark)
margin 0
padding 8px 10px
font-size 14px
- color isDark ? #d6dce2 : #586069
- border-bottom solid 1px isDark ? #1c2023 : #e1e4e8
+ color var(--popupFg)
+ border-bottom solid 1px var(--faceDivider)
> div
padding 4px
@@ -301,7 +299,7 @@ root(isDark)
right 0
bottom 0
left 0
- border 2px solid rgba($theme-color, 0.3)
+ border 2px solid var(--primaryAlpha03)
border-radius 4px
> button
@@ -312,16 +310,10 @@ root(isDark)
border-radius 2px
&:hover
- background isDark ? #252731 : #eee
+ background var(--reactionPickerButtonHoverBg)
&:active
- background $theme-color
+ background var(--primary)
box-shadow inset 0 0.15em 0.3em rgba(27, 31, 35, 0.15)
-.mk-reaction-picker[data-darkmode]
- root(true)
-
-.mk-reaction-picker:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/reactions-viewer.vue b/src/client/app/common/views/components/reactions-viewer.vue
index c30fa2a1dc..9212a84b31 100644
--- a/src/client/app/common/views/components/reactions-viewer.vue
+++ b/src/client/app/common/views/components/reactions-viewer.vue
@@ -39,10 +39,9 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
- $borderColor = isDark ? #5e6673 : #eee
- border-top dashed 1px $borderColor
- border-bottom dashed 1px $borderColor
+.mk-reactions-viewer
+ border-top dashed 1px var(--reactionViewerBorder)
+ border-bottom dashed 1px var(--reactionViewerBorder)
margin 4px 0
&:empty
@@ -60,12 +59,6 @@ root(isDark)
> span
margin-left 4px
font-size 1.2em
- color isDark ? #d1d5dc : #444
-
-.mk-reactions-viewer[data-darkmode]
- root(true)
-
-.mk-reactions-viewer:not([data-darkmode])
- root(false)
+ color var(--text)
</style>
diff --git a/src/client/app/common/views/components/signin.vue b/src/client/app/common/views/components/signin.vue
index b1c6782e93..e02af8154c 100644
--- a/src/client/app/common/views/components/signin.vue
+++ b/src/client/app/common/views/components/signin.vue
@@ -68,7 +68,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.mk-signin
color #555
diff --git a/src/client/app/common/views/components/signup.vue b/src/client/app/common/views/components/signup.vue
index f603b9545c..e55d7ee3e3 100644
--- a/src/client/app/common/views/components/signup.vue
+++ b/src/client/app/common/views/components/signup.vue
@@ -151,7 +151,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.mk-signup
min-width 302px
diff --git a/src/client/app/common/views/components/switch.vue b/src/client/app/common/views/components/switch.vue
deleted file mode 100644
index 32caab638a..0000000000
--- a/src/client/app/common/views/components/switch.vue
+++ /dev/null
@@ -1,199 +0,0 @@
-<template>
-<div
- class="mk-switch"
- :class="{ disabled, checked }"
- role="switch"
- :aria-checked="checked"
- :aria-disabled="disabled"
- @click="switchValue"
- @mouseover="mouseenter"
->
- <input
- type="checkbox"
- @change="handleChange"
- ref="input"
- :disabled="disabled"
- @keydown.enter="switchValue"
- >
- <span class="button">
- <span :style="{ transform }"></span>
- </span>
- <span class="label">
- <span :aria-hidden="!checked">{{ text }}</span>
- <p :aria-hidden="!checked">
- <slot></slot>
- </p>
- </span>
-</div>
-</template>
-
-<script lang="ts">
-import Vue from 'vue';
-export default Vue.extend({
- props: {
- value: {
- type: Boolean,
- default: false
- },
- disabled: {
- type: Boolean,
- default: false
- },
- text: String
- },/*
- created() {
- if (!~[true, false].indexOf(this.value)) {
- this.$emit('input', false);
- }
- },*/
- computed: {
- checked(): boolean {
- return this.value;
- },
- transform(): string {
- return this.checked ? 'translate3d(20px, 0, 0)' : '';
- }
- },
- watch: {
- value() {
- (this.$el).style.transition = 'all 0.3s';
- (this.$refs.input as any).checked = this.checked;
- }
- },
- mounted() {
- (this.$refs.input as any).checked = this.checked;
- },
- methods: {
- mouseenter() {
- (this.$el).style.transition = 'all 0s';
- },
- handleChange() {
- (this.$el).style.transition = 'all 0.3s';
- this.$emit('input', !this.checked);
- this.$emit('change', !this.checked);
- this.$nextTick(() => {
- // set input's checked property
- // in case parent refuses to change component's value
- (this.$refs.input as any).checked = this.checked;
- });
- },
- switchValue() {
- !this.disabled && this.handleChange();
- }
- }
-});
-</script>
-
-<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
- display flex
- margin 12px 0
- cursor pointer
- transition all 0.3s
-
- > *
- user-select none
-
- &.disabled
- opacity 0.6
- cursor not-allowed
-
- &.checked
- > .button
- background-color $theme-color
- border-color $theme-color
-
- > .label
- > span
- color $theme-color
-
- &:hover
- > .label
- > span
- color darken($theme-color, 10%)
-
- > .button
- background darken($theme-color, 10%)
- border-color darken($theme-color, 10%)
-
- &:hover
- > .label
- > span
- color isDark ? #fff : #2e3338
-
- > .button
- $color = isDark ? #15181d : #ced2da
- background $color
- border-color $color
-
- > input
- position absolute
- width 0
- height 0
- opacity 0
- margin 0
-
- &:focus + .button
- &:after
- content ""
- pointer-events none
- position absolute
- top -5px
- right -5px
- bottom -5px
- left -5px
- border 2px solid rgba($theme-color, 0.3)
- border-radius 14px
-
- > .button
- $color = isDark ? #1c1f25 : #dcdfe6
-
- display inline-block
- margin 0
- width 40px
- min-width 40px
- height 20px
- min-height 20px
- background $color
- border 1px solid $color
- outline none
- border-radius 10px
- transition inherit
-
- > *
- position absolute
- top 1px
- left 1px
- border-radius 100%
- transition transform 0.3s
- width 16px
- height 16px
- background-color #fff
-
- > .label
- margin-left 8px
- display block
- font-size 15px
- cursor pointer
- transition inherit
-
- > span
- display block
- line-height 20px
- color isDark ? #c4ccd2 : #4a535a
- transition inherit
-
- > p
- margin 0
- //font-size 90%
- color isDark ? #78858e : #9daab3
-
-.mk-switch[data-darkmode]
- root(true)
-
-.mk-switch:not([data-darkmode])
- root(false)
-
-</style>
diff --git a/src/client/app/common/views/components/tag-cloud.vue b/src/client/app/common/views/components/tag-cloud.vue
index 5f2cc5276a..5cc828082f 100644
--- a/src/client/app/common/views/components/tag-cloud.vue
+++ b/src/client/app/common/views/components/tag-cloud.vue
@@ -63,7 +63,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.jtivnzhfwquxpsfidertopbmwmchmnmo
height 100%
width 100%
@@ -81,10 +81,4 @@ root(isDark)
height 100%
width 100%
-.jtivnzhfwquxpsfidertopbmwmchmnmo[data-darkmode]
- root(true)
-
-.jtivnzhfwquxpsfidertopbmwmchmnmo:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/theme.vue b/src/client/app/common/views/components/theme.vue
new file mode 100644
index 0000000000..27888d1e85
--- /dev/null
+++ b/src/client/app/common/views/components/theme.vue
@@ -0,0 +1,179 @@
+<template>
+<div class="nicnklzforebnpfgasiypmpdaaglujqm">
+ <label>
+ <span>%i18n:@light-theme%</span>
+ <ui-select v-model="light" placeholder="%i18n:@light-theme%">
+ <option v-for="x in themes" :value="x.meta.id" :key="x.meta.id">{{ x.meta.name }}</option>
+ </ui-select>
+ </label>
+
+ <label>
+ <span>%i18n:@dark-theme%</span>
+ <ui-select v-model="dark" placeholder="%i18n:@dark-theme%">
+ <option v-for="x in themes" :value="x.meta.id" :key="x.meta.id">{{ x.meta.name }}</option>
+ </ui-select>
+ </label>
+
+ <details class="creator">
+ <summary>%i18n:@create-a-theme%</summary>
+ <div>
+ <span>%i18n:@base-theme%:</span>
+ <ui-radio v-model="myThemeBase" value="light">%i18n:@base-theme-light%</ui-radio>
+ <ui-radio v-model="myThemeBase" value="dark">%i18n:@base-theme-dark%</ui-radio>
+ </div>
+ <div>
+ <ui-input v-model="myThemeName">
+ <span>%i18n:@theme-name%</span>
+ </ui-input>
+ </div>
+ <div>
+ <div style="padding-bottom:8px;">%i18n:@primary-color%:</div>
+ <color-picker v-model="myThemePrimary"/>
+ </div>
+ <div>
+ <div style="padding-bottom:8px;">%i18n:@secondary-color%:</div>
+ <color-picker v-model="myThemeSecondary"/>
+ </div>
+ <div>
+ <div style="padding-bottom:8px;">%i18n:@text-color%:</div>
+ <color-picker v-model="myThemeText"/>
+ </div>
+ <ui-button @click="preview()">%i18n:@preview-created-theme%</ui-button>
+ <ui-button primary @click="gen()">%i18n:@save-created-theme%</ui-button>
+ </details>
+
+ <details>
+ <summary>%i18n:@install-a-theme%</summary>
+ <ui-textarea v-model="installThemeCode">
+ <span>%i18n:@theme-code%</span>
+ </ui-textarea>
+ <ui-button @click="install()">%i18n:@install%</ui-button>
+ </details>
+
+ <details>
+ <summary>%i18n:@installed-themes%</summary>
+ <ui-select v-model="selectedInstalledTheme" placeholder="%i18n:@select-theme%">
+ <option v-for="x in installedThemes" :value="x.meta.id" :key="x.meta.id">{{ x.meta.name }}</option>
+ </ui-select>
+ <ui-textarea readonly :value="selectedInstalledThemeCode">
+ <span>%i18n:@theme-code%</span>
+ </ui-textarea>
+ </details>
+</div>
+</template>
+
+<script lang="ts">
+import Vue from 'vue';
+import { apiUrl, docsUrl } from '../../../config';
+import { lightTheme, darkTheme, builtinThemes, applyTheme } from '../../../theme';
+import { Chrome } from 'vue-color';
+import * as uuid from 'uuid';
+import * as tinycolor from 'tinycolor2';
+
+export default Vue.extend({
+ components: {
+ ColorPicker: Chrome
+ },
+
+ data() {
+ return {
+ installThemeCode: null,
+ selectedInstalledTheme: null,
+ myThemeBase: 'light',
+ myThemeName: '',
+ myThemePrimary: lightTheme.meta.vars.primary,
+ myThemeSecondary: lightTheme.meta.vars.secondary,
+ myThemeText: lightTheme.meta.vars.text
+ };
+ },
+
+ computed: {
+ themes(): any {
+ return this.$store.state.device.themes.concat(builtinThemes);
+ },
+
+ installedThemes(): any {
+ return this.$store.state.device.themes;
+ },
+
+ light: {
+ get() { return this.$store.state.device.lightTheme; },
+ set(value) { this.$store.commit('device/set', { key: 'lightTheme', value }); }
+ },
+
+ dark: {
+ get() { return this.$store.state.device.darkTheme; },
+ set(value) { this.$store.commit('device/set', { key: 'darkTheme', value }); }
+ },
+
+ selectedInstalledThemeCode() {
+ if (this.selectedInstalledTheme == null) return null;
+ return JSON.stringify(this.installedThemes.find(x => x.meta.id == this.selectedInstalledTheme));
+ },
+
+ myTheme(): any {
+ return {
+ meta: {
+ name: this.myThemeName,
+ author: this.$store.state.i.name,
+ base: this.myThemeBase,
+ vars: {
+ primary: tinycolor(typeof this.myThemePrimary == 'string' ? this.myThemePrimary : this.myThemePrimary.rgba).toRgbString(),
+ secondary: tinycolor(typeof this.myThemeSecondary == 'string' ? this.myThemeSecondary : this.myThemeSecondary.rgba).toRgbString(),
+ text: tinycolor(typeof this.myThemeText == 'string' ? this.myThemeText : this.myThemeText.rgba).toRgbString()
+ }
+ }
+ };
+ }
+ },
+
+ watch: {
+ myThemeBase(v) {
+ const theme = v == 'light' ? lightTheme : darkTheme;
+ this.myThemePrimary = theme.meta.vars.primary;
+ this.myThemeSecondary = theme.meta.vars.secondary;
+ this.myThemeText = theme.meta.vars.text;
+ }
+ },
+
+ methods: {
+ install() {
+ const theme = JSON.parse(this.installThemeCode);
+ if (theme.meta == null || theme.meta.id == null) {
+ alert('%i18n:@invalid-theme%');
+ return;
+ }
+ if (this.$store.state.device.themes.some(t => t.meta.id == theme.meta.id)) {
+ alert('%i18n:@already-installed%');
+ return;
+ }
+ const themes = this.$store.state.device.themes.concat(theme);
+ this.$store.commit('device/set', {
+ key: 'themes', value: themes
+ });
+ },
+
+ preview() {
+ applyTheme(this.myTheme, false);
+ },
+
+ gen() {
+ const theme = this.myTheme;
+ theme.meta.id = uuid();
+ const themes = this.$store.state.device.themes.concat(theme);
+ this.$store.commit('device/set', {
+ key: 'themes', value: themes
+ });
+ alert('%i18n:@saved%');
+ }
+ }
+});
+</script>
+
+<style lang="stylus" scoped>
+.nicnklzforebnpfgasiypmpdaaglujqm
+ > .creator
+ > div
+ padding 16px 0
+ border-bottom solid 1px var(--faceDivider)
+</style>
diff --git a/src/client/app/common/views/components/trends.vue b/src/client/app/common/views/components/trends.vue
index 0042dbe853..3d36d7449c 100644
--- a/src/client/app/common/views/components/trends.vue
+++ b/src/client/app/common/views/components/trends.vue
@@ -49,13 +49,14 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.csqvmxybqbycalfhkxvyfrgbrdalkaoc
> .fetching
> .empty
margin 0
padding 16px
text-align center
- color #aaa
+ color var(--text)
+ opacity 0.7
> [data-fa]
margin-right 4px
@@ -70,13 +71,13 @@ root(isDark)
padding 14px 16px
&:not(:last-child)
- border-bottom solid 1px isDark ? #393f4f : #eee
+ border-bottom solid 1px var(--faceDivider)
> .tag
flex 1
overflow hidden
font-size 14px
- color isDark ? #9baec8 : #65727b
+ color var(--text)
> a
display block
@@ -94,10 +95,4 @@ root(isDark)
> .chart
height 30px
-.csqvmxybqbycalfhkxvyfrgbrdalkaoc[data-darkmode]
- root(true)
-
-.csqvmxybqbycalfhkxvyfrgbrdalkaoc:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/ui/button.vue b/src/client/app/common/views/components/ui/button.vue
index e778750354..b29f8bb1c9 100644
--- a/src/client/app/common/views/components/ui/button.vue
+++ b/src/client/app/common/views/components/ui/button.vue
@@ -1,9 +1,7 @@
<template>
-<div class="ui-button" :class="[styl]">
- <button :type="type" @click="$emit('click')">
- <slot></slot>
- </button>
-</div>
+<button class="dmtdnykelhudezerjlfpbhgovrgnqqgr" :class="[styl, { inline, primary }]" :type="type" @click="$emit('click')">
+ <slot></slot>
+</button>
</template>
<script lang="ts">
@@ -13,70 +11,90 @@ export default Vue.extend({
type: {
type: String,
required: false
+ },
+ primary: {
+ type: Boolean,
+ required: false,
+ default: false
+ },
+ inline: {
+ type: Boolean,
+ required: false,
+ default: false
}
},
data() {
return {
styl: 'fill'
};
- },
- inject: {
- isCardChild: { default: false }
- },
- created() {
- if (this.isCardChild) {
- this.styl = 'line';
- }
}
});
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+.dmtdnykelhudezerjlfpbhgovrgnqqgr
+ display block
+ width 100%
+ min-height 40px
+ margin 0
+ padding 0
+ font-weight normal
+ font-size 16px
+ border none
+ border-radius 6px
+ outline none
+ box-shadow none
+
+ &:focus
+ &:after
+ content ""
+ pointer-events none
+ position absolute
+ top -5px
+ right -5px
+ bottom -5px
+ left -5px
+ border 2px solid var(--primaryAlpha03)
+ border-radius 10px
-root(isDark, fill)
- > button
- display block
- width 100%
- margin 0
- padding 0
+ &:not(.inline) + .dmtdnykelhudezerjlfpbhgovrgnqqgr
+ margin-top 16px
+
+ &.inline
+ display inline-block
+ width auto
+
+ &.primary
font-weight bold
- font-size 16px
- line-height 44px
- border none
- border-radius 6px
- outline none
- box-shadow none
- if fill
- color $theme-color-foreground
- background $theme-color
+ &.fill
+ color var(--text)
+ background var(--buttonBg)
+
+ &:hover
+ background var(--buttonHoverBg)
- &:hover
- background lighten($theme-color, 5%)
+ &:active
+ background var(--buttonActiveBg)
- &:active
- background darken($theme-color, 5%)
- else
- color $theme-color
- background none
+ &.primary
+ color var(--primaryForeground)
+ background var(--primary)
&:hover
- color darken($theme-color, 5%)
+ background var(--primaryLighten5)
&:active
- background rgba($theme-color, 0.3)
+ background var(--primaryDarken5)
-.ui-button[data-darkmode]
- &.fill
- root(true, true)
&:not(.fill)
- root(true, false)
+ color var(--primary)
+ background none
-.ui-button:not([data-darkmode])
- &.fill
- root(false, true)
- &:not(.fill)
- root(false, false)
+ &:hover
+ color var(--primaryDarken5)
+
+ &:active
+ background var(--primaryAlpha03)
</style>
diff --git a/src/client/app/common/views/components/ui/card.vue b/src/client/app/common/views/components/ui/card.vue
index aa16b557e1..a37a38d340 100644
--- a/src/client/app/common/views/components/ui/card.vue
+++ b/src/client/app/common/views/components/ui/card.vue
@@ -20,26 +20,24 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.ui-card
margin 16px
- color isDark ? #fff : #000
- background isDark ? #282C37 : #fff
+ color var(--faceText)
+ background var(--face)
box-shadow 0 3px 1px -2px rgba(#000, 0.2), 0 2px 2px 0 rgba(#000, 0.14), 0 1px 5px 0 rgba(#000, 0.12)
> header
padding 16px
font-weight bold
font-size 20px
- color isDark ? #fff : #444
+ color var(--faceText)
@media (min-width 500px)
padding 24px 32px
> section
padding 20px 16px
- border-top solid 1px isDark ? rgba(#000, 0.3) : rgba(#000, 0.1)
+ border-top solid 1px var(--faceDivider)
@media (min-width 500px)
padding 32px
@@ -50,12 +48,5 @@ root(isDark)
> header
margin-bottom 16px
font-weight bold
- color isDark ? #fff : #444
-
-.ui-card[data-darkmode]
- root(true)
-
-.ui-card:not([data-darkmode])
- root(false)
-
+ color var(--faceText)
</style>
diff --git a/src/client/app/common/views/components/ui/form.vue b/src/client/app/common/views/components/ui/form.vue
index fc8fdad9c4..5c5bbd7256 100644
--- a/src/client/app/common/views/components/ui/form.vue
+++ b/src/client/app/common/views/components/ui/form.vue
@@ -19,7 +19,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.ui-form
> fieldset
diff --git a/src/client/app/common/views/components/ui/form/button.vue b/src/client/app/common/views/components/ui/form/button.vue
index 9c37b3118b..3fd7b47629 100644
--- a/src/client/app/common/views/components/ui/form/button.vue
+++ b/src/client/app/common/views/components/ui/form/button.vue
@@ -25,9 +25,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.nvemkhtwcnnpkdrwfcbzuwhfulejhmzg
display inline-block
& + .nvemkhtwcnnpkdrwfcbzuwhfulejhmzg
@@ -38,11 +36,11 @@ root(isDark)
margin 0
padding 12px 20px
font-size 14px
- border 1px solid isDark ? #6d727d : #dcdfe6
+ border 1px solid var(--formButtonBorder)
border-radius 4px
outline none
box-shadow none
- color isDark ? #fff : #606266
+ color var(--text)
transition 0.1s
*
@@ -50,40 +48,34 @@ root(isDark)
&:hover
&:focus
- color $theme-color
- background rgba($theme-color, isDark ? 0.2 : 0.12)
- border-color rgba($theme-color, isDark ? 0.5 : 0.3)
+ color var(--primary)
+ background var(--formButtonHoverBg)
+ border-color var(--formButtonHoverBorder)
&:active
- color darken($theme-color, 20%)
- background rgba($theme-color, 0.12)
- border-color $theme-color
+ color var(--primaryDarken20)
+ background var(--formButtonActiveBg)
+ border-color var(--primary)
transition all 0s
&.primary
> button
- border 1px solid $theme-color
- background $theme-color
- color $theme-color-foreground
+ border 1px solid var(--primary)
+ background var(--primary)
+ color var(--primaryForeground)
&:hover
&:focus
- background lighten($theme-color, 20%)
- border-color lighten($theme-color, 20%)
+ background var(--primaryLighten20)
+ border-color var(--primaryLighten20)
&:active
- background darken($theme-color, 20%)
- border-color darken($theme-color, 20%)
+ background var(--primaryDarken20)
+ border-color var(--primaryDarken20)
transition all 0s
&.round
> button
border-radius 64px
-.nvemkhtwcnnpkdrwfcbzuwhfulejhmzg[data-darkmode]
- root(true)
-
-.nvemkhtwcnnpkdrwfcbzuwhfulejhmzg:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/ui/form/radio.vue b/src/client/app/common/views/components/ui/form/radio.vue
index 831981bb3e..396b2997e5 100644
--- a/src/client/app/common/views/components/ui/form/radio.vue
+++ b/src/client/app/common/views/components/ui/form/radio.vue
@@ -49,9 +49,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.uywduthvrdnlpsvsjkqigicixgyfctto
display inline-flex
margin 0 16px 0 0
cursor pointer
@@ -62,7 +60,7 @@ root(isDark)
&:hover
> .button
- border solid 2px isDark ? rgba(#fff, 0.7) : rgba(#000, 0.54)
+ border solid 2px var(--inputLabel)
&.disabled
opacity 0.6
@@ -70,15 +68,15 @@ root(isDark)
&.checked
> .button
- border-color $theme-color
+ border-color var(--primary)
&:after
- background-color $theme-color
+ background-color var(--primary)
transform scale(1)
opacity 1
> .label
- color $theme-color
+ color var(--primary)
> input
position absolute
@@ -93,7 +91,7 @@ root(isDark)
width 20px
height 20px
background none
- border solid 2px isDark ? rgba(#fff, 0.6) : rgba(#000, 0.4)
+ border solid 2px var(--radioBorder)
border-radius 100%
transition inherit
@@ -117,10 +115,4 @@ root(isDark)
line-height 20px
cursor pointer
-.uywduthvrdnlpsvsjkqigicixgyfctto[data-darkmode]
- root(true)
-
-.uywduthvrdnlpsvsjkqigicixgyfctto:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/ui/input.vue b/src/client/app/common/views/components/ui/input.vue
index ce28bfb12a..d7e72409f0 100644
--- a/src/client/app/common/views/components/ui/input.vue
+++ b/src/client/app/common/views/components/ui/input.vue
@@ -155,9 +155,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark, fill)
+root(fill)
margin 32px 0
> .icon
@@ -167,7 +165,7 @@ root(isDark, fill)
width 24px
text-align center
line-height 32px
- color isDark ? rgba(#fff, 0.7) : rgba(#000, 0.54)
+ color var(--inputLabel)
&:not(:empty) + .input
margin-left 28px
@@ -183,7 +181,7 @@ root(isDark, fill)
left 0
right 0
height 1px
- background isDark ? rgba(#fff, 0.7) : rgba(#000, 0.42)
+ background var(--inputBorder)
&:after
content ''
@@ -193,7 +191,7 @@ root(isDark, fill)
left 0
right 0
height 2px
- background $theme-color
+ background var(--primary)
opacity 0
transform scaleX(0.12)
transition border 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1)
@@ -242,7 +240,7 @@ root(isDark, fill)
transition-duration 0.3s
font-size 16px
line-height 32px
- color isDark ? rgba(#fff, 0.7) : rgba(#000, 0.54)
+ color var(--inputLabel)
pointer-events none
//will-change transform
transform-origin top left
@@ -257,7 +255,7 @@ root(isDark, fill)
font-weight fill ? bold : normal
font-size 16px
line-height 32px
- color isDark ? #fff : #000
+ color var(--inputText)
background transparent
border none
border-radius 0
@@ -280,7 +278,7 @@ root(isDark, fill)
top 0
font-size 16px
line-height fill ? 44px : 32px
- color isDark ? rgba(#fff, 0.7) : rgba(#000, 0.54)
+ color var(--inputLabel)
pointer-events none
&:empty
@@ -325,7 +323,7 @@ root(isDark, fill)
transform scaleX(1)
> .label
- color $theme-color
+ color var(--primary)
&.focused
&.filled
@@ -335,16 +333,10 @@ root(isDark, fill)
left 0 !important
transform scale(0.75)
-.ui-input[data-darkmode]
- &.fill
- root(true, true)
- &:not(.fill)
- root(true, false)
-
-.ui-input:not([data-darkmode])
+.ui-input
&.fill
- root(false, true)
+ root(true)
&:not(.fill)
- root(false, false)
+ root(false)
</style>
diff --git a/src/client/app/common/views/components/ui/radio.vue b/src/client/app/common/views/components/ui/radio.vue
index dcdda1cf0e..868a339aa4 100644
--- a/src/client/app/common/views/components/ui/radio.vue
+++ b/src/client/app/common/views/components/ui/radio.vue
@@ -51,9 +51,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.ui-radio
display inline-block
margin 0 32px 0 0
cursor pointer
@@ -68,10 +66,10 @@ root(isDark)
&.checked
> .button
- border-color $theme-color
+ border-color var(--primary)
&:after
- background-color $theme-color
+ background-color var(--primary)
transform scale(1)
opacity 1
@@ -87,7 +85,7 @@ root(isDark)
width 20px
height 20px
background none
- border solid 2px isDark ? rgba(#fff, 0.7) : rgba(#000, 0.54)
+ border solid 2px var(--inputLabel)
border-radius 100%
transition inherit
@@ -111,10 +109,4 @@ root(isDark)
line-height 20px
cursor pointer
-.ui-radio[data-darkmode]
- root(true)
-
-.ui-radio:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/ui/select.vue b/src/client/app/common/views/components/ui/select.vue
index 4273a4a0de..8c1b8c0269 100644
--- a/src/client/app/common/views/components/ui/select.vue
+++ b/src/client/app/common/views/components/ui/select.vue
@@ -70,9 +70,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark, fill)
+root(fill)
margin 32px 0
> .icon
@@ -103,7 +101,7 @@ root(isDark, fill)
left 0
right 0
height 1px
- background isDark ? rgba(#fff, 0.7) : rgba(#000, 0.42)
+ background var(--inputBorder)
&:after
content ''
@@ -113,7 +111,7 @@ root(isDark, fill)
left 0
right 0
height 2px
- background $theme-color
+ background var(--primary)
opacity 0
transform scaleX(0.12)
transition border 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1)
@@ -143,7 +141,7 @@ root(isDark, fill)
font-weight fill ? bold : normal
font-size 16px
height 32px
- color isDark ? #fff : #000
+ color var(--inputText)
background transparent
border none
border-radius 0
@@ -190,7 +188,7 @@ root(isDark, fill)
transform scaleX(1)
> .label
- color $theme-color
+ color var(--primary)
&.focused
&.filled
@@ -200,16 +198,10 @@ root(isDark, fill)
left 0 !important
transform scale(0.75)
-.ui-select[data-darkmode]
- &.fill
- root(true, true)
- &:not(.fill)
- root(true, false)
-
-.ui-select:not([data-darkmode])
+.ui-select
&.fill
- root(false, true)
+ root(true)
&:not(.fill)
- root(false, false)
+ root(false)
</style>
diff --git a/src/client/app/common/views/components/ui/switch.vue b/src/client/app/common/views/components/ui/switch.vue
index e88b867801..935f219833 100644
--- a/src/client/app/common/views/components/ui/switch.vue
+++ b/src/client/app/common/views/components/ui/switch.vue
@@ -19,7 +19,7 @@
<span class="label">
<span :aria-hidden="!checked"><slot></slot></span>
<p :aria-hidden="!checked">
- <slot name="text"></slot>
+ <slot name="desc"></slot>
</p>
</span>
</div>
@@ -56,9 +56,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.ui-switch
display flex
margin 32px 0
cursor pointer
@@ -79,11 +77,11 @@ root(isDark)
&.checked
> .button
- background-color rgba($theme-color, 0.4)
- border-color rgba($theme-color, 0.4)
+ background-color var(--primaryAlpha04)
+ border-color var(--primaryAlpha04)
> *
- background-color $theme-color
+ background-color var(--primary)
transform translateX(14px)
> input
@@ -99,7 +97,7 @@ root(isDark)
margin 3px 0 0 0
width 34px
height 14px
- background isDark ? rgba(#fff, 0.15) : rgba(#000, 0.25)
+ background var(--switchTrack)
outline none
border-radius 14px
transition inherit
@@ -125,18 +123,11 @@ root(isDark)
> span
display block
line-height 20px
- color isDark ? #c4ccd2 : rgba(#000, 0.75)
+ color currentColor
transition inherit
> p
margin 0
- //font-size 90%
- color isDark ? #78858e : #9daab3
-
-.ui-switch[data-darkmode]
- root(true)
-
-.ui-switch:not([data-darkmode])
- root(false)
+ opacity 0.7
</style>
diff --git a/src/client/app/common/views/components/ui/textarea.vue b/src/client/app/common/views/components/ui/textarea.vue
index 60fe1cdd82..67898ee059 100644
--- a/src/client/app/common/views/components/ui/textarea.vue
+++ b/src/client/app/common/views/components/ui/textarea.vue
@@ -63,9 +63,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark, fill)
+root(fill)
margin 42px 0 32px 0
> .input
@@ -84,7 +82,7 @@ root(isDark, fill)
left 0
right 0
background none
- border solid 1px isDark ? rgba(#fff, 0.7) : rgba(#000, 0.42)
+ border solid 1px var(--inputBorder)
border-radius 3px
pointer-events none
@@ -97,7 +95,7 @@ root(isDark, fill)
left 0
right 0
background none
- border solid 2px $theme-color
+ border solid 2px var(--primary)
border-radius 3px
opacity 0
transition opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1)
@@ -112,7 +110,7 @@ root(isDark, fill)
transition-duration 0.3s
font-size 16px
line-height 32px
- color isDark ? rgba(#fff, 0.7) : rgba(#000, 0.54)
+ color var(--inputLabel)
pointer-events none
//will-change transform
transform-origin top left
@@ -126,7 +124,7 @@ root(isDark, fill)
font inherit
font-weight fill ? bold : normal
font-size 16px
- color isDark ? #fff : #000
+ color var(--inputText)
background transparent
border none
border-radius 0
@@ -149,7 +147,7 @@ root(isDark, fill)
opacity 1
> .label
- color $theme-color
+ color var(--primary)
&.focused
&.filled
@@ -159,16 +157,10 @@ root(isDark, fill)
left 0 !important
transform scale(0.75)
-.ui-textarea[data-darkmode]
- &.fill
- root(true, true)
- &:not(.fill)
- root(true, false)
+.ui-textarea.fill
+ root(true)
-.ui-textarea:not([data-darkmode])
- &.fill
- root(false, true)
- &:not(.fill)
- root(false, false)
+.ui-textarea:not(.fill)
+ root(false)
</style>
diff --git a/src/client/app/common/views/components/uploader.vue b/src/client/app/common/views/components/uploader.vue
index f4797d89f7..19b0d15708 100644
--- a/src/client/app/common/views/components/uploader.vue
+++ b/src/client/app/common/views/components/uploader.vue
@@ -81,7 +81,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.mk-uploader
overflow auto
@@ -100,7 +100,7 @@ export default Vue.extend({
margin 8px 0 0 0
padding 0
height 36px
- box-shadow 0 -1px 0 rgba($theme-color, 0.1)
+ box-shadow 0 -1px 0 var(--primaryAlpha01)
border-top solid 8px transparent
&:first-child
@@ -127,7 +127,7 @@ export default Vue.extend({
padding 0
max-width 256px
font-size 0.8em
- color rgba($theme-color, 0.7)
+ color var(--primaryAlpha07)
white-space nowrap
text-overflow ellipsis
overflow hidden
@@ -145,17 +145,17 @@ export default Vue.extend({
font-size 0.8em
> .initing
- color rgba($theme-color, 0.5)
+ color var(--primaryAlpha05)
> .kb
- color rgba($theme-color, 0.5)
+ color var(--primaryAlpha05)
> .percentage
display inline-block
width 48px
text-align right
- color rgba($theme-color, 0.7)
+ color var(--primaryAlpha07)
&:after
content '%'
@@ -174,10 +174,10 @@ export default Vue.extend({
overflow hidden
&::-webkit-progress-value
- background $theme-color
+ background var(--primary)
&::-webkit-progress-bar
- background rgba($theme-color, 0.1)
+ background var(--primaryAlpha01)
> .progress
display block
@@ -191,13 +191,13 @@ export default Vue.extend({
border-radius 4px
background linear-gradient(
45deg,
- lighten($theme-color, 30%) 25%,
- $theme-color 25%,
- $theme-color 50%,
- lighten($theme-color, 30%) 50%,
- lighten($theme-color, 30%) 75%,
- $theme-color 75%,
- $theme-color
+ var(--primaryLighten30) 25%,
+ var(--primary) 25%,
+ var(--primary) 50%,
+ var(--primaryLighten30) 50%,
+ var(--primaryLighten30) 75%,
+ var(--primary) 75%,
+ var(--primary)
)
background-size 32px 32px
animation bg 1.5s linear infinite
diff --git a/src/client/app/common/views/components/url-preview.vue b/src/client/app/common/views/components/url-preview.vue
index f9b8415b5b..86489cf8be 100644
--- a/src/client/app/common/views/components/url-preview.vue
+++ b/src/client/app/common/views/components/url-preview.vue
@@ -200,17 +200,17 @@ export default Vue.extend({
top 0
width 100%
-root(isDark)
+.mk-url-preview
> a
display block
font-size 14px
- border solid 1px isDark ? #191b1f : #eee
+ border solid 1px var(--urlPreviewBorder)
border-radius 4px
overflow hidden
&:hover
text-decoration none
- border-color isDark ? #4f5561 : #ddd
+ border-color var(--urlPreviewBorderHover)
> article > header > h1
text-decoration underline
@@ -235,11 +235,11 @@ root(isDark)
> h1
margin 0
font-size 1em
- color isDark ? #d6dae0 : #555
+ color var(--urlPreviewTitle)
> p
margin 0
- color isDark ? #a4aab3 : #777
+ color var(--urlPreviewText)
font-size 0.8em
> footer
@@ -256,7 +256,7 @@ root(isDark)
> p
display inline-block
margin 0
- color isDark ? #b0b4bf : #666
+ color var(--urlPreviewInfo)
font-size 0.8em
line-height 16px
vertical-align top
@@ -322,10 +322,4 @@ root(isDark)
width 12px
height 12px
-.mk-url-preview[data-darkmode]
- root(true)
-
-.mk-url-preview:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/visibility-chooser.vue b/src/client/app/common/views/components/visibility-chooser.vue
index 1830b1832e..02f33bfbc0 100644
--- a/src/client/app/common/views/components/visibility-chooser.vue
+++ b/src/client/app/common/views/components/visibility-chooser.vue
@@ -127,11 +127,9 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
$border-color = rgba(27, 31, 35, 0.15)
-root(isDark)
+.mk-visibility-chooser
position initial
> .backdrop
@@ -141,11 +139,11 @@ root(isDark)
z-index 10000
width 100%
height 100%
- background isDark ? rgba(#000, 0.4) : rgba(#000, 0.1)
+ background var(--modalBackdrop)
opacity 0
> .popover
- $bgcolor = isDark ? #2c303c : #fff
+ $bgcolor = var(--popupBg)
position absolute
z-index 10001
width 240px
@@ -189,18 +187,18 @@ root(isDark)
display flex
padding 8px 14px
font-size 12px
- color isDark ? #fff : #666
+ color var(--popupFg)
cursor pointer
&:hover
- background isDark ? #252731 : #eee
+ background var(--faceClearButtonHover)
&:active
- background isDark ? #21242b : #ddd
+ background var(--faceClearButtonActive)
&.active
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
> *
user-select none
@@ -222,11 +220,4 @@ root(isDark)
> span:last-child:not(:first-child)
opacity 0.6
-
-.mk-visibility-chooser[data-darkmode]
- root(true)
-
-.mk-visibility-chooser:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/components/welcome-timeline.vue b/src/client/app/common/views/components/welcome-timeline.vue
index 965ec78559..6934fb4856 100644
--- a/src/client/app/common/views/components/welcome-timeline.vue
+++ b/src/client/app/common/views/components/welcome-timeline.vue
@@ -90,8 +90,8 @@ export default Vue.extend({
opacity 0
transform translateY(-30px)
-root(isDark)
- background isDark ? #282C37 : #fff
+.mk-welcome-timeline
+ background var(--face)
> div
> *
@@ -101,8 +101,8 @@ root(isDark)
padding 16px
overflow-wrap break-word
font-size .9em
- color isDark ? #fff : #4C4C4C
- border-bottom 1px solid isDark ? rgba(#000, 0.1) : rgba(#000, 0.05)
+ color var(--noteText)
+ border-bottom 1px solid var(--faceDivider)
&:after
content ""
@@ -137,26 +137,20 @@ root(isDark)
overflow hidden
font-weight bold
text-overflow ellipsis
- color isDark ? #fff : #627079
+ color var(--noteHeaderName)
> .username
margin 0 .5em 0 0
- color isDark ? #606984 : #ccc
+ color var(--noteHeaderAcct)
> .info
margin-left auto
font-size 0.9em
> .created-at
- color isDark ? #606984 : #c0c0c0
+ color var(--noteHeaderInfo)
> .text
text-align left
-.mk-welcome-timeline[data-darkmode]
- root(true)
-
-.mk-welcome-timeline:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/pages/follow.vue b/src/client/app/common/views/pages/follow.vue
index 80a870a257..cb4785f468 100644
--- a/src/client/app/common/views/pages/follow.vue
+++ b/src/client/app/common/views/pages/follow.vue
@@ -1,5 +1,5 @@
<template>
-<div class="syxhndwprovvuqhmyvveewmbqayniwkv" v-if="!fetching" :data-darkmode="$store.state.device.darkmode">
+<div class="syxhndwprovvuqhmyvveewmbqayniwkv" v-if="!fetching">
<div class="signed-in-as" v-html="'%i18n:@signed-in-as%'.replace('{}', `<b>${myName}`)"></div>
<main>
@@ -107,16 +107,14 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.syxhndwprovvuqhmyvveewmbqayniwkv
padding 32px
max-width 500px
margin 0 auto
text-align center
- color isDark ? #9baec8 : #868c8c
+ color var(--text)
- $bg = isDark ? #282C37 : #fff
+ $bg = var(--face)
@media (max-width 400px)
padding 16px
@@ -124,7 +122,6 @@ root(isDark)
> .signed-in-as
margin-bottom 16px
font-size 14px
- color isDark ? #9baec8 : #9daab3
> main
margin-bottom 16px
@@ -173,29 +170,29 @@ root(isDark)
min-width 150px
font-size 14px
font-weight bold
- color $theme-color
+ color var(--primary)
background transparent
outline none
- border solid 1px $theme-color
+ border solid 1px var(--primary)
border-radius 36px
&:hover
- background rgba($theme-color, 0.1)
+ background var(--primaryAlpha01)
&:active
- background rgba($theme-color, 0.2)
+ background var(--primaryAlpha02)
&.active
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
&:hover
- background lighten($theme-color, 10%)
- border-color lighten($theme-color, 10%)
+ background var(--primaryLighten10)
+ border-color var(--primaryLighten10)
&:active
- background darken($theme-color, 10%)
- border-color darken($theme-color, 10%)
+ background var(--primaryDarken10)
+ border-color var(--primaryDarken10)
&.wait
cursor wait !important
@@ -204,10 +201,4 @@ root(isDark)
*
pointer-events none
-.syxhndwprovvuqhmyvveewmbqayniwkv[data-darkmode]
- root(true)
-
-.syxhndwprovvuqhmyvveewmbqayniwkv:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/widgets/analog-clock.vue b/src/client/app/common/views/widgets/analog-clock.vue
index 04223f0d21..cfcdd5a1b6 100644
--- a/src/client/app/common/views/widgets/analog-clock.vue
+++ b/src/client/app/common/views/widgets/analog-clock.vue
@@ -26,16 +26,8 @@ export default define({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mkw-analog-clock
.mkw-analog-clock--body
padding 8px
-.mkw-analog-clock[data-darkmode]
- root(true)
-
-.mkw-analog-clock:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/widgets/broadcast.vue b/src/client/app/common/views/widgets/broadcast.vue
index c471229f15..620b09ff0e 100644
--- a/src/client/app/common/views/widgets/broadcast.vue
+++ b/src/client/app/common/views/widgets/broadcast.vue
@@ -5,7 +5,6 @@
:data-found="announcements && announcements.length != 0"
:data-melt="props.design == 1"
:data-mobile="platform == 'mobile'"
- :data-darkmode="$store.state.device.darkmode"
>
<div class="icon">
<svg height="32" version="1.1" viewBox="0 0 32 32" width="32">
@@ -71,9 +70,9 @@ export default define({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.anltbovirfeutcigvwgmgxipejaeozxi-body
padding 10px
- background isDark ? #253a50 : #f3f9ff
+ background var(--announcementsBg)
&[data-melt]
background transparent
@@ -130,14 +129,14 @@ root(isDark)
margin 0
font-size 0.95em
font-weight normal
- color isDark ? #539eff : #4078c0
+ color var(--announcementsTitle)
> p
display block
z-index 1
margin 0
font-size 0.7em
- color isDark ? #fff : #57616f
+ color var(--announcementsText)
&.fetching
text-align center
@@ -150,10 +149,4 @@ root(isDark)
> p
color #fff
-.anltbovirfeutcigvwgmgxipejaeozxi-body[data-darkmode]
- root(true)
-
-.anltbovirfeutcigvwgmgxipejaeozxi-body:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/widgets/calendar.vue b/src/client/app/common/views/widgets/calendar.vue
index eb15030370..308d73bad8 100644
--- a/src/client/app/common/views/widgets/calendar.vue
+++ b/src/client/app/common/views/widgets/calendar.vue
@@ -116,15 +116,13 @@ export default define({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mkw-calendar
&[data-special='on-new-years-day']
border-color #ef95a0
.mkw-calendar--body
padding 16px 0
- color isDark ? #c5ced6 : #777
+ color var(--calendarDay)
&:after
content ""
@@ -169,7 +167,8 @@ root(isDark)
margin 0 0 2px 0
font-size 12px
line-height 18px
- color isDark ? #7a8692 : #888
+ color var(--text)
+ opacity 0.8
> b
margin-left 2px
@@ -177,12 +176,12 @@ root(isDark)
> .meter
width 100%
overflow hidden
- background isDark ? #1c1f25 : #eee
+ background var(--materBg)
border-radius 8px
> .val
height 4px
- background $theme-color
+ background var(--primary)
transition width .3s cubic-bezier(0.23, 1, 0.32, 1)
&:nth-child(1)
@@ -197,10 +196,4 @@ root(isDark)
> .meter > .val
background #41ddde
-.mkw-calendar[data-darkmode]
- root(true)
-
-.mkw-calendar:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/widgets/donation.vue b/src/client/app/common/views/widgets/donation.vue
index 544ca1bd9d..b025b41e7d 100644
--- a/src/client/app/common/views/widgets/donation.vue
+++ b/src/client/app/common/views/widgets/donation.vue
@@ -1,13 +1,15 @@
<template>
-<div class="mkw-donation" :data-mobile="platform == 'mobile'">
- <article>
- <h1>%fa:heart%%i18n:@title%</h1>
- <p v-if="meta">
- {{ '%i18n:@text%'.substr(0, '%i18n:@text%'.indexOf('{')) }}
- <a :href="meta.maintainer.url">{{ meta.maintainer.name }}</a>
- {{ '%i18n:@text%'.substr('%i18n:@text%'.indexOf('}') + 1) }}
- </p>
- </article>
+<div>
+ <mk-widget-container :show-header="false">
+ <article class="dolfvtibguprpxxhfndqaosjitixjohx">
+ <h1>%fa:heart%%i18n:@title%</h1>
+ <p v-if="meta">
+ {{ '%i18n:@text%'.substr(0, '%i18n:@text%'.indexOf('{')) }}
+ <a :href="meta.maintainer.url">{{ meta.maintainer.name }}</a>
+ {{ '%i18n:@text%'.substr('%i18n:@text%'.indexOf('}') + 1) }}
+ </p>
+ </article>
+ </mk-widget-container>
</div>
</template>
@@ -30,46 +32,22 @@ export default define({
</script>
<style lang="stylus" scoped>
-root(isDark)
- background isDark ? #282c37 : #fff
- border solid 1px isDark ? #c3831c : #ead8bb
- border-radius 6px
+.dolfvtibguprpxxhfndqaosjitixjohx
+ padding 20px
+ background var(--donationBg)
+ color var(--donationFg)
- > article
- padding 20px
+ > h1
+ margin 0 0 5px 0
+ font-size 1em
- > h1
- margin 0 0 5px 0
- font-size 1em
- color isDark ? #b2bac1 : #888
+ > [data-fa]
+ margin-right 0.25em
- > [data-fa]
- margin-right 0.25em
-
- > p
- display block
- z-index 1
- margin 0
- font-size 0.8em
- color isDark ? #a1a6ab : #999
-
- &[data-mobile]
- border none
- background #ead8bb
- border-radius 8px
- box-shadow 0 0 0 1px rgba(#000, 0.2)
-
- > article
- > h1
- color #7b8871
-
- > p
- color #777d71
-
-.mkw-donation[data-darkmode]
- root(true)
-
-.mkw-donation:not([data-darkmode])
- root(false)
+ > p
+ display block
+ z-index 1
+ margin 0
+ font-size 0.8em
</style>
diff --git a/src/client/app/common/views/widgets/memo.vue b/src/client/app/common/views/widgets/memo.vue
index 30f0d3b009..be8b18a4e9 100644
--- a/src/client/app/common/views/widgets/memo.vue
+++ b/src/client/app/common/views/widgets/memo.vue
@@ -57,9 +57,7 @@ export default define({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mkw-memo
.mkw-memo--body
padding-bottom 28px + 16px
@@ -69,10 +67,10 @@ root(isDark)
max-width 100%
min-width 100%
padding 16px
- color isDark ? #fff : #222
- background isDark ? #282c37 : #fff
+ color var(--inputText)
+ background var(--face)
border none
- border-bottom solid 1px isDark ? #1c2023 : #eee
+ border-bottom solid 1px var(--faceDivider)
border-radius 0
> button
@@ -83,8 +81,8 @@ root(isDark)
margin 0
padding 0 10px
height 28px
- color $theme-color-foreground
- background $theme-color !important
+ color var(--primaryForeground)
+ background var(--primary) !important
outline none
border none
border-radius 4px
@@ -92,20 +90,14 @@ root(isDark)
cursor pointer
&:hover
- background lighten($theme-color, 10%) !important
+ background var(--primaryLighten10) !important
&:active
- background darken($theme-color, 10%) !important
+ background var(--primaryDarken10) !important
transition background 0s ease
&:disabled
opacity 0.7
cursor default
-.mkw-memo[data-darkmode]
- root(true)
-
-.mkw-memo:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/widgets/nav.vue b/src/client/app/common/views/widgets/nav.vue
index 0cbf7c158e..12003db3f2 100644
--- a/src/client/app/common/views/widgets/nav.vue
+++ b/src/client/app/common/views/widgets/nav.vue
@@ -16,23 +16,17 @@ export default define({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.mkw-nav
.mkw-nav--body
padding 16px
font-size 12px
- color isDark ? #9aa4b3 : #aaa
- background isDark ? #282c37 : #fff
+ color var(--text)
+ background var(--face)
a
- color isDark ? #9aa4b3 : #999
+ color var(--text)
i
- color isDark ? #9aa4b3 : #ccc
-
-.mkw-nav[data-darkmode]
- root(true)
-
-.mkw-nav:not([data-darkmode])
- root(false)
+ color var(--text)
</style>
diff --git a/src/client/app/common/views/widgets/posts-monitor.vue b/src/client/app/common/views/widgets/posts-monitor.vue
index 801307be54..18df1241a9 100644
--- a/src/client/app/common/views/widgets/posts-monitor.vue
+++ b/src/client/app/common/views/widgets/posts-monitor.vue
@@ -4,7 +4,7 @@
<template slot="header">%fa:chart-line%%i18n:@title%</template>
<button slot="func" @click="toggle" title="%i18n:@toggle%">%fa:sort%</button>
- <div class="qpdmibaztplkylerhdbllwcokyrfxeyj" :class="{ dual: props.view == 0 }" :data-darkmode="$store.state.device.darkmode">
+ <div class="qpdmibaztplkylerhdbllwcokyrfxeyj" :class="{ dual: props.view == 0 }">
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`" v-show="props.view != 2">
<defs>
<linearGradient :id="localGradientId" x1="0" x2="0" y1="1" y2="0">
@@ -173,7 +173,7 @@ export default define({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.qpdmibaztplkylerhdbllwcokyrfxeyj
&.dual
> svg
width 50%
@@ -192,7 +192,7 @@ root(isDark)
> text
font-size 5px
- fill isDark ? rgba(#fff, 0.55) : rgba(#000, 0.55)
+ fill var(--chartCaption)
> tspan
opacity 0.5
@@ -202,10 +202,4 @@ root(isDark)
display block
clear both
-.qpdmibaztplkylerhdbllwcokyrfxeyj[data-darkmode]
- root(true)
-
-.qpdmibaztplkylerhdbllwcokyrfxeyj:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/widgets/rss.vue b/src/client/app/common/views/widgets/rss.vue
index a777388cdb..448eee9fb6 100644
--- a/src/client/app/common/views/widgets/rss.vue
+++ b/src/client/app/common/views/widgets/rss.vue
@@ -65,7 +65,7 @@ export default define({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.mkw-rss
.mkw-rss--body
.feed
padding 12px 16px
@@ -74,8 +74,8 @@ root(isDark)
> a
display block
padding 4px 0
- color isDark ? #9aa4b3 : #666
- border-bottom dashed 1px isDark ? #1c2023 : #eee
+ color var(--text)
+ border-bottom dashed 1px var(--faceDivider)
&:last-child
border-bottom none
@@ -90,7 +90,7 @@ root(isDark)
margin-right 4px
&[data-mobile]
- background isDark ? #21242f : #f3f3f3
+ background var(--face)
.feed
padding 0
@@ -100,12 +100,6 @@ root(isDark)
border-bottom none
&:nth-child(even)
- background isDark ? rgba(#000, 0.05) : rgba(#fff, 0.7)
-
-.mkw-rss[data-darkmode]
- root(true)
-
-.mkw-rss:not([data-darkmode])
- root(false)
+ background rgba(#000, 0.05)
</style>
diff --git a/src/client/app/common/views/widgets/server.cpu-memory.vue b/src/client/app/common/views/widgets/server.cpu-memory.vue
index b0421d6150..55aa1ea895 100644
--- a/src/client/app/common/views/widgets/server.cpu-memory.vue
+++ b/src/client/app/common/views/widgets/server.cpu-memory.vue
@@ -129,7 +129,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.cpu-memory
> svg
display block
padding 10px
@@ -144,7 +144,7 @@ root(isDark)
> text
font-size 5px
- fill isDark ? rgba(#fff, 0.55) : rgba(#000, 0.55)
+ fill var(--chartCaption)
> tspan
opacity 0.5
@@ -154,10 +154,4 @@ root(isDark)
display block
clear both
-.cpu-memory[data-darkmode]
- root(true)
-
-.cpu-memory:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/widgets/server.cpu.vue b/src/client/app/common/views/widgets/server.cpu.vue
index b9748bdf7c..2034aee0eb 100644
--- a/src/client/app/common/views/widgets/server.cpu.vue
+++ b/src/client/app/common/views/widgets/server.cpu.vue
@@ -38,7 +38,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.cpu
> .pie
padding 10px
height 100px
@@ -52,7 +52,7 @@ root(isDark)
> p
margin 0
font-size 12px
- color isDark ? #a8b4bd : #505050
+ color var(--chartCaption)
&:first-child
font-weight bold
@@ -65,10 +65,4 @@ root(isDark)
display block
clear both
-.cpu[data-darkmode]
- root(true)
-
-.cpu:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/widgets/server.disk.vue b/src/client/app/common/views/widgets/server.disk.vue
index 99ce624051..667576ab76 100644
--- a/src/client/app/common/views/widgets/server.disk.vue
+++ b/src/client/app/common/views/widgets/server.disk.vue
@@ -46,7 +46,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.disk
> .pie
padding 10px
height 100px
@@ -60,7 +60,7 @@ root(isDark)
> p
margin 0
font-size 12px
- color isDark ? #a8b4bd : #505050
+ color var(--chartCaption)
&:first-child
font-weight bold
@@ -73,10 +73,4 @@ root(isDark)
display block
clear both
-.disk[data-darkmode]
- root(true)
-
-.disk:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/widgets/server.memory.vue b/src/client/app/common/views/widgets/server.memory.vue
index 8a60621343..9e12884cf9 100644
--- a/src/client/app/common/views/widgets/server.memory.vue
+++ b/src/client/app/common/views/widgets/server.memory.vue
@@ -46,7 +46,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.memory
> .pie
padding 10px
height 100px
@@ -60,7 +60,7 @@ root(isDark)
> p
margin 0
font-size 12px
- color isDark ? #a8b4bd : #505050
+ color var(--chartCaption)
&:first-child
font-weight bold
@@ -73,10 +73,4 @@ root(isDark)
display block
clear both
-.memory[data-darkmode]
- root(true)
-
-.memory:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/common/views/widgets/server.pie.vue b/src/client/app/common/views/widgets/server.pie.vue
index d557c52ea5..ce342fd41b 100644
--- a/src/client/app/common/views/widgets/server.pie.vue
+++ b/src/client/app/common/views/widgets/server.pie.vue
@@ -45,7 +45,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+svg
display block
height 100%
@@ -56,12 +56,6 @@ root(isDark)
> text
font-size 0.15px
- fill isDark ? rgba(#fff, 0.6) : rgba(#000, 0.6)
-
-svg[data-darkmode]
- root(true)
-
-svg:not([data-darkmode])
- root(false)
+ fill var(--chartCaption)
</style>
diff --git a/src/client/app/desktop/assets/header-icon.light.svg b/src/client/app/desktop/assets/header-icon.light.svg
deleted file mode 100644
index 61e2026243..0000000000
--- a/src/client/app/desktop/assets/header-icon.light.svg
+++ /dev/null
@@ -1,150 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="512"
- height="512"
- viewBox="0 0 135.46667 135.46667"
- version="1.1"
- id="svg8"
- inkscape:version="0.92.1 r15371"
- sodipodi:docname="header-icon.light.svg"
- inkscape:export-filename="C:\Users\syuilo\projects\misskey\assets\favicon\32.png"
- inkscape:export-xdpi="6"
- inkscape:export-ydpi="6">
- <defs
- id="defs2">
- <inkscape:path-effect
- effect="simplify"
- id="path-effect5115"
- is_visible="true"
- steps="1"
- threshold="0.000408163"
- smooth_angles="360"
- helper_size="0"
- simplify_individual_paths="false"
- simplify_just_coalesce="false"
- simplifyindividualpaths="false"
- simplifyJustCoalesce="false" />
- <inkscape:path-effect
- effect="simplify"
- id="path-effect5111"
- is_visible="true"
- steps="1"
- threshold="0.000408163"
- smooth_angles="360"
- helper_size="0"
- simplify_individual_paths="false"
- simplify_just_coalesce="false"
- simplifyindividualpaths="false"
- simplifyJustCoalesce="false" />
- <inkscape:path-effect
- effect="simplify"
- id="path-effect5104"
- is_visible="true"
- steps="1"
- threshold="0.000408163"
- smooth_angles="360"
- helper_size="0"
- simplify_individual_paths="false"
- simplify_just_coalesce="false"
- simplifyindividualpaths="false"
- simplifyJustCoalesce="false" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4142136"
- inkscape:cx="114.309"
- inkscape:cy="251.50613"
- inkscape:document-units="px"
- inkscape:current-layer="g4502"
- showgrid="true"
- units="px"
- inkscape:snap-bbox="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="false"
- inkscape:snap-smooth-nodes="true"
- inkscape:snap-center="true"
- inkscape:snap-page="true"
- inkscape:window-width="1920"
- inkscape:window-height="1027"
- inkscape:window-x="-8"
- inkscape:window-y="1072"
- inkscape:window-maximized="1"
- inkscape:snap-object-midpoints="true"
- inkscape:snap-midpoints="true"
- inkscape:object-paths="true"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0"
- objecttolerance="1"
- guidetolerance="1"
- inkscape:snap-nodes="false"
- inkscape:snap-others="false">
- <inkscape:grid
- type="xygrid"
- id="grid4504"
- spacingx="4.2333334"
- spacingy="4.2333334"
- empcolor="#ff3fff"
- empopacity="0.25098039"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata5">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="レイヤー 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(-30.809093,-111.78601)">
- <g
- id="g4502"
- transform="matrix(1.096096,0,0,1.096096,-2.960633,-44.023579)">
- <g
- style="fill:#000000;fill-opacity:1"
- transform="translate(-1.3333333e-6,-1.3439941e-6)"
- id="g5125">
- <g
- transform="matrix(0.91391326,0,0,0.91391326,7.9719907,17.595761)"
- id="text4489"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:141.03404236px;line-height:476.69509888px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.28950602px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- aria-label="Mi">
- <path
- sodipodi:nodetypes="zccssscssccscczzzccsccsscscsccz"
- inkscape:connector-curvature="0"
- id="path5210"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';fill:#000000;fill-opacity:1;stroke-width:0.28950602px"
- d="m 75.196381,231.17126 c -5.855419,0.0202 -10.885068,-3.50766 -13.2572,-7.61584 -1.266603,-1.79454 -3.772419,-2.43291 -3.807919,0 v 11.2332 c 0,4.51309 -1.645397,8.41504 -4.936191,11.70583 -3.196772,3.19677 -7.098714,4.79516 -11.705826,4.79516 -4.513089,0 -8.415031,-1.59839 -11.705825,-4.79516 -3.196772,-3.29079 -4.795158,-7.19274 -4.795158,-11.70583 v -61.7729 c 0,-3.47884 0.987238,-6.6286 2.961715,-9.44928 2.068499,-2.91471 4.701135,-4.9362 7.897906,-6.06447 1.786431,-0.65816 3.666885,-0.98724 5.641362,-0.98724 5.077225,0 9.308247,1.97448 12.693064,5.92343 1.786431,1.97448 2.820681,3.00873 3.102749,3.10275 0,0 13.408119,16.21319 13.78421,16.49526 0.376091,0.28206 1.480789,2.43848 4.127113,2.43848 2.646324,0 3.89218,-2.15642 4.26827,-2.43848 0.376091,-0.28207 13.784088,-16.49526 13.784088,-16.49526 0.09402,0.094 1.081261,-0.94022 2.961715,-3.10275 3.478837,-3.94895 7.756866,-5.92343 12.834096,-5.92343 1.88045,0 3.76091,0.32908 5.64136,0.98724 3.19677,1.12827 5.7824,3.14976 7.75688,6.06447 2.06849,2.82068 3.10274,5.97044 3.10274,9.44928 v 61.7729 c 0,4.51309 -1.6454,8.41504 -4.93619,11.70583 -3.19677,3.19677 -7.09871,4.79516 -11.70582,4.79516 -4.51309,0 -8.41504,-1.59839 -11.705828,-4.79516 -3.196772,-3.29079 -4.795158,-7.19274 -4.795158,-11.70583 v -11.2332 c -0.277898,-3.06563 -2.987588,-1.13379 -3.948953,0 -2.538613,4.70114 -7.401781,7.59567 -13.2572,7.61584 z" />
- <path
- inkscape:connector-curvature="0"
- id="path5212"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';fill:#000000;fill-opacity:1;stroke-width:0.28950602px"
- d="m 145.83461,185.00361 q -5.92343,0 -10.15445,-4.08999 -4.08999,-4.23102 -4.08999,-10.15445 0,-5.92343 4.08999,-10.01342 4.23102,-4.23102 10.15445,-4.23102 5.92343,0 10.15445,4.23102 4.23102,4.08999 4.23102,10.01342 0,5.92343 -4.23102,10.15445 -4.23102,4.08999 -10.15445,4.08999 z m 0.14103,2.82068 q 5.92343,0 10.01342,4.23102 4.23102,4.23102 4.23102,10.15445 v 34.83541 q 0,5.92343 -4.23102,10.15445 -4.08999,4.08999 -10.01342,4.08999 -5.92343,0 -10.15445,-4.08999 -4.23102,-4.23102 -4.23102,-10.15445 v -34.83541 q 0,-5.92343 4.23102,-10.15445 4.23102,-4.23102 10.15445,-4.23102 z" />
- </g>
- </g>
- </g>
- </g>
-</svg>
diff --git a/src/client/app/desktop/assets/header-icon.dark.svg b/src/client/app/desktop/assets/header-icon.svg
index fa42856fa5..d677d2d163 100644
--- a/src/client/app/desktop/assets/header-icon.dark.svg
+++ b/src/client/app/desktop/assets/header-icon.svg
@@ -124,24 +124,24 @@
id="g4502"
transform="matrix(1.096096,0,0,1.096096,-2.960633,-44.023579)">
<g
- style="fill:#ffffff;fill-opacity:1"
+ style="fill-opacity:1"
transform="translate(-1.3333333e-6,-1.3439941e-6)"
id="g5125">
<g
transform="matrix(0.91391326,0,0,0.91391326,7.9719907,17.595761)"
id="text4489"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:141.03404236px;line-height:476.69509888px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.28950602px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:141.03404236px;line-height:476.69509888px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill-opacity:1;stroke:none;stroke-width:0.28950602px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
aria-label="Mi">
<path
sodipodi:nodetypes="zccssscssccscczzzccsccsscscsccz"
inkscape:connector-curvature="0"
id="path5210"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';fill:#ffffff;fill-opacity:1;stroke-width:0.28950602px"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';fill-opacity:1;stroke-width:0.28950602px"
d="m 75.196381,231.17126 c -5.855419,0.0202 -10.885068,-3.50766 -13.2572,-7.61584 -1.266603,-1.79454 -3.772419,-2.43291 -3.807919,0 v 11.2332 c 0,4.51309 -1.645397,8.41504 -4.936191,11.70583 -3.196772,3.19677 -7.098714,4.79516 -11.705826,4.79516 -4.513089,0 -8.415031,-1.59839 -11.705825,-4.79516 -3.196772,-3.29079 -4.795158,-7.19274 -4.795158,-11.70583 v -61.7729 c 0,-3.47884 0.987238,-6.6286 2.961715,-9.44928 2.068499,-2.91471 4.701135,-4.9362 7.897906,-6.06447 1.786431,-0.65816 3.666885,-0.98724 5.641362,-0.98724 5.077225,0 9.308247,1.97448 12.693064,5.92343 1.786431,1.97448 2.820681,3.00873 3.102749,3.10275 0,0 13.408119,16.21319 13.78421,16.49526 0.376091,0.28206 1.480789,2.43848 4.127113,2.43848 2.646324,0 3.89218,-2.15642 4.26827,-2.43848 0.376091,-0.28207 13.784088,-16.49526 13.784088,-16.49526 0.09402,0.094 1.081261,-0.94022 2.961715,-3.10275 3.478837,-3.94895 7.756866,-5.92343 12.834096,-5.92343 1.88045,0 3.76091,0.32908 5.64136,0.98724 3.19677,1.12827 5.7824,3.14976 7.75688,6.06447 2.06849,2.82068 3.10274,5.97044 3.10274,9.44928 v 61.7729 c 0,4.51309 -1.6454,8.41504 -4.93619,11.70583 -3.19677,3.19677 -7.09871,4.79516 -11.70582,4.79516 -4.51309,0 -8.41504,-1.59839 -11.705828,-4.79516 -3.196772,-3.29079 -4.795158,-7.19274 -4.795158,-11.70583 v -11.2332 c -0.277898,-3.06563 -2.987588,-1.13379 -3.948953,0 -2.538613,4.70114 -7.401781,7.59567 -13.2572,7.61584 z" />
<path
inkscape:connector-curvature="0"
id="path5212"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';fill:#ffffff;fill-opacity:1;stroke-width:0.28950602px"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';fill-opacity:1;stroke-width:0.28950602px"
d="m 145.83461,185.00361 q -5.92343,0 -10.15445,-4.08999 -4.08999,-4.23102 -4.08999,-10.15445 0,-5.92343 4.08999,-10.01342 4.23102,-4.23102 10.15445,-4.23102 5.92343,0 10.15445,4.23102 4.23102,4.08999 4.23102,10.01342 0,5.92343 -4.23102,10.15445 -4.23102,4.08999 -10.15445,4.08999 z m 0.14103,2.82068 q 5.92343,0 10.01342,4.23102 4.23102,4.23102 4.23102,10.15445 v 34.83541 q 0,5.92343 -4.23102,10.15445 -4.08999,4.08999 -10.01342,4.08999 -5.92343,0 -10.15445,-4.08999 -4.23102,-4.23102 -4.23102,-10.15445 v -34.83541 q 0,-5.92343 4.23102,-10.15445 4.23102,-4.23102 10.15445,-4.23102 z" />
</g>
</g>
diff --git a/src/client/app/desktop/script.ts b/src/client/app/desktop/script.ts
index 8b184a4aae..05aa928fa3 100644
--- a/src/client/app/desktop/script.ts
+++ b/src/client/app/desktop/script.ts
@@ -29,7 +29,6 @@ import MkUser from './views/pages/user/user.vue';
import MkFavorites from './views/pages/favorites.vue';
import MkSelectDrive from './views/pages/selectdrive.vue';
import MkDrive from './views/pages/drive.vue';
-import MkUserList from './views/pages/user-list.vue';
import MkHomeCustomize from './views/pages/home-customize.vue';
import MkMessagingRoom from './views/pages/messaging-room.vue';
import MkNote from './views/pages/note.vue';
@@ -63,7 +62,6 @@ init(async (launch) => {
{ path: '/i/messaging/:user', component: MkMessagingRoom },
{ path: '/i/drive', component: MkDrive },
{ path: '/i/drive/folder/:folder', component: MkDrive },
- { path: '/i/lists/:list', component: MkUserList },
{ path: '/selectdrive', component: MkSelectDrive },
{ path: '/search', component: MkSearch },
{ path: '/tags/:tag', component: MkTag },
diff --git a/src/client/app/desktop/style.styl b/src/client/app/desktop/style.styl
index 3cd36482e4..96481a9808 100644
--- a/src/client/app/desktop/style.styl
+++ b/src/client/app/desktop/style.styl
@@ -1,8 +1,6 @@
@import "../app"
@import "../reset"
-@import "./ui"
-
*::input-placeholder
color #D8CBC5
@@ -11,34 +9,21 @@
html
height 100%
- background #f7f7f7
+ background var(--bg)
&, *
&::-webkit-scrollbar
width 6px
height 6px
+ &::-webkit-scrollbar-track
+ background var(--scrollbarTrack)
+
&::-webkit-scrollbar-thumb
- background rgba(0, 0, 0, 0.2)
+ background var(--scrollbarHandle)
&:hover
- background rgba(0, 0, 0, 0.4)
+ background var(--scrollbarHandleHover)
&:active
- background $theme-color
-
- &[data-darkmode]
- background #191B22
-
- &, *
- &::-webkit-scrollbar-track
- background-color #282C37
-
- &::-webkit-scrollbar-thumb
- background-color #454954
-
- &:hover
- background-color #535660
-
- &:active
- background-color $theme-color
+ background var(--primary)
diff --git a/src/client/app/desktop/ui.styl b/src/client/app/desktop/ui.styl
deleted file mode 100644
index b66c8f4025..0000000000
--- a/src/client/app/desktop/ui.styl
+++ /dev/null
@@ -1,181 +0,0 @@
-@import "../../const"
-
-button
- font-family sans-serif
-
- *
- pointer-events none
-
-button.ui
-.button.ui
- display inline-block
- cursor pointer
- padding 0 14px
- margin 0
- min-width 100px
- line-height 38px
- font-size 14px
- color #888
- text-decoration none
- background linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%)
- border solid 1px #e2e2e2
- border-radius 4px
- outline none
-
- &.block
- display block
-
- &:focus
- &:after
- content ""
- pointer-events none
- position absolute
- top -5px
- right -5px
- bottom -5px
- left -5px
- border 2px solid rgba($theme-color, 0.3)
- border-radius 8px
-
- &:disabled
- opacity 0.7
- cursor default
-
- &:hover
- background linear-gradient(to bottom, #f9f9f9 0%, #ececec 100%)
- border-color #dcdcdc
-
- &:active
- background #ececec
- border-color #dcdcdc
-
- &.primary
- color $theme-color-foreground
- background linear-gradient(to bottom, lighten($theme-color, 25%) 0%, lighten($theme-color, 10%) 100%)
- border solid 1px lighten($theme-color, 15%)
-
- &:not(:disabled)
- font-weight bold
-
- &:hover:not(:disabled)
- background linear-gradient(to bottom, lighten($theme-color, 8%) 0%, darken($theme-color, 8%) 100%)
- border-color $theme-color
-
- &:active:not(:disabled)
- background $theme-color
- border-color $theme-color
-
-input:not([type]).ui
-input[type='text'].ui
-input[type='password'].ui
-input[type='email'].ui
-input[type='date'].ui
-input[type='number'].ui
-textarea.ui
- display block
- padding 10px
- width 100%
- height 40px
- font-family sans-serif
- font-size 16px
- color #55595c
- border solid 1px #dadada
- border-radius 4px
-
- &:hover
- border-color #b0b0b0
-
- &:focus
- border-color $theme-color
-
-textarea.ui
- min-width 100%
- max-width 100%
- min-height 64px
-
-.ui.info
- display block
- margin 1em 0
- padding 0 1em
- font-size 90%
- color rgba(#000, 0.87)
- background #f8f8f9
- border solid 1px rgba(34, 36, 38, 0.22)
- border-radius 4px
-
- > p
- opacity 0.8
-
- > [data-fa]:first-child
- margin-right 0.25em
-
- &.warn
- color #573a08
- background #FFFAF3
- border-color #C9BA9B
-
-.ui.from.group
- display block
- margin 16px 0
-
- > p:first-child
- margin 0 0 6px 0
- font-size 90%
- font-weight bold
- color rgba(#373a3c, 0.9)
-
-html[data-darkmode]
- button.ui
- .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
-
- &.primary
- color $theme-color-foreground
- background linear-gradient(to bottom, lighten($theme-color, 25%) 0%, lighten($theme-color, 10%) 100%)
- border solid 1px lighten($theme-color, 15%)
-
- &:hover:not(:disabled)
- background linear-gradient(to bottom, lighten($theme-color, 8%) 0%, darken($theme-color, 8%) 100%)
- border-color $theme-color
-
- &:active:not(:disabled)
- background $theme-color
- border-color $theme-color
-
- input:not([type]).ui
- input[type='text'].ui
- input[type='password'].ui
- input[type='email'].ui
- input[type='date'].ui
- input[type='number'].ui
- textarea.ui
- display block
- padding 10px
- width 100%
- height 40px
- font-family sans-serif
- font-size 16px
- color #dee4e8
- background #191b22
- border solid 1px #495156
- border-radius 4px
-
- &:hover
- border-color #b0b0b0
-
- &:focus
- border-color $theme-color
-
- .ui.from.group
- > p:first-child
- color #c0c7cc
diff --git a/src/client/app/desktop/views/components/calendar.vue b/src/client/app/desktop/views/components/calendar.vue
index e71983f821..e2f1329b3b 100644
--- a/src/client/app/desktop/views/components/calendar.vue
+++ b/src/client/app/desktop/views/components/calendar.vue
@@ -128,11 +128,9 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
- color isDark ? #c5ced6 : #777
- background isDark ? #282C37 : #fff
+.mk-calendar
+ color var(--calendarDay)
+ background var(--face)
box-shadow var(--shadow)
border-radius var(--round)
overflow hidden
@@ -149,12 +147,10 @@ root(isDark)
line-height 42px
font-size 0.9em
font-weight bold
- color isDark ? #c5ced6 : #888
+ color var(--faceHeaderText)
+ background var(--faceHeader)
box-shadow 0 1px rgba(#000, 0.07)
- if isDark
- background #313543
-
> [data-fa]
margin-right 4px
@@ -166,13 +162,13 @@ root(isDark)
width 42px
font-size 0.9em
line-height 42px
- color isDark ? #9baec8 : #ccc
+ color var(--faceTextButton)
&:hover
- color isDark ? #b2c1d5 : #aaa
+ color var(--faceTextButtonHover)
&:active
- color isDark ? #b2c1d5 : #999
+ color var(--faceTextButtonActive)
&:first-of-type
left 0
@@ -195,65 +191,56 @@ root(isDark)
font-size 14px
&.weekday
- color isDark ? #43d5dc : #19a2a9
+ color var(--calendarWeek)
&[data-is-donichi]
- color isDark ? #ff6679 : #ef95a0
+ color var(--calendarSaturdayOrSunday)
&[data-today]
- box-shadow 0 0 0 1px isDark ? #43d5dc : #19a2a9 inset
+ box-shadow 0 0 0 1px var(--calendarWeek) inset
border-radius 6px
&[data-is-donichi]
- box-shadow 0 0 0 1px isDark ? #ff6679 : #ef95a0 inset
+ box-shadow 0 0 0 1px var(--calendarSaturdayOrSunday) inset
&.day
cursor pointer
- color isDark ? #c5ced6 : #777
+ color var(--calendarDay)
> div
border-radius 6px
&:hover > div
- background rgba(#000, isDark ? 0.1 : 0.025)
+ background var(--faceClearButtonHover)
&:active > div
- background rgba(#000, isDark ? 0.2 : 0.05)
+ background var(--faceClearButtonActive)
&[data-is-donichi]
- color isDark ? #ff6679 : #ef95a0
+ color var(--calendarSaturdayOrSunday)
&[data-is-out-of-range]
cursor default
- color rgba(isDark ? #c5ced6 : #777, 0.5)
-
- &[data-is-donichi]
- color rgba(isDark ? #ff6679 : #ef95a0, 0.5)
+ opacity 0.5
&[data-selected]
font-weight bold
> div
- background rgba(#000, isDark ? 0.1 : 0.025)
+ background var(--faceClearButtonHover)
&:active > div
- background rgba(#000, isDark ? 0.2 : 0.05)
+ background var(--faceClearButtonActive)
&[data-today]
> div
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
&:hover > div
- background lighten($theme-color, 10%)
+ background var(--primaryLighten10)
&:active > div
- background darken($theme-color, 10%)
-
-.mk-calendar[data-darkmode]
- root(true)
-
-.mk-calendar:not([data-darkmode])
- root(false)
+ background var(--primaryDarken10)
</style>
diff --git a/src/client/app/desktop/views/components/charts.vue b/src/client/app/desktop/views/components/charts.vue
index e401095363..6d6f3a3596 100644
--- a/src/client/app/desktop/views/components/charts.vue
+++ b/src/client/app/desktop/views/components/charts.vue
@@ -649,7 +649,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.gkgckalzgidaygcxnugepioremxvxvpt
padding 32px
@@ -675,7 +675,7 @@ export default Vue.extend({
*
&:not(.active)
- color $theme-color
+ color var(--primary)
cursor pointer
> div
diff --git a/src/client/app/desktop/views/components/choose-file-from-drive-window.vue b/src/client/app/desktop/views/components/choose-file-from-drive-window.vue
index 933d31f299..806f7f5c3f 100644
--- a/src/client/app/desktop/views/components/choose-file-from-drive-window.vue
+++ b/src/client/app/desktop/views/components/choose-file-from-drive-window.vue
@@ -59,7 +59,7 @@ export default Vue.extend({
</script>
<style lang="stylus" module>
-@import '~const.styl'
+
.title
> [data-fa]
@@ -74,7 +74,7 @@ export default Vue.extend({
.footer
height 72px
- background lighten($theme-color, 95%)
+ background var(--primaryLighten95)
.upload
display inline-block
@@ -87,7 +87,7 @@ export default Vue.extend({
width 40px
height 40px
font-size 1em
- color rgba($theme-color, 0.5)
+ color var(--primaryAlpha05)
background transparent
outline none
border solid 1px transparent
@@ -95,13 +95,13 @@ export default Vue.extend({
&:hover
background transparent
- border-color rgba($theme-color, 0.3)
+ border-color var(--primaryAlpha03)
&:active
- color rgba($theme-color, 0.6)
+ color var(--primaryAlpha06)
background transparent
- border-color rgba($theme-color, 0.5)
- box-shadow 0 2px 4px rgba(darken($theme-color, 50%), 0.15) inset
+ border-color var(--primaryAlpha05)
+ //box-shadow 0 2px 4px rgba(var(--primaryDarken50), 0.15) inset
&:focus
&:after
@@ -112,7 +112,7 @@ export default Vue.extend({
right -5px
bottom -5px
left -5px
- border 2px solid rgba($theme-color, 0.3)
+ border 2px solid var(--primaryAlpha03)
border-radius 8px
.ok
@@ -138,7 +138,7 @@ export default Vue.extend({
right -5px
bottom -5px
left -5px
- border 2px solid rgba($theme-color, 0.3)
+ border 2px solid var(--primaryAlpha03)
border-radius 8px
&:disabled
@@ -147,20 +147,20 @@ export default Vue.extend({
.ok
right 16px
- color $theme-color-foreground
- background linear-gradient(to bottom, lighten($theme-color, 25%) 0%, lighten($theme-color, 10%) 100%)
- border solid 1px lighten($theme-color, 15%)
+ color var(--primaryForeground)
+ background linear-gradient(to bottom, var(--primaryLighten25) 0%, var(--primaryLighten10) 100%)
+ border solid 1px var(--primaryLighten15)
&:not(:disabled)
font-weight bold
&:hover:not(:disabled)
- background linear-gradient(to bottom, lighten($theme-color, 8%) 0%, darken($theme-color, 8%) 100%)
- border-color $theme-color
+ background linear-gradient(to bottom, var(--primaryLighten8) 0%, var(--primaryDarken8) 100%)
+ border-color var(--primary)
&:active:not(:disabled)
- background $theme-color
- border-color $theme-color
+ background var(--primary)
+ border-color var(--primary)
.cancel
right 148px
diff --git a/src/client/app/desktop/views/components/choose-folder-from-drive-window.vue b/src/client/app/desktop/views/components/choose-folder-from-drive-window.vue
index 03d6fd1636..b970218e58 100644
--- a/src/client/app/desktop/views/components/choose-folder-from-drive-window.vue
+++ b/src/client/app/desktop/views/components/choose-folder-from-drive-window.vue
@@ -37,7 +37,7 @@ export default Vue.extend({
</script>
<style lang="stylus" module>
-@import '~const.styl'
+
.title
> [data-fa]
@@ -48,7 +48,7 @@ export default Vue.extend({
.footer
height 72px
- background lighten($theme-color, 95%)
+ background var(--primaryLighten95)
.ok
.cancel
@@ -73,7 +73,7 @@ export default Vue.extend({
right -5px
bottom -5px
left -5px
- border 2px solid rgba($theme-color, 0.3)
+ border 2px solid var(--primaryAlpha03)
border-radius 8px
&:disabled
@@ -82,20 +82,20 @@ export default Vue.extend({
.ok
right 16px
- color $theme-color-foreground
- background linear-gradient(to bottom, lighten($theme-color, 25%) 0%, lighten($theme-color, 10%) 100%)
- border solid 1px lighten($theme-color, 15%)
+ color var(--primaryForeground)
+ background linear-gradient(to bottom, var(--primaryLighten25) 0%, var(--primaryLighten10) 100%)
+ border solid 1px var(--primaryLighten15)
&:not(:disabled)
font-weight bold
&:hover:not(:disabled)
- background linear-gradient(to bottom, lighten($theme-color, 8%) 0%, darken($theme-color, 8%) 100%)
- border-color $theme-color
+ background linear-gradient(to bottom, var(--primaryLighten8) 0%, var(--primaryDarken8) 100%)
+ border-color var(--primary)
&:active:not(:disabled)
- background $theme-color
- border-color $theme-color
+ background var(--primary)
+ border-color var(--primary)
.cancel
right 148px
diff --git a/src/client/app/desktop/views/components/context-menu.menu.vue b/src/client/app/desktop/views/components/context-menu.menu.vue
index e7deec675e..9e4541a752 100644
--- a/src/client/app/desktop/views/components/context-menu.menu.vue
+++ b/src/client/app/desktop/views/components/context-menu.menu.vue
@@ -31,9 +31,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.menu
$width = 240px
$item-height = 38px
$padding = 10px
@@ -48,7 +46,7 @@ root(isDark)
&.divider
margin-top $padding
padding-top $padding
- border-top solid 1px isDark ? #1c2023 : #eee
+ border-top solid 1px var(--faceDivider)
&.nest
> p
@@ -69,7 +67,7 @@ root(isDark)
&:active
> p, a
- background $theme-color
+ background var(--primary)
> p, a
display block
@@ -77,7 +75,7 @@ root(isDark)
margin 0
padding 0 32px 0 38px
line-height $item-height
- color isDark ? #c8cece : #868C8C
+ color var(--text)
text-decoration none
cursor pointer
@@ -90,14 +88,14 @@ root(isDark)
&:hover
> p, a
text-decoration none
- background $theme-color
- color $theme-color-foreground
+ background var(--primary)
+ color var(--primaryForeground)
&:active
> p, a
text-decoration none
- background darken($theme-color, 10%)
- color $theme-color-foreground
+ background var(--primaryDarken10)
+ color var(--primaryForeground)
li > ul
visibility hidden
@@ -106,17 +104,11 @@ root(isDark)
left $width
margin-top -($padding)
width $width
- background isDark ? #282c37 :#fff
+ background var(--popupBg)
border-radius 0 4px 4px 4px
box-shadow 2px 2px 8px rgba(#000, 0.2)
transition visibility 0s linear 0.2s
-.menu[data-darkmode]
- root(true)
-
-.menu:not([data-darkmode])
- root(false)
-
</style>
<style lang="stylus" module>
diff --git a/src/client/app/desktop/views/components/context-menu.vue b/src/client/app/desktop/views/components/context-menu.vue
index 49aeac143f..b0a34866cd 100644
--- a/src/client/app/desktop/views/components/context-menu.vue
+++ b/src/client/app/desktop/views/components/context-menu.vue
@@ -71,7 +71,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.context-menu
$width = 240px
$item-height = 38px
$padding = 10px
@@ -82,15 +82,9 @@ root(isDark)
z-index 4096
width $width
font-size 0.8em
- background isDark ? #282c37 : #fff
+ background var(--popupBg)
border-radius 0 4px 4px 4px
box-shadow 2px 2px 8px rgba(#000, 0.2)
opacity 0
-.context-menu[data-darkmode]
- root(true)
-
-.context-menu:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/crop-window.vue b/src/client/app/desktop/views/components/crop-window.vue
index 4fa258549f..629c3b013a 100644
--- a/src/client/app/desktop/views/components/crop-window.vue
+++ b/src/client/app/desktop/views/components/crop-window.vue
@@ -61,7 +61,7 @@ export default Vue.extend({
</script>
<style lang="stylus" module>
-@import '~const.styl'
+
.header
> [data-fa]
@@ -73,7 +73,7 @@ export default Vue.extend({
.actions
height 72px
- background lighten($theme-color, 95%)
+ background var(--primaryLighten95)
.ok
.cancel
@@ -98,7 +98,7 @@ export default Vue.extend({
right -5px
bottom -5px
left -5px
- border 2px solid rgba($theme-color, 0.3)
+ border 2px solid var(--primaryAlpha03)
border-radius 8px
&:disabled
@@ -111,20 +111,20 @@ export default Vue.extend({
.ok
right 16px
- color $theme-color-foreground
- background linear-gradient(to bottom, lighten($theme-color, 25%) 0%, lighten($theme-color, 10%) 100%)
- border solid 1px lighten($theme-color, 15%)
+ color var(--primaryForeground)
+ background linear-gradient(to bottom, var(--primaryLighten25) 0%, var(--primaryLighten10) 100%)
+ border solid 1px var(--primaryLighten15)
&:not(:disabled)
font-weight bold
&:hover:not(:disabled)
- background linear-gradient(to bottom, lighten($theme-color, 8%) 0%, darken($theme-color, 8%) 100%)
- border-color $theme-color
+ background linear-gradient(to bottom, var(--primaryLighten8) 0%, var(--primaryDarken8) 100%)
+ border-color var(--primary)
&:active:not(:disabled)
- background $theme-color
- border-color $theme-color
+ background var(--primary)
+ border-color var(--primary)
.cancel
.skip
@@ -155,11 +155,11 @@ export default Vue.extend({
}
.cropper-view-box {
- outline-color: $theme-color;
+ outline-color: var(--primary);
}
.cropper-line, .cropper-point {
- background-color: $theme-color;
+ background-color: var(--primary);
}
.cropper-bg {
diff --git a/src/client/app/desktop/views/components/dialog.vue b/src/client/app/desktop/views/components/dialog.vue
index bbb1e0030c..baa6f911fe 100644
--- a/src/client/app/desktop/views/components/dialog.vue
+++ b/src/client/app/desktop/views/components/dialog.vue
@@ -91,7 +91,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.mk-dialog
> .bg
@@ -144,20 +144,20 @@ export default Vue.extend({
margin 0 0.375em
&:hover
- color $theme-color
+ color var(--primary)
&:active
- color darken($theme-color, 10%)
+ color var(--primaryDarken10)
transition color 0s ease
</style>
<style lang="stylus" module>
-@import '~const.styl'
+
.header
margin 1em 0
- color $theme-color
+ color var(--primary)
// color #43A4EC
font-weight bold
diff --git a/src/client/app/desktop/views/components/drive.file.vue b/src/client/app/desktop/views/components/drive.file.vue
index 3ac8923c51..d7e24cfe71 100644
--- a/src/client/app/desktop/views/components/drive.file.vue
+++ b/src/client/app/desktop/views/components/drive.file.vue
@@ -200,9 +200,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.gvfdktuvdgwhmztnuekzkswkjygptfcv
padding 8px 0 0 0
height 180px
border-radius 4px
@@ -237,13 +235,13 @@ root(isDark)
background #ce2212
&[data-is-selected]
- background $theme-color
+ background var(--primary)
&:hover
- background lighten($theme-color, 10%)
+ background var(--primaryLighten10)
&:active
- background darken($theme-color, 10%)
+ background var(--primaryDarken10)
> .label
&:before
@@ -251,7 +249,7 @@ root(isDark)
display none
> .name
- color $theme-color-foreground
+ color var(--primaryForeground)
&[data-is-contextmenu-showing]
&:after
@@ -262,7 +260,7 @@ root(isDark)
right -4px
bottom -4px
left -4px
- border 2px dashed rgba($theme-color, 0.3)
+ border 2px dashed var(--primaryAlpha03)
border-radius 4px
> .label
@@ -337,16 +335,10 @@ root(isDark)
font-size 0.8em
text-align center
word-break break-all
- color isDark ? #fff : #444
+ color var(--text)
overflow hidden
> .ext
opacity 0.5
-.gvfdktuvdgwhmztnuekzkswkjygptfcv[data-darkmode]
- root(true)
-
-.gvfdktuvdgwhmztnuekzkswkjygptfcv:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/drive.folder.vue b/src/client/app/desktop/views/components/drive.folder.vue
index e6b71f9426..cfc2b64ff4 100644
--- a/src/client/app/desktop/views/components/drive.folder.vue
+++ b/src/client/app/desktop/views/components/drive.folder.vue
@@ -214,12 +214,10 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.ynntpczxvnusfwdyxsfuhvcmuypqopdd
padding 8px
height 64px
- background isDark ? rgba($theme-color, 0.2) : lighten($theme-color, 95%)
+ background var(--desktopDriveFolderBg)
border-radius 4px
&, *
@@ -229,10 +227,10 @@ root(isDark)
pointer-events none
&:hover
- background isDark ? rgba(lighten($theme-color, 10%), 0.2) : lighten($theme-color, 90%)
+ background var(--desktopDriveFolderHoverBg)
&:active
- background isDark ? rgba(darken($theme-color, 10%), 0.2) : lighten($theme-color, 85%)
+ background var(--desktopDriveFolderActiveBg)
&[data-is-contextmenu-showing]
&[data-draghover]
@@ -244,26 +242,20 @@ root(isDark)
right -4px
bottom -4px
left -4px
- border 2px dashed rgba($theme-color, 0.3)
+ border 2px dashed var(--primaryAlpha03)
border-radius 4px
&[data-draghover]
- background isDark ? rgba(darken($theme-color, 10%), 0.2) : lighten($theme-color, 90%)
+ background var(--desktopDriveFolderActiveBg)
> .name
margin 0
font-size 0.9em
- color isDark ? #fff : darken($theme-color, 30%)
+ color var(--desktopDriveFolderFg)
> [data-fa]
margin-right 4px
margin-left 2px
text-align left
-.ynntpczxvnusfwdyxsfuhvcmuypqopdd[data-darkmode]
- root(true)
-
-.ynntpczxvnusfwdyxsfuhvcmuypqopdd:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/drive.vue b/src/client/app/desktop/views/components/drive.vue
index cb289027d4..f9b7eea64e 100644
--- a/src/client/app/desktop/views/components/drive.vue
+++ b/src/client/app/desktop/views/components/drive.vue
@@ -585,18 +585,15 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
-
+.mk-drive
> nav
display block
z-index 2
width 100%
overflow auto
font-size 0.9em
- color isDark ? #d2d9dc : #555
- background isDark ? #282c37 : #fff
+ color var(--text)
+ background var(--face)
box-shadow 0 1px 0 rgba(#000, 0.05)
&, *
@@ -674,7 +671,7 @@ root(isDark)
padding 8px
height calc(100% - 38px)
overflow auto
- background isDark ? #191b22 : #fff
+ background var(--desktopDriveBg)
&, *
user-select none
@@ -697,8 +694,8 @@ root(isDark)
z-index 128
top 0
left 0
- border solid 1px $theme-color
- background rgba($theme-color, 0.5)
+ border solid 1px var(--primary)
+ background var(--primaryAlpha05)
pointer-events none
> .contents
@@ -769,7 +766,7 @@ root(isDark)
top 38px
width 100%
height calc(100% - 38px)
- border dashed 2px rgba($theme-color, 0.5)
+ border dashed 2px var(--primaryAlpha05)
pointer-events none
> .mk-uploader
@@ -780,10 +777,4 @@ root(isDark)
> input
display none
-.mk-drive[data-darkmode]
- root(true)
-
-.mk-drive:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/follow-button.vue b/src/client/app/desktop/views/components/follow-button.vue
index 1db4b0cfa4..45e63ad928 100644
--- a/src/client/app/desktop/views/components/follow-button.vue
+++ b/src/client/app/desktop/views/components/follow-button.vue
@@ -101,9 +101,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-follow-button
display block
cursor pointer
padding 0
@@ -126,37 +124,34 @@ root(isDark)
right -5px
bottom -5px
left -5px
- border 2px solid rgba($theme-color, 0.3)
+ border 2px solid var(--primaryAlpha03)
border-radius 8px
&:not(.active)
- color isDark ? #fff : #888
- background isDark ? linear-gradient(to bottom, #313543 0%, #282c37 100%) : linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%)
- border solid 1px isDark ? #1c2023 : #e2e2e2
+ color var(--primary)
+ border solid 1px var(--primary)
&:hover
- background isDark ? linear-gradient(to bottom, #2c2f3c 0%, #22262f 100%) : linear-gradient(to bottom, #f9f9f9 0%, #ececec 100%)
- border-color isDark ? #151a1d : #dcdcdc
+ background var(--primaryAlpha03)
&:active
- background isDark ? #22262f : #ececec
- border-color isDark ? #151a1d : #dcdcdc
+ background var(--primaryAlpha05)
&.active
- color $theme-color-foreground
- background linear-gradient(to bottom, lighten($theme-color, 25%) 0%, lighten($theme-color, 10%) 100%)
- border solid 1px lighten($theme-color, 15%)
+ color var(--primaryForeground)
+ background var(--primary)
+ border solid 1px var(--primary)
&:not(:disabled)
font-weight bold
&:hover:not(:disabled)
- background linear-gradient(to bottom, lighten($theme-color, 8%) 0%, darken($theme-color, 8%) 100%)
- border-color $theme-color
+ background var(--primaryLighten5)
+ border-color var(--primaryLighten5)
&:active:not(:disabled)
- background $theme-color
- border-color $theme-color
+ background var(--primaryDarken5)
+ border-color var(--primaryDarken5)
&.wait
cursor wait !important
@@ -167,10 +162,4 @@ root(isDark)
height 38px
line-height 38px
-.mk-follow-button[data-darkmode]
- root(true)
-
-.mk-follow-button:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/home.vue b/src/client/app/desktop/views/components/home.vue
index c9b868422e..bdaf2ddf47 100644
--- a/src/client/app/desktop/views/components/home.vue
+++ b/src/client/app/desktop/views/components/home.vue
@@ -247,9 +247,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-home
display block
&[data-customize]
@@ -279,8 +277,8 @@ root(isDark)
left 0
width 100%
height 48px
- color isDark ? #fff : #000
- background isDark ? #313543 : #f7f7f7
+ color var(--text)
+ background var(--desktopHeaderBg)
box-shadow 0 1px 1px rgba(#000, 0.075)
> a
@@ -292,15 +290,15 @@ root(isDark)
padding 0 16px
line-height 48px
text-decoration none
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
transition background 0.1s ease
&:hover
- background lighten($theme-color, 10%)
+ background var(--primaryLighten10)
&:active
- background darken($theme-color, 10%)
+ background var(--primaryDarken10)
transition background 0s ease
> [data-fa]
@@ -320,7 +318,7 @@ root(isDark)
line-height 48px
&.trash
- border-left solid 1px isDark ? #1c2023 : #ddd
+ border-left solid 1px var(--faceDivider)
> div
width 100%
@@ -395,10 +393,4 @@ root(isDark)
max-width 700px
margin 0 auto
-.mk-home[data-darkmode]
- root(true)
-
-.mk-home:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/input-dialog.vue b/src/client/app/desktop/views/components/input-dialog.vue
index cf7c09ea56..976e897fe8 100644
--- a/src/client/app/desktop/views/components/input-dialog.vue
+++ b/src/client/app/desktop/views/components/input-dialog.vue
@@ -76,7 +76,7 @@ export default Vue.extend({
<style lang="stylus" module>
-@import '~const.styl'
+
.header
> [data-fa]
@@ -96,25 +96,25 @@ export default Vue.extend({
color #333
background #fff
outline none
- border solid 1px rgba($theme-color, 0.1)
+ border solid 1px var(--primaryAlpha01)
border-radius 4px
transition border-color .3s ease
&:hover
- border-color rgba($theme-color, 0.2)
+ border-color var(--primaryAlpha02)
transition border-color .1s ease
&:focus
- color $theme-color
- border-color rgba($theme-color, 0.5)
+ color var(--primary)
+ border-color var(--primaryAlpha05)
transition border-color 0s ease
&::-webkit-input-placeholder
- color rgba($theme-color, 0.3)
+ color var(--primaryAlpha03)
.actions
height 72px
- background lighten($theme-color, 95%)
+ background var(--primaryLighten95)
.ok
.cancel
@@ -139,7 +139,7 @@ export default Vue.extend({
right -5px
bottom -5px
left -5px
- border 2px solid rgba($theme-color, 0.3)
+ border 2px solid var(--primaryAlpha03)
border-radius 8px
&:disabled
@@ -148,20 +148,20 @@ export default Vue.extend({
.ok
right 16px
- color $theme-color-foreground
- background linear-gradient(to bottom, lighten($theme-color, 25%) 0%, lighten($theme-color, 10%) 100%)
- border solid 1px lighten($theme-color, 15%)
+ color var(--primaryForeground)
+ background linear-gradient(to bottom, var(--primaryLighten25) 0%, var(--primaryLighten10) 100%)
+ border solid 1px var(--primaryLighten15)
&:not(:disabled)
font-weight bold
&:hover:not(:disabled)
- background linear-gradient(to bottom, lighten($theme-color, 8%) 0%, darken($theme-color, 8%) 100%)
- border-color $theme-color
+ background linear-gradient(to bottom, var(--primaryLighten8) 0%, var(--primaryDarken8) 100%)
+ border-color var(--primary)
&:active:not(:disabled)
- background $theme-color
- border-color $theme-color
+ background var(--primary)
+ border-color var(--primary)
.cancel
right 148px
diff --git a/src/client/app/desktop/views/components/note-detail.vue b/src/client/app/desktop/views/components/note-detail.vue
index 80faae0d42..0c4b560e98 100644
--- a/src/client/app/desktop/views/components/note-detail.vue
+++ b/src/client/app/desktop/views/components/note-detail.vue
@@ -225,12 +225,10 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-note-detail
overflow hidden
text-align left
- background isDark ? #282C37 : #fff
+ background var(--face)
box-shadow var(--shadow)
border-radius var(--round)
@@ -243,28 +241,28 @@ root(isDark)
text-align center
color #999
cursor pointer
- background isDark ? #21242d : #fafafa
+ background var(--subNoteBg)
outline none
border none
- border-bottom solid 1px isDark ? #1c2023 : #eef0f2
- border-radius 6px 6px 0 0
+ border-bottom solid 1px var(--faceDivider)
+ border-radius var(--round) var(--round) 0 0
&:hover
- background isDark ? #2e3440 : #f6f6f6
+ box-shadow 0 0 0 100px inset rgba(0, 0, 0, 0.05)
&:active
- background isDark ? #21242b : #f0f0f0
+ box-shadow 0 0 0 100px inset rgba(0, 0, 0, 0.1)
&:disabled
- color isDark ? #21242b : #ccc
+ cursor wait
> .conversation
> *
- border-bottom 1px solid isDark ? #1c2023 : #eef0f2
+ border-bottom 1px solid var(--faceDivider)
> .renote
- color #9dbb00
- background isDark ? linear-gradient(to bottom, #314027 0%, #282c37 100%) : linear-gradient(to bottom, #edfde2 0%, #fff 100%)
+ color var(--renoteText)
+ background linear-gradient(to bottom, var(--renoteGradient) 0%, var(--face) 100%)
> p
margin 0
@@ -287,7 +285,7 @@ root(isDark)
padding-top 8px
> .reply-to
- border-bottom 1px solid isDark ? #1c2023 : #eef0f2
+ border-bottom 1px solid var(--faceDivider)
> article
padding 28px 32px 18px 32px
@@ -299,7 +297,7 @@ root(isDark)
&:hover
> footer > button
- color isDark ? #707b97 : #888
+ color var(--noteActionsHighlighted)
> .avatar
width 60px
@@ -316,7 +314,7 @@ root(isDark)
display inline-block
margin 0
line-height 24px
- color isDark ? #fff : #627079
+ color var(--noteHeaderName)
font-size 18px
font-weight 700
text-align left
@@ -329,14 +327,14 @@ root(isDark)
display block
text-align left
margin 0
- color isDark ? #606984 : #ccc
+ color var(--noteHeaderAcct)
> .time
position absolute
top 0
right 32px
font-size 1em
- color isDark ? #606984 : #c0c0c0
+ color var(--noteHeaderInfo)
> .body
padding 8px 0
@@ -347,7 +345,7 @@ root(isDark)
margin 0
padding 0
overflow-wrap break-word
- color isDark ? #fff : #717171
+ color var(--noteText)
> .text
margin-right 8px
@@ -360,14 +358,14 @@ root(isDark)
padding 0
overflow-wrap break-word
font-size 1.5em
- color isDark ? #fff : #717171
+ color var(--noteText)
> .renote
margin 8px 0
> *
padding 16px
- border dashed 1px #c0dac6
+ border dashed 1px var(--quoteBorder)
border-radius 8px
> .location
@@ -394,20 +392,20 @@ root(isDark)
background transparent
border none
font-size 1em
- color isDark ? #606984 : #ccc
+ color var(--noteActions)
cursor pointer
&:hover
- color isDark ? #a1a8bf : #444
+ color var(--noteActionsHover)
&.replyButton:hover
- color #0af
+ color var(--noteActionsReplyHover)
&.renoteButton:hover
- color #8d0
+ color var(--noteActionsRenoteHover)
&.reactionButton:hover
- color #fa0
+ color var(--noteActionsReactionHover)
> .count
display inline
@@ -415,16 +413,10 @@ root(isDark)
color #999
&.reacted, &.reacted:hover
- color #fa0
+ color var(--noteActionsReactionHover)
> .replies
> *
- border-top 1px solid isDark ? #1c2023 : #eef0f2
-
-.mk-note-detail[data-darkmode]
- root(true)
-
-.mk-note-detail:not([data-darkmode])
- root(false)
+ border-top 1px solid var(--faceDivider)
</style>
diff --git a/src/client/app/desktop/views/components/note-preview.vue b/src/client/app/desktop/views/components/note-preview.vue
index 6c84165356..4c1c7e7b2d 100644
--- a/src/client/app/desktop/views/components/note-preview.vue
+++ b/src/client/app/desktop/views/components/note-preview.vue
@@ -47,7 +47,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.qiziqtywpuaucsgarwajitwaakggnisj
display flex
font-size 0.9em
@@ -71,7 +71,7 @@ root(isDark)
margin 0
padding 0
overflow-wrap break-word
- color isDark ? #fff : #717171
+ color var(--noteText)
> .text
margin-right 8px
@@ -81,12 +81,6 @@ root(isDark)
cursor default
margin 0
padding 0
- color isDark ? #959ba7 : #717171
-
-.qiziqtywpuaucsgarwajitwaakggnisj[data-darkmode]
- root(true)
-
-.qiziqtywpuaucsgarwajitwaakggnisj:not([data-darkmode])
- root(false)
+ color var(--subNoteText)
</style>
diff --git a/src/client/app/desktop/views/components/notes.note.sub.vue b/src/client/app/desktop/views/components/notes.note.sub.vue
index 8f01ddd43c..ee52670f8f 100644
--- a/src/client/app/desktop/views/components/notes.note.sub.vue
+++ b/src/client/app/desktop/views/components/notes.note.sub.vue
@@ -42,12 +42,12 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.tkfdzaxtkdeianobciwadajxzbddorql
display flex
margin 0
padding 16px 32px
font-size 0.9em
- background isDark ? #21242d : #fcfcfc
+ background var(--subNoteBg)
> .avatar
flex-shrink 0
@@ -72,7 +72,7 @@ root(isDark)
margin 0
padding 0
overflow-wrap break-word
- color isDark ? #fff : #717171
+ color var(--noteText)
> .text
margin-right 8px
@@ -82,16 +82,10 @@ root(isDark)
cursor default
margin 0
padding 0
- color isDark ? #959ba7 : #717171
+ color var(--subNoteText)
pre
max-height 120px
font-size 80%
-.tkfdzaxtkdeianobciwadajxzbddorql[data-darkmode]
- root(true)
-
-.tkfdzaxtkdeianobciwadajxzbddorql:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/notes.note.vue b/src/client/app/desktop/views/components/notes.note.vue
index ac2c1ce97f..b628d045aa 100644
--- a/src/client/app/desktop/views/components/notes.note.vue
+++ b/src/client/app/desktop/views/components/notes.note.vue
@@ -317,13 +317,11 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.note
margin 0
padding 0
- background isDark ? #282C37 : #fff
- border-bottom solid 1px isDark ? #1c2023 : #eaeaea
+ background var(--face)
+ border-bottom solid 1px var(--faceDivider)
&[data-round]
&:first-child
@@ -348,7 +346,7 @@ root(isDark)
right 2px
bottom 2px
left 2px
- border 2px solid rgba($theme-color, 0.3)
+ border 2px solid var(--primaryAlpha03)
border-radius 4px
> .renote
@@ -357,8 +355,8 @@ root(isDark)
padding 16px 32px 8px 32px
line-height 28px
white-space pre
- color #9dbb00
- background isDark ? linear-gradient(to bottom, #314027 0%, #282c37 100%) : linear-gradient(to bottom, #edfde2 0%, #fff 100%)
+ color var(--renoteText)
+ background linear-gradient(to bottom, var(--renoteGradient) 0%, var(--face) 100%)
.avatar
display inline-block
@@ -398,7 +396,7 @@ root(isDark)
&:hover
> .main > footer > button
- color isDark ? #707b97 : #888
+ color var(--noteActionsHighlighted)
> .avatar
flex-shrink 0
@@ -426,7 +424,7 @@ root(isDark)
margin 0
padding 0
overflow-wrap break-word
- color isDark ? #fff : #717171
+ color var(--noteText)
> .text
margin-right 8px
@@ -439,7 +437,7 @@ root(isDark)
margin 0
padding 0
overflow-wrap break-word
- color isDark ? #fff : #717171
+ color var(--noteText)
>>> .title
display block
@@ -447,7 +445,7 @@ root(isDark)
padding 4px
font-size 90%
text-align center
- background isDark ? #2f3944 : #eef1f3
+ background var(--mfmTitleBg)
border-radius 4px
>>> .code
@@ -456,17 +454,17 @@ root(isDark)
>>> .quote
margin 8px
padding 6px 12px
- color isDark ? #6f808e : #aaa
- border-left solid 3px isDark ? #637182 : #eee
+ color var(--mfmQuote)
+ border-left solid 3px var(--mfmQuoteLine)
> .reply
margin-right 8px
- color isDark ? #99abbf : #717171
+ color var(--text)
> .rp
margin-left 4px
font-style oblique
- color #a0bf46
+ color var(--renoteText)
> .location
margin 4px 0
@@ -491,7 +489,7 @@ root(isDark)
> *
padding 16px
- border dashed 1px isDark ? #4e945e : #c0dac6
+ border dashed 1px var(--quoteBorder)
border-radius 8px
> footer
@@ -500,22 +498,22 @@ root(isDark)
padding 0 8px
line-height 32px
font-size 1em
- color isDark ? #606984 : #ddd
+ color var(--noteActions)
background transparent
border none
cursor pointer
&:hover
- color isDark ? #a1a8bf : #444
+ color var(--noteActionsHover)
&.replyButton:hover
- color #0af
+ color var(--noteActionsReplyHover)
&.renoteButton:hover
- color #8d0
+ color var(--noteActionsRenoteHover)
&.reactionButton:hover
- color #fa0
+ color var(--noteActionsReactionHover)
> .count
display inline
@@ -523,18 +521,12 @@ root(isDark)
color #999
&.reacted, &.reacted:hover
- color #fa0
+ color var(--noteActionsReactionHover)
> .detail
padding-top 4px
background rgba(#000, 0.0125)
-.note[data-darkmode]
- root(true)
-
-.note:not([data-darkmode])
- root(false)
-
</style>
<style lang="stylus" module>
@@ -557,7 +549,7 @@ root(isDark)
padding 0 4px
margin-left 4px
font-size 80%
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
border-radius 4px
</style>
diff --git a/src/client/app/desktop/views/components/notes.vue b/src/client/app/desktop/views/components/notes.vue
index e6267ed204..84b13ed84e 100644
--- a/src/client/app/desktop/views/components/notes.vue
+++ b/src/client/app/desktop/views/components/notes.vue
@@ -216,9 +216,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-notes
.transition
.mk-notes-enter
.mk-notes-leave-to
@@ -235,9 +233,9 @@ root(isDark)
line-height 32px
font-size 14px
text-align center
- color isDark ? #666b79 : #aaa
- background isDark ? #242731 : #fdfdfd
- border-bottom solid 1px isDark ? #1c2023 : #eaeaea
+ color var(--dateDividerFg)
+ background var(--dateDividerBg)
+ border-bottom solid 1px var(--faceDivider)
span
margin 0 16px
@@ -250,7 +248,7 @@ root(isDark)
position sticky
z-index 100
height 3px
- background $theme-color
+ background var(--primary)
> footer
> button
@@ -260,21 +258,15 @@ root(isDark)
width 100%
text-align center
color #ccc
- background isDark ? #282C37 : #fff
- border-top solid 1px isDark ? #1c2023 : #eaeaea
+ background var(--face)
+ border-top solid 1px var(--faceDivider)
border-bottom-left-radius 6px
border-bottom-right-radius 6px
&:hover
- background isDark ? #2e3440 : #f5f5f5
+ box-shadow 0 0 0 100px inset rgba(0, 0, 0, 0.05)
&:active
- background isDark ? #21242b : #eee
-
-.mk-notes[data-darkmode]
- root(true)
-
-.mk-notes:not([data-darkmode])
- root(false)
+ box-shadow 0 0 0 100px inset rgba(0, 0, 0, 0.1)
</style>
diff --git a/src/client/app/desktop/views/components/notifications.vue b/src/client/app/desktop/views/components/notifications.vue
index 2eb80dcd01..1f3f62395a 100644
--- a/src/client/app/desktop/views/components/notifications.vue
+++ b/src/client/app/desktop/views/components/notifications.vue
@@ -191,7 +191,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.mk-notifications
.transition
.mk-notifications-enter
.mk-notifications-leave-to
@@ -208,7 +208,7 @@ root(isDark)
padding 16px
overflow-wrap break-word
font-size 13px
- border-bottom solid 1px isDark ? #1c2023 : rgba(#000, 0.05)
+ border-bottom solid 1px var(--faceDivider)
&:last-child
border-bottom none
@@ -219,7 +219,7 @@ root(isDark)
top 16px
right 12px
vertical-align top
- color isDark ? #606984 : rgba(#000, 0.6)
+ color var(--noteHeaderInfo)
font-size small
&:after
@@ -249,10 +249,10 @@ root(isDark)
margin-right 4px
.note-preview
- color isDark ? #c2cad4 : rgba(#000, 0.7)
+ color var(--noteText)
.note-ref
- color isDark ? #c2cad4 : rgba(#000, 0.7)
+ color var(--noteText)
[data-fa]
font-size 1em
@@ -283,9 +283,9 @@ root(isDark)
line-height 32px
text-align center
font-size 0.8em
- color isDark ? #666b79 : #aaa
- background isDark ? #242731 : #fdfdfd
- border-bottom solid 1px isDark ? #1c2023 : rgba(#000, 0.05)
+ color var(--dateDividerFg)
+ background var(--dateDividerBg)
+ border-bottom solid 1px var(--faceDivider)
span
margin 0 16px
@@ -327,10 +327,4 @@ root(isDark)
> [data-fa]
margin-right 4px
-.mk-notifications[data-darkmode]
- root(true)
-
-.mk-notifications:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/post-form-window.vue b/src/client/app/desktop/views/components/post-form-window.vue
index 466d5e1fd8..a5d191f2f3 100644
--- a/src/client/app/desktop/views/components/post-form-window.vue
+++ b/src/client/app/desktop/views/components/post-form-window.vue
@@ -77,7 +77,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.mk-post-form-window
.mk-post-form-window--header
.icon
margin-right 8px
@@ -94,15 +94,6 @@ root(isDark)
.mk-post-form-window--body
.notePreview
- if isDark
- margin 16px 22px 0 22px
- else
margin 16px 22px
-.mk-post-form-window[data-darkmode]
- root(true)
-
-.mk-post-form-window:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue
index 7bf76e4829..f50dfaf8fb 100644
--- a/src/client/app/desktop/views/components/post-form.vue
+++ b/src/client/app/desktop/views/components/post-form.vue
@@ -446,12 +446,10 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-post-form
display block
padding 16px
- background isDark ? #282C37 : lighten($theme-color, 95%)
+ background var(--desktopPostFormBg)
&:after
content ""
@@ -465,26 +463,26 @@ root(isDark)
width 100%
padding 12px
font-size 16px
- color isDark ? #fff : #333
- background isDark ? #191d23 : #fff
+ color var(--desktopPostFormTextareaFg)
+ background var(--desktopPostFormTextareaBg)
outline none
- border solid 1px rgba($theme-color, 0.1)
+ border solid 1px var(--primaryAlpha01)
border-radius 4px
transition border-color .2s ease
&:hover
- border-color rgba($theme-color, 0.2)
+ border-color var(--primaryAlpha02)
transition border-color .1s ease
&:focus
- border-color rgba($theme-color, 0.5)
+ border-color var(--primaryAlpha05)
transition border-color 0s ease
&:disabled
opacity 0.5
&::-webkit-input-placeholder
- color rgba($theme-color, 0.3)
+ color var(--primaryAlpha03)
> input
margin-bottom 8px
@@ -498,17 +496,17 @@ root(isDark)
&:hover
& + *
& + * + *
- border-color rgba($theme-color, 0.2)
+ border-color var(--primaryAlpha02)
transition border-color .1s ease
&:focus
& + *
& + * + *
- border-color rgba($theme-color, 0.5)
+ border-color var(--primaryAlpha05)
transition border-color 0s ease
&.with
- border-bottom solid 1px rgba($theme-color, 0.1) !important
+ border-bottom solid 1px var(--primaryAlpha01) !important
border-radius 4px 4px 0 0
> .visibleUsers
@@ -517,7 +515,7 @@ root(isDark)
> span
margin-right 16px
- color isDark ? #fff : #666
+ color var(--primary)
> .hashtags
margin 0 0 8px 0
@@ -526,7 +524,7 @@ root(isDark)
font-size 14px
> b
- color isDark ? #9baec8 : darken($theme-color, 20%)
+ color var(--primary)
> *
margin-right 8px
@@ -535,14 +533,14 @@ root(isDark)
> .files
margin 0
padding 0
- background isDark ? #181b23 : lighten($theme-color, 98%)
- border solid 1px rgba($theme-color, 0.1)
+ background var(--desktopPostFormTextareaBg)
+ border solid 1px var(--primaryAlpha01)
border-top none
border-radius 0 0 4px 4px
transition border-color .3s ease
&.with
- border-bottom solid 1px rgba($theme-color, 0.1) !important
+ border-bottom solid 1px var(--primaryAlpha01) !important
border-radius 0
> .remain
@@ -552,7 +550,7 @@ root(isDark)
right 8px
margin 0
padding 0
- color rgba($theme-color, 0.4)
+ color var(--primaryAlpha04)
> div
padding 4px
@@ -586,8 +584,8 @@ root(isDark)
cursor pointer
> .mk-poll-editor
- background isDark ? #181b23 : lighten($theme-color, 98%)
- border solid 1px rgba($theme-color, 0.1)
+ background var(--desktopPostFormTextareaBg)
+ border solid 1px var(--primaryAlpha01)
border-top none
border-radius 0 0 4px 4px
transition border-color .3s ease
@@ -595,7 +593,7 @@ root(isDark)
> .mk-uploader
margin 8px 0 0 0
padding 8px
- border solid 1px rgba($theme-color, 0.2)
+ border solid 1px var(--primaryAlpha02)
border-radius 4px
input[type='file']
@@ -612,22 +610,20 @@ root(isDark)
width 110px
height 40px
font-size 1em
- color $theme-color-foreground
- background linear-gradient(to bottom, lighten($theme-color, 25%) 0%, lighten($theme-color, 10%) 100%)
+ color var(--primaryForeground)
+ background var(--primary)
outline none
- border solid 1px lighten($theme-color, 15%)
+ border none
border-radius 4px
&:not(:disabled)
font-weight bold
&:hover:not(:disabled)
- background linear-gradient(to bottom, lighten($theme-color, 8%) 0%, darken($theme-color, 8%) 100%)
- border-color $theme-color
+ background var(--primaryLighten5)
&:active:not(:disabled)
- background $theme-color
- border-color $theme-color
+ background var(--primaryDarken5)
&:focus
&:after
@@ -638,7 +634,7 @@ root(isDark)
right -5px
bottom -5px
left -5px
- border 2px solid rgba($theme-color, 0.3)
+ border 2px solid var(--primaryAlpha03)
border-radius 8px
&:disabled
@@ -648,13 +644,13 @@ root(isDark)
&.wait
background linear-gradient(
45deg,
- darken($theme-color, 10%) 25%,
- $theme-color 25%,
- $theme-color 50%,
- darken($theme-color, 10%) 50%,
- darken($theme-color, 10%) 75%,
- $theme-color 75%,
- $theme-color
+ var(--primaryDarken10) 25%,
+ var(--primary) 25%,
+ var(--primary) 50%,
+ var(--primaryDarken10) 50%,
+ var(--primaryDarken10) 75%,
+ var(--primary) 75%,
+ var(--primary)
)
background-size 32px 32px
animation stripe-bg 1.5s linear infinite
@@ -673,7 +669,7 @@ root(isDark)
right 138px
margin 0
line-height 40px
- color rgba($theme-color, 0.5)
+ color var(--primaryAlpha05)
&.over
color #ec3828
@@ -691,7 +687,7 @@ root(isDark)
width 40px
height 40px
font-size 1em
- color isDark ? $theme-color : rgba($theme-color, 0.5)
+ color var(--desktopPostFormTransparentButtonFg)
background transparent
outline none
border solid 1px transparent
@@ -699,12 +695,12 @@ root(isDark)
&:hover
background transparent
- border-color isDark ? rgba($theme-color, 0.5) : rgba($theme-color, 0.3)
+ border-color var(--primaryAlpha03)
&:active
- color rgba($theme-color, 0.6)
- background isDark ? transparent : linear-gradient(to bottom, lighten($theme-color, 80%) 0%, lighten($theme-color, 90%) 100%)
- border-color rgba($theme-color, 0.5)
+ color var(--primaryAlpha06)
+ background linear-gradient(to bottom, var(--desktopPostFormTransparentButtonActiveGradientStart) 0%, var(--desktopPostFormTransparentButtonActiveGradientEnd) 100%)
+ border-color var(--primaryAlpha05)
box-shadow 0 2px 4px rgba(#000, 0.15) inset
&:focus
@@ -716,7 +712,7 @@ root(isDark)
right -5px
bottom -5px
left -5px
- border 2px solid rgba($theme-color, 0.3)
+ border 2px solid var(--primaryAlpha03)
border-radius 8px
> .dropzone
@@ -725,13 +721,7 @@ root(isDark)
top 0
width 100%
height 100%
- border dashed 2px rgba($theme-color, 0.5)
+ border dashed 2px var(--primaryAlpha05)
pointer-events none
-.mk-post-form[data-darkmode]
- root(true)
-
-.mk-post-form:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/progress-dialog.vue b/src/client/app/desktop/views/components/progress-dialog.vue
index cc25ba8e30..feda6050bc 100644
--- a/src/client/app/desktop/views/components/progress-dialog.vue
+++ b/src/client/app/desktop/views/components/progress-dialog.vue
@@ -37,7 +37,7 @@ export default Vue.extend({
</script>
<style lang="stylus" module>
-@import '~const.styl'
+
.body
padding 18px 24px 24px 24px
@@ -53,7 +53,7 @@ export default Vue.extend({
margin 0 0 4px 0
text-align center
line-height 16px
- color rgba($theme-color, 0.7)
+ color var(--primaryAlpha07)
&:after
content '%'
@@ -69,21 +69,21 @@ export default Vue.extend({
overflow hidden
&::-webkit-progress-value
- background $theme-color
+ background var(--primary)
&::-webkit-progress-bar
- background rgba($theme-color, 0.1)
+ background var(--primaryAlpha01)
.waiting
background linear-gradient(
45deg,
- lighten($theme-color, 30%) 25%,
- $theme-color 25%,
- $theme-color 50%,
- lighten($theme-color, 30%) 50%,
- lighten($theme-color, 30%) 75%,
- $theme-color 75%,
- $theme-color
+ var(--primaryLighten30) 25%,
+ var(--primary) 25%,
+ var(--primary) 50%,
+ var(--primaryLighten30) 50%,
+ var(--primaryLighten30) 75%,
+ var(--primary) 75%,
+ var(--primary)
)
background-size 32px 32px
animation progress-dialog-tag-progress-waiting 1.5s linear infinite
diff --git a/src/client/app/desktop/views/components/received-follow-requests-window.vue b/src/client/app/desktop/views/components/received-follow-requests-window.vue
index d8a94f6cbe..3df1329c48 100644
--- a/src/client/app/desktop/views/components/received-follow-requests-window.vue
+++ b/src/client/app/desktop/views/components/received-follow-requests-window.vue
@@ -2,7 +2,7 @@
<mk-window ref="window" is-modal width="450px" height="500px" @closed="destroyDom">
<span slot="header">%fa:envelope R% %i18n:@title%</span>
- <div class="slpqaxdoxhvglersgjukmvizkqbmbokc" :data-darkmode="$store.state.device.darkmode">
+ <div class="slpqaxdoxhvglersgjukmvizkqbmbokc">
<div v-for="req in requests">
<router-link :key="req.id" :to="req.follower | userPage">{{ req.follower | userName }}</router-link>
<span>
@@ -47,8 +47,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-
-root(isDark)
+.slpqaxdoxhvglersgjukmvizkqbmbokc
padding 16px
> button
@@ -57,16 +56,10 @@ root(isDark)
> div
display flex
padding 16px
- border solid 1px isDark ? #1c2023 : #eee
+ border solid 1px var(--faceDivider)
border-radius 4px
> span
margin 0 0 0 auto
-.slpqaxdoxhvglersgjukmvizkqbmbokc[data-darkmode]
- root(true)
-
-.slpqaxdoxhvglersgjukmvizkqbmbokc:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/renote-form.vue b/src/client/app/desktop/views/components/renote-form.vue
index c5192ecaac..68d485bada 100644
--- a/src/client/app/desktop/views/components/renote-form.vue
+++ b/src/client/app/desktop/views/components/renote-form.vue
@@ -4,8 +4,8 @@
<template v-if="!quote">
<footer>
<a class="quote" v-if="!quote" @click="onQuote">%i18n:@quote%</a>
- <button class="ui cancel" @click="cancel">%i18n:@cancel%</button>
- <button class="ui primary ok" @click="ok" :disabled="wait">{{ wait ? '%i18n:@reposting%' : '%i18n:@renote%' }}</button>
+ <ui-button class="button cancel" inline @click="cancel">%i18n:@cancel%</ui-button>
+ <ui-button class="button ok" inline primary @click="ok" :disabled="wait">{{ wait ? '%i18n:@reposting%' : '%i18n:@renote%' }}</ui-button>
</footer>
</template>
<template v-if="quote">
@@ -57,16 +57,13 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
-
+.mk-renote-form
> .preview
margin 16px 22px
> footer
height 72px
- background isDark ? #313543 : lighten($theme-color, 95%)
+ background var(--desktopRenoteFormFooter)
> .quote
position absolute
@@ -74,7 +71,7 @@ root(isDark)
left 28px
line-height 40px
- button
+ > .button
display block
position absolute
bottom 16px
@@ -87,10 +84,4 @@ root(isDark)
&.ok
right 16px
-.mk-renote-form[data-darkmode]
- root(true)
-
-.mk-renote-form:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/settings.profile.vue b/src/client/app/desktop/views/components/settings.profile.vue
index d47b5b224b..5f465a52bb 100644
--- a/src/client/app/desktop/views/components/settings.profile.vue
+++ b/src/client/app/desktop/views/components/settings.profile.vue
@@ -6,31 +6,28 @@
<button class="ui" @click="updateAvatar">%i18n:@choice-avatar%</button>
</label>
<label class="ui from group">
- <p>%i18n:@name%</p>
- <input v-model="name" type="text" class="ui"/>
+ <ui-input v-model="name" type="text">%i18n:@name%</ui-input>
</label>
<label class="ui from group">
- <p>%i18n:@location%</p>
- <input v-model="location" type="text" class="ui"/>
+ <ui-input v-model="location" type="text">%i18n:@location%</ui-input>
</label>
<label class="ui from group">
- <p>%i18n:@description%</p>
- <textarea v-model="description" class="ui"></textarea>
+ <ui-textarea v-model="description">%i18n:@description%</ui-textarea>
</label>
<label class="ui from group">
<p>%i18n:@birthday%</p>
<input type="date" v-model="birthday"/>
</label>
- <button class="ui primary" @click="save">%i18n:@save%</button>
+ <ui-button primary @click="save">%i18n:@save%</ui-button>
<section>
<h2>%i18n:@locked-account%</h2>
- <mk-switch v-model="$store.state.i.isLocked" @change="onChangeIsLocked" text="%i18n:@is-locked%"/>
+ <ui-switch v-model="$store.state.i.isLocked" @change="onChangeIsLocked">%i18n:@is-locked%</ui-switch>
</section>
<section>
<h2>%i18n:@other%</h2>
- <mk-switch v-model="$store.state.i.isBot" @change="onChangeIsBot" text="%i18n:@is-bot%"/>
- <mk-switch v-model="$store.state.i.isCat" @change="onChangeIsCat" text="%i18n:@is-cat%"/>
- <mk-switch v-model="alwaysMarkNsfw" text="%i18n:common.always-mark-nsfw%"/>
+ <ui-switch v-model="$store.state.i.isBot" @change="onChangeIsBot">%i18n:@is-bot%</ui-switch>
+ <ui-switch v-model="$store.state.i.isCat" @change="onChangeIsCat">%i18n:@is-cat%</ui-switch>
+ <ui-switch v-model="alwaysMarkNsfw">%i18n:common.always-mark-nsfw%</ui-switch>
</section>
</div>
</template>
diff --git a/src/client/app/desktop/views/components/settings.tags.vue b/src/client/app/desktop/views/components/settings.tags.vue
index a7234f7d87..dfc69a387e 100644
--- a/src/client/app/desktop/views/components/settings.tags.vue
+++ b/src/client/app/desktop/views/components/settings.tags.vue
@@ -47,8 +47,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-
-root(isDark)
+.vfcitkilproprqtbnpoertpsziierwzi
> .timeline
padding-bottom 16px
border-bottom solid 1px rgba(#000, 0.1)
@@ -56,10 +55,4 @@ root(isDark)
> .add
margin-top 16px
-.vfcitkilproprqtbnpoertpsziierwzi[data-darkmode]
- root(true)
-
-.vfcitkilproprqtbnpoertpsziierwzi:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/settings.vue b/src/client/app/desktop/views/components/settings.vue
index cf10ea0f56..1cb8d4d4c8 100644
--- a/src/client/app/desktop/views/components/settings.vue
+++ b/src/client/app/desktop/views/components/settings.vue
@@ -20,17 +20,24 @@
</section>
<section class="web" v-show="page == 'web'">
+ <h1>%i18n:@theme%</h1>
+ <mk-theme/>
+ </section>
+
+ <section class="web" v-show="page == 'web'">
<h1>%i18n:@behaviour%</h1>
- <mk-switch v-model="fetchOnScroll" text="%i18n:@fetch-on-scroll%">
- <span>%i18n:@fetch-on-scroll-desc%</span>
- </mk-switch>
- <mk-switch v-model="autoPopout" text="%i18n:@auto-popout%">
- <span>%i18n:@auto-popout-desc%</span>
- </mk-switch>
+ <ui-switch v-model="fetchOnScroll">
+ %i18n:@fetch-on-scroll%
+ <span slot="desc">%i18n:@fetch-on-scroll-desc%</span>
+ </ui-switch>
+ <ui-switch v-model="autoPopout">
+ %i18n:@auto-popout%
+ <span slot="desc">%i18n:@auto-popout-desc%</span>
+ </ui-switch>
<section>
<header>%i18n:@note-visibility%</header>
- <mk-switch v-model="rememberNoteVisibility" text="%i18n:@remember-note-visibility%"/>
+ <ui-switch v-model="rememberNoteVisibility">%i18n:@remember-note-visibility%</ui-switch>
<section>
<header>%i18n:@default-note-visibility%</header>
<ui-select v-model="defaultNoteVisibility">
@@ -45,9 +52,10 @@
<details>
<summary>%i18n:@advanced%</summary>
- <mk-switch v-model="apiViaStream" text="%i18n:@api-via-stream%">
- <span>%i18n:@api-via-stream-desc%</span>
- </mk-switch>
+ <ui-switch v-model="apiViaStream">
+ %i18n:@api-via-stream%
+ <span slot="desc">%i18n:@api-via-stream-desc%</span>
+ </ui-switch>
</details>
</section>
@@ -59,37 +67,35 @@
<div class="div">
<button class="ui" @click="updateWallpaper">%i18n:@choose-wallpaper%</button>
<button class="ui" @click="deleteWallpaper">%i18n:@delete-wallpaper%</button>
- <mk-switch v-model="darkmode" text="%i18n:@dark-mode%"/>
- <mk-switch v-model="useShadow" text="%i18n:@use-shadow%"/>
- <mk-switch v-model="roundedCorners" text="%i18n:@rounded-corners%"/>
- <mk-switch v-model="circleIcons" text="%i18n:@circle-icons%"/>
- <mk-switch v-model="reduceMotion" text="%i18n:common.reduce-motion%"/>
- <mk-switch v-model="contrastedAcct" text="%i18n:@contrasted-acct%"/>
- <mk-switch v-model="showFullAcct" text="%i18n:common.show-full-acct%"/>
- <mk-switch v-model="gradientWindowHeader" text="%i18n:@gradient-window-header%"/>
- <mk-switch v-model="iLikeSushi" text="%i18n:common.i-like-sushi%"/>
+ <ui-switch v-model="darkmode">%i18n:@dark-mode%</ui-switch>
+ <ui-switch v-model="useShadow">%i18n:@use-shadow%</ui-switch>
+ <ui-switch v-model="roundedCorners">%i18n:@rounded-corners%</ui-switch>
+ <ui-switch v-model="circleIcons">%i18n:@circle-icons%</ui-switch>
+ <ui-switch v-model="reduceMotion">%i18n:common.reduce-motion%</ui-switch>
+ <ui-switch v-model="contrastedAcct">%i18n:@contrasted-acct%</ui-switch>
+ <ui-switch v-model="showFullAcct">%i18n:common.show-full-acct%</ui-switch>
+ <ui-switch v-model="iLikeSushi">%i18n:common.i-like-sushi%</ui-switch>
</div>
- <mk-switch v-model="showPostFormOnTopOfTl" text="%i18n:@post-form-on-timeline%"/>
- <mk-switch v-model="suggestRecentHashtags" text="%i18n:@suggest-recent-hashtags%"/>
- <mk-switch v-model="showClockOnHeader" text="%i18n:@show-clock-on-header%"/>
- <mk-switch v-model="alwaysShowNsfw" text="%i18n:common.always-show-nsfw%"/>
- <mk-switch v-model="showReplyTarget" text="%i18n:@show-reply-target%"/>
- <mk-switch v-model="showMyRenotes" text="%i18n:@show-my-renotes%"/>
- <mk-switch v-model="showRenotedMyNotes" text="%i18n:@show-renoted-my-notes%"/>
- <mk-switch v-model="showLocalRenotes" text="%i18n:@show-local-renotes%"/>
- <mk-switch v-model="showMaps" text="%i18n:@show-maps%">
- <span>%i18n:@show-maps-desc%</span>
- </mk-switch>
- <mk-switch v-model="disableAnimatedMfm" text="%i18n:common.disable-animated-mfm%"/>
- <mk-switch v-model="games_reversi_showBoardLabels" text="%i18n:common.show-reversi-board-labels%"/>
- <mk-switch v-model="games_reversi_useContrastStones" text="%i18n:common.use-contrast-reversi-stones%"/>
+ <ui-switch v-model="showPostFormOnTopOfTl">%i18n:@post-form-on-timeline%</ui-switch>
+ <ui-switch v-model="suggestRecentHashtags">%i18n:@suggest-recent-hashtags%</ui-switch>
+ <ui-switch v-model="showClockOnHeader">%i18n:@show-clock-on-header%</ui-switch>
+ <ui-switch v-model="alwaysShowNsfw">%i18n:common.always-show-nsfw%</ui-switch>
+ <ui-switch v-model="showReplyTarget">%i18n:@show-reply-target%</ui-switch>
+ <ui-switch v-model="showMyRenotes">%i18n:@show-my-renotes%</ui-switch>
+ <ui-switch v-model="showRenotedMyNotes">%i18n:@show-renoted-my-notes%</ui-switch>
+ <ui-switch v-model="showLocalRenotes">%i18n:@show-local-renotes%</ui-switch>
+ <ui-switch v-model="showMaps">%i18n:@show-maps%</ui-switch>
+ <ui-switch v-model="disableAnimatedMfm">%i18n:common.disable-animated-mfm%</ui-switch>
+ <ui-switch v-model="games_reversi_showBoardLabels">%i18n:common.show-reversi-board-labels%</ui-switch>
+ <ui-switch v-model="games_reversi_useContrastStones">%i18n:common.use-contrast-reversi-stones%</ui-switch>
</section>
<section class="web" v-show="page == 'web'">
<h1>%i18n:@sound%</h1>
- <mk-switch v-model="enableSounds" text="%i18n:@enable-sounds%">
- <span>%i18n:@enable-sounds-desc%</span>
- </mk-switch>
+ <ui-switch v-model="enableSounds">
+ %i18n:@enable-sounds%
+ <span slot="desc">%i18n:@enable-sounds-desc%</span>
+ </ui-switch>
<label>%i18n:@volume%</label>
<input type="range"
v-model="soundVolume"
@@ -102,7 +108,7 @@
<section class="web" v-show="page == 'web'">
<h1>%i18n:@mobile%</h1>
- <mk-switch v-model="disableViaMobile" text="%i18n:@disable-via-mobile%"/>
+ <ui-switch v-model="disableViaMobile">%i18n:@disable-via-mobile%</ui-switch>
</section>
<section class="web" v-show="page == 'web'">
@@ -131,9 +137,10 @@
<section class="notification" v-show="page == 'notification'">
<h1>%i18n:@notification%</h1>
- <mk-switch v-model="$store.state.i.settings.autoWatch" @change="onChangeAutoWatch" text="%i18n:@auto-watch%">
- <span>%i18n:@auto-watch-desc%</span>
- </mk-switch>
+ <ui-switch v-model="$store.state.i.settings.autoWatch" @change="onChangeAutoWatch">
+ %i18n:@auto-watch%
+ <span slot="desc">%i18n:@auto-watch-desc%</span>
+ </ui-switch>
</section>
<section class="drive" v-show="page == 'drive'">
@@ -201,20 +208,23 @@
</button>
<details>
<summary>%i18n:@update-settings%</summary>
- <mk-switch v-model="preventUpdate" text="%i18n:@prevent-update%">
- <span>%i18n:@prevent-update-desc%</span>
- </mk-switch>
+ <ui-switch v-model="preventUpdate">
+ %i18n:@prevent-update%
+ <span slot="desc">%i18n:@prevent-update-desc%</span>
+ </ui-switch>
</details>
</section>
<section class="other" v-show="page == 'other'">
<h1>%i18n:@advanced-settings%</h1>
- <mk-switch v-model="debug" text="%i18n:@debug-mode%">
- <span>%i18n:@debug-mode-desc%</span>
- </mk-switch>
- <mk-switch v-model="enableExperimentalFeatures" text="%i18n:@experimental%">
- <span>%i18n:@experimental-desc%</span>
- </mk-switch>
+ <ui-switch v-model="debug">
+ %i18n:@debug-mode%
+ <span slot="desc">%i18n:@debug-mode-desc%</span>
+ </ui-switch>
+ <ui-switch v-model="enableExperimentalFeatures">
+ %i18n:@experimental%
+ <span slot="desc">%i18n:@experimental-desc%</span>
+ </ui-switch>
</section>
</div>
</div>
@@ -421,12 +431,7 @@ export default Vue.extend({
disableViaMobile: {
get() { return this.$store.state.settings.disableViaMobile; },
set(value) { this.$store.dispatch('settings/set', { key: 'disableViaMobile', value }); }
- },
-
- gradientWindowHeader: {
- get() { return this.$store.state.settings.gradientWindowHeader; },
- set(value) { this.$store.dispatch('settings/set', { key: 'gradientWindowHeader', value }); }
- },
+ }
},
created() {
(this as any).os.getMeta().then(meta => {
@@ -492,9 +497,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-settings
display flex
width 100%
height 100%
@@ -505,13 +508,13 @@ root(isDark)
height 100%
padding 16px 0 0 0
overflow auto
- border-right solid 1px isDark ? #1c2023 : #ddd
+ border-right solid 1px var(--faceDivider)
> p
display block
padding 10px 16px
margin 0
- color isDark ? #9aa2a7 : #666
+ color var(--desktopSettingsNavItem)
cursor pointer
user-select none
transition margin-left 0.2s ease
@@ -520,11 +523,11 @@ root(isDark)
margin-right 4px
&:hover
- color isDark ? #fff : #555
+ color var(--desktopSettingsNavItemHover)
&.active
margin-left 8px
- color $theme-color !important
+ color var(--primary) !important
> .pages
width 100%
@@ -534,14 +537,13 @@ root(isDark)
> section
margin 32px
- color isDark ? #c4ccd2 : #4a535a
+ color var(--text)
> h1
margin 0 0 1em 0
padding 0 0 8px 0
font-size 1em
- color isDark ? #e3e7ea : #555
- border-bottom solid 1px isDark ? #1c2023 : #eee
+ border-bottom solid 1px var(--faceDivider)
&, >>> *
.ui.button.block
@@ -554,18 +556,12 @@ root(isDark)
margin 0 0 1em 0
padding 0 0 8px 0
font-size 1em
- color isDark ? #e3e7ea : #555
- border-bottom solid 1px isDark ? #1c2023 : #eee
+ color var(--text)
+ border-bottom solid 1px var(--faceDivider)
> .web
> .div
- border-bottom solid 1px isDark ? #1c2023 : #eee
+ border-bottom solid 1px var(--faceDivider)
margin 16px 0
-.mk-settings[data-darkmode]
- root(true)
-
-.mk-settings:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/sub-note-content.vue b/src/client/app/desktop/views/components/sub-note-content.vue
index 6889dc231e..fd8e658056 100644
--- a/src/client/app/desktop/views/components/sub-note-content.vue
+++ b/src/client/app/desktop/views/components/sub-note-content.vue
@@ -38,7 +38,7 @@ export default Vue.extend({
> .rp
margin-left 4px
font-style oblique
- color #a0bf46
+ color var(--renoteText)
mk-poll
font-size 80%
diff --git a/src/client/app/desktop/views/components/timeline.core.vue b/src/client/app/desktop/views/components/timeline.core.vue
index ff73bde95c..aef873dd11 100644
--- a/src/client/app/desktop/views/components/timeline.core.vue
+++ b/src/client/app/desktop/views/components/timeline.core.vue
@@ -215,7 +215,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.mk-timeline-core
> .mk-friends-maker
diff --git a/src/client/app/desktop/views/components/timeline.vue b/src/client/app/desktop/views/components/timeline.vue
index c008c175de..3e4c45d228 100644
--- a/src/client/app/desktop/views/components/timeline.vue
+++ b/src/client/app/desktop/views/components/timeline.vue
@@ -175,10 +175,8 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
- background isDark ? #282C37 : #fff
+.mk-timeline
+ background var(--face)
box-shadow var(--shadow)
border-radius var(--round)
overflow hidden
@@ -186,8 +184,8 @@ root(isDark)
> header
padding 0 8px
z-index 10
- background isDark ? #313543 : #fff
- box-shadow 0 1px isDark ? rgba(#000, 0.15) : rgba(#000, 0.08)
+ background var(--faceHeader)
+ box-shadow 0 1px var(--desktopTimelineHeaderShadow)
> .buttons
position absolute
@@ -200,23 +198,20 @@ root(isDark)
padding 0 8px
font-size 0.9em
line-height 42px
- color isDark ? #9baec8 : #ccc
+ color var(--faceTextButton)
> .badge
position absolute
top -4px
right 4px
font-size 10px
- color $theme-color
+ color var(--primary)
&:hover
- color isDark ? #b2c1d5 : #aaa
-
- &:active
- color isDark ? #b2c1d5 : #999
+ color var(--faceTextButtonHover)
&[data-active]
- color $theme-color
+ color var(--primary)
cursor default
&:before
@@ -227,7 +222,7 @@ root(isDark)
left 0
width 100%
height 2px
- background $theme-color
+ background var(--primary)
> span
display inline-block
@@ -237,7 +232,7 @@ root(isDark)
user-select none
&[data-active]
- color $theme-color
+ color var(--primary)
cursor default
font-weight bold
@@ -249,19 +244,13 @@ root(isDark)
left -8px
width calc(100% + 16px)
height 2px
- background $theme-color
+ background var(--primary)
&:not([data-active])
- color isDark ? #9aa2a7 : #6f7477
+ color var(--desktopTimelineSrc)
cursor pointer
&:hover
- color isDark ? #d9dcde : #525a5f
-
-.mk-timeline[data-darkmode]
- root(true)
-
-.mk-timeline:not([data-darkmode])
- root(false)
+ color var(--desktopTimelineSrcHover)
</style>
diff --git a/src/client/app/desktop/views/components/ui-notification.vue b/src/client/app/desktop/views/components/ui-notification.vue
index 7519124870..dafede4c36 100644
--- a/src/client/app/desktop/views/components/ui-notification.vue
+++ b/src/client/app/desktop/views/components/ui-notification.vue
@@ -36,7 +36,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.mk-ui-notification
display block
position fixed
z-index 10000
@@ -46,10 +46,10 @@ root(isDark)
margin 0 auto
padding 128px 0 0 0
width 500px
- color rgba(isDark ? #fff : #000, 0.6)
- background rgba(isDark ? #282C37 : #fff, 0.9)
+ color var(--desktopNotificationFg)
+ background var(--desktopNotificationBg)
border-radius 0 0 8px 8px
- box-shadow 0 2px 4px rgba(#000, isDark ? 0.4 : 0.2)
+ box-shadow 0 2px 4px var(--desktopNotificationShadow)
transform translateY(-64px)
opacity 0
@@ -58,10 +58,4 @@ root(isDark)
line-height 64px
text-align center
-.mk-ui-notification[data-darkmode]
- root(true)
-
-.mk-ui-notification:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/ui.header.account.vue b/src/client/app/desktop/views/components/ui.header.account.vue
index 1e8a45beaf..a541dea121 100644
--- a/src/client/app/desktop/views/components/ui.header.account.vue
+++ b/src/client/app/desktop/views/components/ui.header.account.vue
@@ -127,14 +127,12 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.account
> .header
display block
margin 0
padding 0
- color #9eaba8
+ color var(--desktopHeaderFg)
border none
background transparent
cursor pointer
@@ -144,14 +142,11 @@ root(isDark)
&:hover
&[data-active='true']
- color isDark ? #fff : darken(#9eaba8, 20%)
+ color var(--desktopHeaderHoverFg)
> .avatar
filter saturate(150%)
- &:active
- color isDark ? #fff : darken(#9eaba8, 30%)
-
> .username
display block
float left
@@ -177,7 +172,7 @@ root(isDark)
transition filter 100ms ease
> .menu
- $bgcolor = isDark ? #282c37 : #fff
+ $bgcolor = var(--face)
display block
position absolute
top 56px
@@ -220,7 +215,7 @@ root(isDark)
& + ul
padding-top 10px
- border-top solid 1px isDark ? #1c2023 : #eee
+ border-top solid 1px var(--faceDivider)
> li
display block
@@ -234,7 +229,7 @@ root(isDark)
padding 0 28px
margin 0
line-height 40px
- color isDark ? #c8cece : #868C8C
+ color var(--text)
cursor pointer
*
@@ -249,8 +244,8 @@ root(isDark)
padding 2px 8px
font-size 90%
font-style normal
- background $theme-color
- color $theme-color-foreground
+ background var(--primary)
+ color var(--primaryForeground)
border-radius 8px
> [data-fa]:first-child
@@ -269,11 +264,11 @@ root(isDark)
&:hover, &:active
text-decoration none
- background $theme-color
- color $theme-color-foreground
+ background var(--primary)
+ color var(--primaryForeground)
&:active
- background darken($theme-color, 10%)
+ background var(--primaryDarken10)
&.signout
$color = #e64137
@@ -290,10 +285,4 @@ root(isDark)
transform-origin: center -16px;
}
-.account[data-darkmode]
- root(true)
-
-.account:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/ui.header.nav.vue b/src/client/app/desktop/views/components/ui.header.nav.vue
index 6292b764c6..4f679db938 100644
--- a/src/client/app/desktop/views/components/ui.header.nav.vue
+++ b/src/client/app/desktop/views/components/ui.header.nav.vue
@@ -95,9 +95,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.nav
display inline-block
margin 0
padding 0
@@ -120,7 +118,7 @@ root(isDark)
&.active
> a
- border-bottom solid 3px $theme-color
+ border-bottom solid 3px var(--primary)
> a
display inline-block
@@ -129,7 +127,7 @@ root(isDark)
padding 0 24px
font-size 13px
font-variant small-caps
- color isDark ? #b8c5ca : #9eaba8
+ color var(--desktopHeaderFg)
text-decoration none
transition none
cursor pointer
@@ -138,7 +136,7 @@ root(isDark)
pointer-events none
&:hover
- color isDark ? #fff : darken(#9eaba8, 20%)
+ color var(--desktopHeaderHoverFg)
text-decoration none
> [data-fa]:first-child
@@ -147,7 +145,7 @@ root(isDark)
> [data-fa]:last-child
margin-left 5px
font-size 10px
- color $theme-color
+ color var(--primary)
@media (max-width 1100px)
margin-left -5px
@@ -162,10 +160,4 @@ root(isDark)
@media (max-width 700px)
padding 0 12px
-.nav[data-darkmode]
- root(true)
-
-.nav:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/ui.header.notifications.vue b/src/client/app/desktop/views/components/ui.header.notifications.vue
index 74dcd4111f..c59a49556d 100644
--- a/src/client/app/desktop/views/components/ui.header.notifications.vue
+++ b/src/client/app/desktop/views/components/ui.header.notifications.vue
@@ -61,16 +61,13 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
-
+.notifications
> button
display block
margin 0
padding 0
width 32px
- color #9eaba8
+ color var(--desktopHeaderFg)
border none
background transparent
cursor pointer
@@ -80,10 +77,7 @@ root(isDark)
&:hover
&[data-active='true']
- color isDark ? #fff : darken(#9eaba8, 20%)
-
- &:active
- color isDark ? #fff : darken(#9eaba8, 30%)
+ color var(--desktopHeaderHoverFg)
> [data-fa].bell
font-size 1.2em
@@ -93,10 +87,10 @@ root(isDark)
margin-left -5px
vertical-align super
font-size 10px
- color $theme-color
+ color var(--primary)
> .pop
- $bgcolor = isDark ? #282c37 : #fff
+ $bgcolor = var(--face)
display block
position absolute
top 56px
@@ -135,10 +129,4 @@ root(isDark)
font-size 1rem
overflow auto
-.notifications[data-darkmode]
- root(true)
-
-.notifications:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/ui.header.post.vue b/src/client/app/desktop/views/components/ui.header.post.vue
index 3665488542..9527792a34 100644
--- a/src/client/app/desktop/views/components/ui.header.post.vue
+++ b/src/client/app/desktop/views/components/ui.header.post.vue
@@ -17,7 +17,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.note
display inline-block
@@ -33,8 +33,8 @@ export default Vue.extend({
font-size 1.2em
font-weight normal
text-decoration none
- color $theme-color-foreground
- background $theme-color !important
+ color var(--primaryForeground)
+ background var(--primary) !important
outline none
border none
border-radius 4px
@@ -45,10 +45,10 @@ export default Vue.extend({
pointer-events none
&:hover
- background lighten($theme-color, 10%) !important
+ background var(--primaryLighten10) !important
&:active
- background darken($theme-color, 10%) !important
+ background var(--primaryDarken10) !important
transition background 0s ease
</style>
diff --git a/src/client/app/desktop/views/components/ui.header.search.vue b/src/client/app/desktop/views/components/ui.header.search.vue
index 9a36e52fcc..d22efbf84f 100644
--- a/src/client/app/desktop/views/components/ui.header.search.vue
+++ b/src/client/app/desktop/views/components/ui.header.search.vue
@@ -28,8 +28,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-root(isDark)
+.search
> [data-fa]
display block
position absolute
@@ -38,7 +37,7 @@ root(isDark)
width 48px
text-align center
line-height 48px
- color #9eaba8
+ color var(--desktopHeaderFg)
pointer-events none
> *
@@ -52,26 +51,20 @@ root(isDark)
width 14em
height 32px
font-size 1em
- background rgba(#000, 0.05)
+ background var(--desktopHeaderSearchBg)
outline none
- //border solid 1px #ddd
border none
border-radius 16px
transition color 0.5s ease, border 0.5s ease
- color isDark ? #fff : #000
+ color var(--desktopHeaderSearchFg)
&::placeholder
- color #9eaba8
+ color var(--desktopHeaderFg)
&:hover
- background isDark ? rgba(#fff, 0.04) : rgba(#000, 0.08)
+ background var(--desktopHeaderSearchHoverBg)
&:focus
- box-shadow 0 0 0 2px rgba($theme-color, 0.5) !important
+ box-shadow 0 0 0 2px var(--primaryAlpha05) !important
-.search[data-darkmode]
- root(true)
-
-.search:not([data-darkmode])
- root(false)
</style>
diff --git a/src/client/app/desktop/views/components/ui.header.vue b/src/client/app/desktop/views/components/ui.header.vue
index bec0ee37ad..4cfcda0f1a 100644
--- a/src/client/app/desktop/views/components/ui.header.vue
+++ b/src/client/app/desktop/views/components/ui.header.vue
@@ -5,13 +5,14 @@
<div class="main" ref="main">
<div class="backdrop"></div>
<div class="main">
- <p ref="welcomeback" v-if="$store.getters.isSignedIn">%i18n:@welcome-back%<b>{{ $store.state.i | userName }}</b>%i18n:@adjective%</p>
<div class="container" ref="mainContainer">
<div class="left">
<x-nav/>
</div>
<div class="center">
- <div class="icon" @click="goToTop"></div>
+ <div class="icon" @click="goToTop">
+ <img svg-inline src="../../assets/header-icon.svg"/>
+ </div>
</div>
<div class="right">
<x-search/>
@@ -64,55 +65,6 @@ export default Vue.extend({
mounted() {
this.$store.commit('setUiHeaderHeight', this.$el.offsetHeight);
-
- if (this.$store.getters.isSignedIn) {
- const ago = (new Date().getTime() - new Date(this.$store.state.i.lastUsedAt).getTime()) / 1000;
- const isHisasiburi = ago >= 3600;
- this.$store.state.i.lastUsedAt = new Date();
-
- if (isHisasiburi) {
- (this.$refs.welcomeback as any).style.display = 'block';
- (this.$refs.main as any).style.overflow = 'hidden';
-
- anime({
- targets: this.$refs.welcomeback,
- top: '0',
- opacity: 1,
- delay: 1000,
- duration: 500,
- easing: 'easeOutQuad'
- });
-
- anime({
- targets: this.$refs.mainContainer,
- opacity: 0,
- delay: 1000,
- duration: 500,
- easing: 'easeOutQuad'
- });
-
- setTimeout(() => {
- anime({
- targets: this.$refs.welcomeback,
- top: '-48px',
- opacity: 0,
- duration: 500,
- complete: () => {
- (this.$refs.welcomeback as any).style.display = 'none';
- (this.$refs.main as any).style.overflow = 'initial';
- },
- easing: 'easeInQuad'
- });
-
- anime({
- targets: this.$refs.mainContainer,
- opacity: 1,
- duration: 500,
- easing: 'easeInQuad'
- });
- }, 2500);
- }
- }
},
methods: {
@@ -127,7 +79,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.header
position fixed
top 0
z-index 1000
@@ -151,7 +103,7 @@ root(isDark)
z-index 1000
width 100%
height 48px
- background isDark ? #313543 : #f7f7f7
+ background var(--desktopHeaderBg)
> .main
z-index 1001
@@ -161,17 +113,6 @@ root(isDark)
font-size 0.9rem
user-select none
- > p
- display none
- position absolute
- top 48px
- width 100%
- line-height 48px
- margin 0
- text-align center
- color isDark ? #fff : #888
- opacity 0
-
> .container
display flex
width 100%
@@ -189,13 +130,15 @@ root(isDark)
margin auto
display block
width 48px
- height 48px
- background-image isDark ? url('/assets/desktop/header-icon.dark.svg') : url('/assets/desktop/header-icon.light.svg')
- background-size 24px
- background-position center
- background-repeat no-repeat
- opacity 0.3
+ text-align center
cursor pointer
+ opacity 0.5
+
+ > svg
+ width 24px
+ height 48px
+ vertical-align top
+ fill var(--desktopHeaderFg)
> .left,
> .center
@@ -212,10 +155,4 @@ root(isDark)
> .mk-ui-header-search
display none
-.header[data-darkmode]
- root(true)
-
-.header:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/user-lists-window.vue b/src/client/app/desktop/views/components/user-lists-window.vue
index 75253e0788..9c384314cf 100644
--- a/src/client/app/desktop/views/components/user-lists-window.vue
+++ b/src/client/app/desktop/views/components/user-lists-window.vue
@@ -2,7 +2,7 @@
<mk-window ref="window" is-modal width="450px" height="500px" @closed="destroyDom">
<span slot="header">%fa:list% %i18n:@title%</span>
- <div class="xkxvokkjlptzyewouewmceqcxhpgzprp" :data-darkmode="$store.state.device.darkmode">
+ <div class="xkxvokkjlptzyewouewmceqcxhpgzprp">
<button class="ui" @click="add">%i18n:@create-list%</button>
<a v-for="list in lists" :key="list.id" @click="choice(list)">{{ list.title }}</a>
</div>
@@ -47,8 +47,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-
-root(isDark)
+.xkxvokkjlptzyewouewmceqcxhpgzprp
padding 16px
> button
@@ -57,13 +56,7 @@ root(isDark)
> a
display block
padding 16px
- border solid 1px isDark ? #1c2023 : #eee
+ border solid 1px var(--faceDivider)
border-radius 4px
-.xkxvokkjlptzyewouewmceqcxhpgzprp[data-darkmode]
- root(true)
-
-.xkxvokkjlptzyewouewmceqcxhpgzprp:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/user-preview.vue b/src/client/app/desktop/views/components/user-preview.vue
index f6d6d68a7f..7f5e79eae1 100644
--- a/src/client/app/desktop/views/components/user-preview.vue
+++ b/src/client/app/desktop/views/components/user-preview.vue
@@ -83,14 +83,12 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-user-preview
position absolute
z-index 2048
margin-top -8px
width 250px
- background isDark ? #282c37 : #fff
+ background var(--face)
background-clip content-box
border solid 1px rgba(#000, 0.1)
border-radius 4px
@@ -99,7 +97,7 @@ root(isDark)
> .banner
height 84px
- background-color isDark ? #1c1e26 : #f5f5f5
+ background-color rgba(0, 0, 0, 0.1)
background-size cover
background-position center
@@ -111,7 +109,7 @@ root(isDark)
z-index 2
width 58px
height 58px
- border solid 3px isDark ? #282c37 : #fff
+ border solid 3px var(--face)
border-radius 8px
> .title
@@ -123,19 +121,20 @@ root(isDark)
margin 0
font-weight bold
line-height 16px
- color isDark ? #fff : #656565
+ color var(--text)
> .username
display block
margin 0
line-height 16px
font-size 0.8em
- color isDark ? #606984 : #999
+ color var(--text)
+ opacity 0.7
> .description
padding 0 16px
font-size 0.7em
- color isDark ? #9ea4ad : #555
+ color var(--text)
> .status
padding 8px 16px
@@ -147,21 +146,15 @@ root(isDark)
> p
margin 0
font-size 0.7em
- color #aaa
+ color var(--text)
> span
font-size 1em
- color $theme-color
+ color var(--primary)
> .mk-follow-button
position absolute
top 92px
right 8px
-.mk-user-preview[data-darkmode]
- root(true)
-
-.mk-user-preview:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/components/users-list.vue b/src/client/app/desktop/views/components/users-list.vue
index 05e2f4e5b3..1316f277b7 100644
--- a/src/client/app/desktop/views/components/users-list.vue
+++ b/src/client/app/desktop/views/components/users-list.vue
@@ -69,7 +69,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.mk-users-list
height 100%
@@ -104,8 +104,8 @@ export default Vue.extend({
&[data-active]
font-weight bold
- color $theme-color
- border-color $theme-color
+ color var(--primary)
+ border-color var(--primary)
cursor default
> span
diff --git a/src/client/app/desktop/views/components/widget-container.vue b/src/client/app/desktop/views/components/widget-container.vue
index fbf7691cd3..a506357039 100644
--- a/src/client/app/desktop/views/components/widget-container.vue
+++ b/src/client/app/desktop/views/components/widget-container.vue
@@ -1,6 +1,6 @@
<template>
<div class="mk-widget-container" :class="{ naked }">
- <header :class="{ withGradient }" v-if="showHeader">
+ <header v-if="showHeader">
<div class="title"><slot name="header"></slot></div>
<slot name="func"></slot>
</header>
@@ -20,22 +20,13 @@ export default Vue.extend({
type: Boolean,
default: false
}
- },
- computed: {
- withGradient(): boolean {
- return this.$store.getters.isSignedIn
- ? this.$store.state.settings.gradientWindowHeader != null
- ? this.$store.state.settings.gradientWindowHeader
- : false
- : false;
- }
}
});
</script>
<style lang="stylus" scoped>
-root(isDark)
- background isDark ? #282C37 : #fff
+.mk-widget-container
+ background var(--face)
box-shadow var(--shadow)
border-radius var(--round)
overflow hidden
@@ -45,7 +36,7 @@ root(isDark)
box-shadow none !important
> header
- background isDark ? #313543 : #fff
+ background var(--faceHeader)
> .title
z-index 1
@@ -54,7 +45,7 @@ root(isDark)
line-height 42px
font-size 0.9em
font-weight bold
- color isDark ? #e3e5e8 : #888
+ color var(--faceHeaderText)
box-shadow 0 1px rgba(#000, 0.07)
> [data-fa]
@@ -72,23 +63,12 @@ root(isDark)
width 42px
font-size 0.9em
line-height 42px
- color isDark ? #9baec8 : #ccc
+ color var(--faceTextButton)
&:hover
- color isDark ? #b2c1d5 : #aaa
+ color var(--faceTextButtonHover)
&:active
- color isDark ? #b2c1d5 : #999
-
- &.withGradient
- > .title
- background isDark ? linear-gradient(to bottom, #313543, #1d2027) : linear-gradient(to bottom, #fff, #ececec)
- box-shadow 0 1px rgba(#000, 0.11)
-
-.mk-widget-container[data-darkmode]
- root(true)
-
-.mk-widget-container:not([data-darkmode])
- root(false)
+ color var(--faceTextButtonActive)
</style>
diff --git a/src/client/app/desktop/views/components/window.vue b/src/client/app/desktop/views/components/window.vue
index 5eece3795f..a1893ffd6b 100644
--- a/src/client/app/desktop/views/components/window.vue
+++ b/src/client/app/desktop/views/components/window.vue
@@ -4,7 +4,6 @@
<div class="main" ref="main" tabindex="-1" :data-is-modal="isModal" @mousedown="onBodyMousedown" @keydown="onKeydown" :style="{ width, height }">
<div class="body">
<header ref="header"
- :class="{ withGradient: $store.state.settings.gradientWindowHeader }"
@contextmenu.prevent="() => {}" @mousedown.prevent="onHeaderMousedown"
>
<h1><slot name="header"></slot></h1>
@@ -463,9 +462,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-window
display block
> .bg
@@ -493,10 +490,7 @@ root(isDark)
&:focus
&:not([data-is-modal])
> .body
- if isDark
- box-shadow 0 0 0px 1px rgba($theme-color, 0.5), 0 2px 12px 0 rgba(#000, 0.5)
- else
- box-shadow 0 0 0px 1px rgba($theme-color, 0.5), 0 2px 6px 0 rgba(#000, 0.2)
+ box-shadow 0 0 0px 1px var(--primaryAlpha05), 0 2px 12px 0 var(--desktopWindowShadow)
> .handle
$size = 8px
@@ -562,13 +556,9 @@ root(isDark)
> .body
height 100%
overflow hidden
- background isDark ? #282C37 : #fff
+ background var(--face)
border-radius 6px
-
- if isDark
- box-shadow 0 2px 12px 0 rgba(#000, 0.5)
- else
- box-shadow 0 2px 6px 0 rgba(#000, 0.2)
+ box-shadow 0 2px 12px 0 rgba(#000, 0.5)
> header
$header-height = 40px
@@ -578,14 +568,10 @@ root(isDark)
overflow hidden
white-space nowrap
cursor move
- background isDark ? #313543 : #fff
+ background var(--faceHeader)
border-radius 6px 6px 0 0
box-shadow 0 1px 0 rgba(#000, 0.1)
- &.withGradient
- background isDark ? linear-gradient(to bottom, #313543, #1d2027) : linear-gradient(to bottom, #fff, #ececec)
- box-shadow 0 1px 0 rgba(#000, 0.15)
-
&, *
user-select none
@@ -600,7 +586,7 @@ root(isDark)
font-size 1em
line-height $header-height
font-weight normal
- color isDark ? #e3e5e8 : #666
+ color var(--desktopWindowTitle)
> div:last-child
position absolute
@@ -615,16 +601,16 @@ root(isDark)
padding 0
cursor pointer
font-size 1em
- color isDark ? #9baec8 : rgba(#000, 0.4)
+ color var(--faceTextButton)
border none
outline none
background transparent
&:hover
- color isDark ? #b2c1d5 : rgba(#000, 0.6)
+ color var(--faceTextButtonHover)
&:active
- color isDark ? #b2c1d5 : darken(#000, 30%)
+ color var(--faceTextButtonActive)
> [data-fa]
padding 0
@@ -639,10 +625,4 @@ root(isDark)
> .main > .body > .content
height calc(100% - 40px)
-.mk-window[data-darkmode]
- root(true)
-
-.mk-window:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/pages/admin/admin.announcements.vue b/src/client/app/desktop/views/pages/admin/admin.announcements.vue
index 532400deb2..272016b3f9 100644
--- a/src/client/app/desktop/views/pages/admin/admin.announcements.vue
+++ b/src/client/app/desktop/views/pages/admin/admin.announcements.vue
@@ -31,7 +31,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.qldxjjsrseehkusjuoooapmsprvfrxyl
textarea
diff --git a/src/client/app/desktop/views/pages/admin/admin.cpu-memory.vue b/src/client/app/desktop/views/pages/admin/admin.cpu-memory.vue
index d14ce12553..63b24cea47 100644
--- a/src/client/app/desktop/views/pages/admin/admin.cpu-memory.vue
+++ b/src/client/app/desktop/views/pages/admin/admin.cpu-memory.vue
@@ -111,7 +111,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.zyknedwtlthezamcjlolyusmipqmjgxz
> svg
display block
width 50%
@@ -125,7 +125,7 @@ root(isDark)
> text
font-size 10px
- fill isDark ? rgba(#fff, 0.55) : rgba(#000, 0.55)
+ fill var(--chartCaption)
> tspan
opacity 0.5
@@ -135,10 +135,4 @@ root(isDark)
display block
clear both
-.zyknedwtlthezamcjlolyusmipqmjgxz[data-darkmode]
- root(true)
-
-.zyknedwtlthezamcjlolyusmipqmjgxz:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/pages/admin/admin.dashboard.vue b/src/client/app/desktop/views/pages/admin/admin.dashboard.vue
index 5d0f6d451e..f5734012bd 100644
--- a/src/client/app/desktop/views/pages/admin/admin.dashboard.vue
+++ b/src/client/app/desktop/views/pages/admin/admin.dashboard.vue
@@ -95,7 +95,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.obdskegsannmntldydackcpzezagxqfy
> .stats
@@ -112,7 +112,7 @@ export default Vue.extend({
> *:first-child
display block
- color $theme-color
+ color var(--primary)
> *:last-child
font-size 70%
diff --git a/src/client/app/desktop/views/pages/admin/admin.hashtags.vue b/src/client/app/desktop/views/pages/admin/admin.hashtags.vue
index c6bf20361f..f491b85959 100644
--- a/src/client/app/desktop/views/pages/admin/admin.hashtags.vue
+++ b/src/client/app/desktop/views/pages/admin/admin.hashtags.vue
@@ -31,7 +31,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.jdnqwkzlnxcfftthoybjxrebyolvoucw
textarea
diff --git a/src/client/app/desktop/views/pages/admin/admin.suspend-user.vue b/src/client/app/desktop/views/pages/admin/admin.suspend-user.vue
index 8d8e37e181..32295e3795 100644
--- a/src/client/app/desktop/views/pages/admin/admin.suspend-user.vue
+++ b/src/client/app/desktop/views/pages/admin/admin.suspend-user.vue
@@ -39,7 +39,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
header
margin 10px 0
diff --git a/src/client/app/desktop/views/pages/admin/admin.unsuspend-user.vue b/src/client/app/desktop/views/pages/admin/admin.unsuspend-user.vue
index ec423969be..d6905fe9c0 100644
--- a/src/client/app/desktop/views/pages/admin/admin.unsuspend-user.vue
+++ b/src/client/app/desktop/views/pages/admin/admin.unsuspend-user.vue
@@ -39,7 +39,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
header
margin 10px 0
diff --git a/src/client/app/desktop/views/pages/admin/admin.unverify-user.vue b/src/client/app/desktop/views/pages/admin/admin.unverify-user.vue
index e8204e69f4..d0cf635a98 100644
--- a/src/client/app/desktop/views/pages/admin/admin.unverify-user.vue
+++ b/src/client/app/desktop/views/pages/admin/admin.unverify-user.vue
@@ -39,7 +39,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
header
margin 10px 0
diff --git a/src/client/app/desktop/views/pages/admin/admin.verify-user.vue b/src/client/app/desktop/views/pages/admin/admin.verify-user.vue
index 91fb04af80..9c0b0209b7 100644
--- a/src/client/app/desktop/views/pages/admin/admin.verify-user.vue
+++ b/src/client/app/desktop/views/pages/admin/admin.verify-user.vue
@@ -39,7 +39,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
header
margin 10px 0
diff --git a/src/client/app/desktop/views/pages/admin/admin.vue b/src/client/app/desktop/views/pages/admin/admin.vue
index 510252b447..b874915f05 100644
--- a/src/client/app/desktop/views/pages/admin/admin.vue
+++ b/src/client/app/desktop/views/pages/admin/admin.vue
@@ -70,7 +70,7 @@ export default Vue.extend({
</script>
<style lang="stylus">
-@import '~const.styl'
+
.mk-admin
display flex
@@ -106,7 +106,7 @@ export default Vue.extend({
&.active
margin-left 8px
- color $theme-color !important
+ color var(--primary) !important
> main
width 100%
diff --git a/src/client/app/desktop/views/pages/deck/deck.column.vue b/src/client/app/desktop/views/pages/deck/deck.column.vue
index 04aa5e82d1..c372ef490e 100644
--- a/src/client/app/desktop/views/pages/deck/deck.column.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.column.vue
@@ -269,24 +269,22 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.dnpfarvgbnfmyzbdquhhzyxcmstpdqzs
$header-height = 42px
width 330px
min-width 330px
height 100%
- background isDark ? #282C37 : #fff
+ background var(--face)
border-radius 6px
//box-shadow 0 2px 16px rgba(#000, 0.1)
overflow hidden
&.draghover
- box-shadow 0 0 0 2px rgba($theme-color, 0.8)
+ box-shadow 0 0 0 2px var(--primaryAlpha08)
&.dragging
- box-shadow 0 0 0 2px rgba($theme-color, 0.4)
+ box-shadow 0 0 0 2px var(--primaryAlpha04)
&.dropready
*
@@ -301,15 +299,14 @@ root(isDark)
min-width 285px
&.naked
- background rgba(#000, isDark ? 0.25 : 0.1)
+ background var(--deckAcrylicColumnBg)
> header
background transparent
box-shadow none
- if !isDark
- > button
- color #bbb
+ > button
+ color var(--text)
> header
display flex
@@ -317,8 +314,8 @@ root(isDark)
line-height $header-height
padding 0 16px
font-size 14px
- color isDark ? #e3e5e8 : #888
- background isDark ? #313543 : #fff
+ color var(--faceHeaderText)
+ background var(--faceHeader)
box-shadow 0 1px rgba(#000, 0.15)
cursor pointer
@@ -329,7 +326,7 @@ root(isDark)
pointer-events none
&.indicate
- box-shadow 0 3px 0 0 $theme-color
+ box-shadow 0 3px 0 0 var(--primary)
> span
[data-fa]
@@ -344,13 +341,13 @@ root(isDark)
width $header-height
line-height $header-height
font-size 16px
- color isDark ? #9baec8 : #ccc
+ color var(--faceTextButton)
&:hover
- color isDark ? #b2c1d5 : #aaa
+ color var(--faceTextButtonHover)
&:active
- color isDark ? #b2c1d5 : #999
+ color var(--faceTextButtonActive)
> .toggleActive
margin-left -16px
@@ -364,10 +361,4 @@ root(isDark)
overflow auto
overflow-x hidden
-.dnpfarvgbnfmyzbdquhhzyxcmstpdqzs[data-darkmode]
- root(true)
-
-.dnpfarvgbnfmyzbdquhhzyxcmstpdqzs:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/pages/deck/deck.note.sub.vue b/src/client/app/desktop/views/pages/deck/deck.note.sub.vue
index 3ba9ae914e..445bf7e365 100644
--- a/src/client/app/desktop/views/pages/deck/deck.note.sub.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.note.sub.vue
@@ -29,11 +29,11 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.fnlfosztlhtptnongximhlbykxblytcq
display flex
padding 16px
font-size 10px
- background isDark ? #21242d : #fcfcfc
+ background var(--subNoteBg)
&.smart
> .main
@@ -62,16 +62,10 @@ root(isDark)
> .text
margin 0
padding 0
- color isDark ? #959ba7 : #717171
+ color var(--subNoteText)
pre
max-height 120px
font-size 80%
-.fnlfosztlhtptnongximhlbykxblytcq[data-darkmode]
- root(true)
-
-.fnlfosztlhtptnongximhlbykxblytcq:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/pages/deck/deck.note.vue b/src/client/app/desktop/views/pages/deck/deck.note.vue
index 99274b0f41..eac0e78f0f 100644
--- a/src/client/app/desktop/views/pages/deck/deck.note.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.note.vue
@@ -214,9 +214,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-mediaRoot(isDark)
+.srwrkujossgfuhrbnvqkybtzxpblgchi
font-size 13px
margin 4px 12px
@@ -226,9 +224,9 @@ mediaRoot(isDark)
&:last-child
margin-bottom 12px
-root(isDark)
+.zyjjkidcqjnlegkqebitfviomuqmseqk
font-size 13px
- border-bottom solid 1px isDark ? #1c2023 : #eaeaea
+ border-bottom solid 1px var(--faceDivider)
&:last-of-type
border-bottom none
@@ -246,8 +244,8 @@ root(isDark)
padding 8px 16px 0 16px
line-height 28px
white-space pre
- color #9dbb00
- background isDark ? linear-gradient(to bottom, #314027 0%, #282c37 100%) : linear-gradient(to bottom, #edfde2 0%, #fff 100%)
+ color var(--renoteText)
+ background linear-gradient(to bottom, var(--renoteGradient) 0%, var(--face) 100%)
.avatar
flex-shrink 0
@@ -309,24 +307,11 @@ root(isDark)
margin 0
padding 0
overflow-wrap break-word
- color isDark ? #fff : #717171
+ color var(--noteText)
> .text
margin-right 8px
- > .toggle
- display inline-block
- padding 4px 8px
- font-size 0.7em
- color isDark ? #393f4f : #fff
- background isDark ? #687390 : #b1b9c1
- border-radius 2px
- cursor pointer
- user-select none
-
- &:hover
- background isDark ? #707b97 : #bbc4ce
-
> .content
> .text
@@ -334,7 +319,7 @@ root(isDark)
margin 0
padding 0
overflow-wrap break-word
- color isDark ? #fff : #717171
+ color var(--noteText)
>>> .title
display block
@@ -342,7 +327,7 @@ root(isDark)
padding 4px
font-size 90%
text-align center
- background isDark ? #2f3944 : #eef1f3
+ background var(--mfmTitleBg)
border-radius 4px
>>> .code
@@ -351,25 +336,25 @@ root(isDark)
>>> .quote
margin 8px
padding 6px 12px
- color isDark ? #6f808e : #aaa
- border-left solid 3px isDark ? #637182 : #eee
+ color var(--mfmQuote)
+ border-left solid 3px var(--mfmQuoteLine)
> .reply
margin-right 8px
- color isDark ? #99abbf : #717171
+ color var(--noteText)
> .rp
margin-left 4px
font-style oblique
- color #a0bf46
+ color var(--renoteText)
[data-is-me]:after
content "you"
padding 0 4px
margin-left 4px
font-size 80%
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
border-radius 4px
.mk-url-preview
@@ -400,7 +385,7 @@ root(isDark)
> *
padding 16px
- border dashed 1px isDark ? #4e945e : #c0dac6
+ border dashed 1px var(--quoteBorder)
border-radius 8px
> .app
@@ -415,14 +400,14 @@ root(isDark)
border none
box-shadow none
font-size 1em
- color isDark ? #606984 : #ddd
+ color var(--noteActions)
cursor pointer
&:not(:last-child)
margin-right 28px
&:hover
- color isDark ? #9198af : #666
+ color var(--noteActionsHover)
> .count
display inline
@@ -430,18 +415,6 @@ root(isDark)
color #999
&.reacted
- color $theme-color
-
-.zyjjkidcqjnlegkqebitfviomuqmseqk[data-darkmode]
- root(true)
-
-.zyjjkidcqjnlegkqebitfviomuqmseqk:not([data-darkmode])
- root(false)
-
-.srwrkujossgfuhrbnvqkybtzxpblgchi[data-darkmode]
- mediaRoot(true)
-
-.srwrkujossgfuhrbnvqkybtzxpblgchi:not([data-darkmode])
- mediaRoot(false)
+ color var(--primary)
</style>
diff --git a/src/client/app/desktop/views/pages/deck/deck.notes.vue b/src/client/app/desktop/views/pages/deck/deck.notes.vue
index 2e7e30f12a..884be3a841 100644
--- a/src/client/app/desktop/views/pages/deck/deck.notes.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.notes.vue
@@ -195,9 +195,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.eamppglmnmimdhrlzhplwpvyeaqmmhxu
.transition
.mk-notes-enter
.mk-notes-leave-to
@@ -214,9 +212,9 @@ root(isDark)
line-height 32px
font-size 14px
text-align center
- color isDark ? #666b79 : #aaa
- background isDark ? #242731 : #fdfdfd
- border-bottom solid 1px isDark ? #1c2023 : #eaeaea
+ color var(--dateDividerFg)
+ background var(--dateDividerBg)
+ border-bottom solid 1px var(--faceDivider)
span
margin 0 16px
@@ -232,21 +230,15 @@ root(isDark)
width 100%
text-align center
color #ccc
- background isDark ? #282C37 : #fff
- border-top solid 1px isDark ? #1c2023 : #eaeaea
+ background var(--face)
+ border-top solid 1px var(--faceDivider)
border-bottom-left-radius 6px
border-bottom-right-radius 6px
&:hover
- background isDark ? #2e3440 : #f5f5f5
+ box-shadow 0 0 0 100px inset rgba(0, 0, 0, 0.05)
&:active
- background isDark ? #21242b : #eee
-
-.eamppglmnmimdhrlzhplwpvyeaqmmhxu[data-darkmode]
- root(true)
-
-.eamppglmnmimdhrlzhplwpvyeaqmmhxu:not([data-darkmode])
- root(false)
+ box-shadow 0 0 0 100px inset rgba(0, 0, 0, 0.1)
</style>
diff --git a/src/client/app/desktop/views/pages/deck/deck.notification.vue b/src/client/app/desktop/views/pages/deck/deck.notification.vue
index d0093ff282..149bd10293 100644
--- a/src/client/app/desktop/views/pages/deck/deck.notification.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.notification.vue
@@ -109,7 +109,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.dsfykdcjpuwfvpefwufddclpjhzktmpw
> .notification
padding 16px
font-size 13px
@@ -142,14 +142,14 @@ root(isDark)
> .mk-time
margin-left auto
- color isDark ? #606984 : #c0c0c0
+ color var(--noteHeaderInfo)
font-size 0.9em
> .note-preview
- color isDark ? #fff : #717171
+ color var(--noteText)
> .note-ref
- color isDark ? #fff : #717171
+ color var(--noteText)
[data-fa]
font-size 1em
@@ -170,10 +170,4 @@ root(isDark)
> div > header i
color #888
-.dsfykdcjpuwfvpefwufddclpjhzktmpw[data-darkmode]
- root(true)
-
-.dsfykdcjpuwfvpefwufddclpjhzktmpw:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/pages/deck/deck.notifications.vue b/src/client/app/desktop/views/pages/deck/deck.notifications.vue
index f73f221b7b..1417cc3ee8 100644
--- a/src/client/app/desktop/views/pages/deck/deck.notifications.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.notifications.vue
@@ -155,8 +155,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
-
+.oxynyeqmfvracxnglgulyqfgqxnxmehl
.transition
.mk-notifications-enter
.mk-notifications-leave-to
@@ -169,7 +168,7 @@ root(isDark)
> .notifications
> .notification:not(:last-child)
- border-bottom solid 1px isDark ? #1c2023 : #eaeaea
+ border-bottom solid 1px var(--faceDivider)
> .date
display block
@@ -177,9 +176,9 @@ root(isDark)
line-height 32px
text-align center
font-size 0.8em
- color isDark ? #666b79 : #aaa
- background isDark ? #242731 : #fdfdfd
- border-bottom solid 1px isDark ? #1c2023 : #eaeaea
+ color var(--dateDividerFg)
+ background var(--dateDividerBg)
+ border-bottom solid 1px var(--faceDivider)
span
margin 0 16px
@@ -221,10 +220,4 @@ root(isDark)
> [data-fa]
margin-right 4px
-.oxynyeqmfvracxnglgulyqfgqxnxmehl[data-darkmode]
- root(true)
-
-.oxynyeqmfvracxnglgulyqfgqxnxmehl:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/pages/deck/deck.tl-column.vue b/src/client/app/desktop/views/pages/deck/deck.tl-column.vue
index 550b1be628..d245e3ecf5 100644
--- a/src/client/app/desktop/views/pages/deck/deck.tl-column.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.tl-column.vue
@@ -11,8 +11,8 @@
</span>
<div class="editor" style="padding:0 12px" v-if="edit">
- <mk-switch v-model="column.isMediaOnly" @change="onChangeSettings" text="%i18n:@is-media-only%"/>
- <mk-switch v-model="column.isMediaView" @change="onChangeSettings" text="%i18n:@is-media-view%"/>
+ <ui-switch v-model="column.isMediaOnly" @change="onChangeSettings">%i18n:@is-media-only%</ui-switch>
+ <ui-switch v-model="column.isMediaView" @change="onChangeSettings">%i18n:@is-media-view%</ui-switch>
</div>
<x-list-tl v-if="column.type == 'list'" :list="column.list" :media-only="column.isMediaOnly" :media-view="column.isMediaView"/>
<x-hashtag-tl v-if="column.type == 'hashtag'" :tag-tl="$store.state.settings.tagTimelines.find(x => x.id == column.tagTlId)" :media-only="column.isMediaOnly" :media-view="column.isMediaView"/>
diff --git a/src/client/app/desktop/views/pages/deck/deck.vue b/src/client/app/desktop/views/pages/deck/deck.vue
index 810770a022..22b4c50bb4 100644
--- a/src/client/app/desktop/views/pages/deck/deck.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.vue
@@ -1,6 +1,6 @@
<template>
<mk-ui :class="$style.root">
- <div class="qlvquzbjribqcaozciifydkngcwtyzje" :data-darkmode="$store.state.device.darkmode" :style="style">
+ <div class="qlvquzbjribqcaozciifydkngcwtyzje" :style="style">
<template v-for="ids in layout">
<div v-if="ids.length > 1" class="folder">
<template v-for="id, i in ids">
@@ -221,9 +221,7 @@ export default Vue.extend({
</style>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.qlvquzbjribqcaozciifydkngcwtyzje
display flex
flex 1
padding 16px 0 16px 16px
@@ -251,18 +249,12 @@ root(isDark)
> button
padding 0 16px
- color isDark ? #93a0a5 : #888
+ color var(--faceTextButton)
&:hover
- color isDark ? #b8c5ca : #777
+ color var(--faceTextButtonHover)
&:active
- color isDark ? #fff : #555
-
-.qlvquzbjribqcaozciifydkngcwtyzje[data-darkmode]
- root(true)
-
-.qlvquzbjribqcaozciifydkngcwtyzje:not([data-darkmode])
- root(false)
+ color var(--faceTextButtonActive)
</style>
diff --git a/src/client/app/desktop/views/pages/deck/deck.widgets-column.vue b/src/client/app/desktop/views/pages/deck/deck.widgets-column.vue
index 15397232e0..e1fecc98bc 100644
--- a/src/client/app/desktop/views/pages/deck/deck.widgets-column.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.widgets-column.vue
@@ -135,9 +135,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.wtdtxvecapixsepjtcupubtsmometobz
.gqpwvtwtprsbmnssnbicggtwqhmylhnq
> header
padding 16px
@@ -169,14 +167,5 @@ root(isDark)
background rgba(#000, 0.7)
border-radius 4px
- > header
- color isDark ? #fff : #000
-
-.wtdtxvecapixsepjtcupubtsmometobz[data-darkmode]
- root(true)
-
-.wtdtxvecapixsepjtcupubtsmometobz:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/pages/selectdrive.vue b/src/client/app/desktop/views/pages/selectdrive.vue
index c846f2418f..b82ed0a208 100644
--- a/src/client/app/desktop/views/pages/selectdrive.vue
+++ b/src/client/app/desktop/views/pages/selectdrive.vue
@@ -54,7 +54,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.mkp-selectdrive
display block
@@ -72,7 +72,7 @@ export default Vue.extend({
left 0
width 100%
height 72px
- background lighten($theme-color, 95%)
+ background var(--primaryLighten95)
.upload
display inline-block
@@ -85,7 +85,7 @@ export default Vue.extend({
width 40px
height 40px
font-size 1em
- color rgba($theme-color, 0.5)
+ color var(--primaryAlpha05)
background transparent
outline none
border solid 1px transparent
@@ -93,13 +93,13 @@ export default Vue.extend({
&:hover
background transparent
- border-color rgba($theme-color, 0.3)
+ border-color var(--primaryAlpha03)
&:active
- color rgba($theme-color, 0.6)
+ color var(--primaryAlpha06)
background transparent
- border-color rgba($theme-color, 0.5)
- box-shadow 0 2px 4px rgba(darken($theme-color, 50%), 0.15) inset
+ border-color var(--primaryAlpha05)
+ //box-shadow 0 2px 4px rgba(var(--primaryDarken50), 0.15) inset
&:focus
&:after
@@ -110,7 +110,7 @@ export default Vue.extend({
right -5px
bottom -5px
left -5px
- border 2px solid rgba($theme-color, 0.3)
+ border 2px solid var(--primaryAlpha03)
border-radius 8px
.ok
@@ -136,7 +136,7 @@ export default Vue.extend({
right -5px
bottom -5px
left -5px
- border 2px solid rgba($theme-color, 0.3)
+ border 2px solid var(--primaryAlpha03)
border-radius 8px
&:disabled
@@ -145,20 +145,20 @@ export default Vue.extend({
.ok
right 16px
- color $theme-color-foreground
- background linear-gradient(to bottom, lighten($theme-color, 25%) 0%, lighten($theme-color, 10%) 100%)
- border solid 1px lighten($theme-color, 15%)
+ color var(--primaryForeground)
+ background linear-gradient(to bottom, var(--primaryLighten25) 0%, var(--primaryLighten10) 100%)
+ border solid 1px var(--primaryLighten15)
&:not(:disabled)
font-weight bold
&:hover:not(:disabled)
- background linear-gradient(to bottom, lighten($theme-color, 8%) 0%, darken($theme-color, 8%) 100%)
- border-color $theme-color
+ background linear-gradient(to bottom, var(--primaryLighten8) 0%, var(--primaryDarken8) 100%)
+ border-color var(--primary)
&:active:not(:disabled)
- background $theme-color
- border-color $theme-color
+ background var(--primary)
+ border-color var(--primary)
.cancel
right 148px
diff --git a/src/client/app/desktop/views/pages/stats/stats.vue b/src/client/app/desktop/views/pages/stats/stats.vue
index 7a4e4ab5ce..219885fb9e 100644
--- a/src/client/app/desktop/views/pages/stats/stats.vue
+++ b/src/client/app/desktop/views/pages/stats/stats.vue
@@ -34,7 +34,7 @@ export default Vue.extend({
</script>
<style lang="stylus">
-@import '~const.styl'
+
.tcrwdhwpuxrwmcttxjcsehgpagpstqey
width 100%
@@ -54,7 +54,7 @@ export default Vue.extend({
> *:first-child
display block
- color $theme-color
+ color var(--primary)
> *:last-child
font-size 70%
diff --git a/src/client/app/desktop/views/pages/user-list.users.vue b/src/client/app/desktop/views/pages/user-list.users.vue
deleted file mode 100644
index 7d9a4606a1..0000000000
--- a/src/client/app/desktop/views/pages/user-list.users.vue
+++ /dev/null
@@ -1,125 +0,0 @@
-<template>
-<div>
- <mk-widget-container>
- <template slot="header">%fa:users% %i18n:@users%</template>
- <button slot="func" title="%i18n:@add-user%" @click="add">%fa:plus%</button>
-
- <div data-id="d0b63759-a822-4556-a5ce-373ab966e08a">
- <p class="fetching" v-if="fetching">%fa:spinner .pulse .fw% %i18n:common.loading%<mk-ellipsis/></p>
- <template v-else-if="users.length != 0">
- <div class="user" v-for="_user in users">
- <mk-avatar class="avatar" :user="_user"/>
- <div class="body">
- <router-link class="name" :to="_user | userPage" v-user-preview="_user.id">{{ _user | userName }}</router-link>
- <p class="username">@{{ _user | acct }}</p>
- </div>
- </div>
- </template>
- <p class="empty" v-else>%i18n:@no-one%</p>
- </div>
- </mk-widget-container>
-</div>
-</template>
-
-<script lang="ts">
-import Vue from 'vue';
-
-export default Vue.extend({
- props: {
- list: {
- type: Object,
- required: true
- }
- },
- data() {
- return {
- fetching: true,
- users: []
- };
- },
- mounted() {
- (this as any).api('users/show', {
- userIds: this.list.userIds
- }).then(users => {
- this.users = users;
- this.fetching = false;
- });
- },
- methods: {
- add() {
- (this as any).apis.input({
- title: '%i18n:@username%',
- }).then(async (username: string) => {
- if (username.startsWith('@')) username = username.slice(1);
- const user = await (this as any).api('users/show', {
- username
- });
-
- (this as any).api('users/lists/push', {
- listId: this.list.id,
- userId: user.id
- });
- });
- }
- }
-});
-</script>
-
-<style lang="stylus" scoped>
-root(isDark)
- > .user
- padding 16px
- border-bottom solid 1px isDark ? #1c2023 : #eee
-
- &:last-child
- border-bottom none
-
- &:after
- content ""
- display block
- clear both
-
- > .avatar
- display block
- float left
- margin 0 12px 0 0
- width 42px
- height 42px
- border-radius 8px
-
- > .body
- float left
- width calc(100% - 54px)
-
- > .name
- margin 0
- font-size 16px
- line-height 24px
- color isDark ? #fff : #555
-
- > .username
- display block
- margin 0
- font-size 15px
- line-height 16px
- color isDark ? #606984 : #ccc
-
- > .empty
- margin 0
- padding 16px
- text-align center
- color #aaa
-
- > .fetching
- margin 0
- padding 16px
- text-align center
- color #aaa
-
-[data-id="d0b63759-a822-4556-a5ce-373ab966e08a"][data-darkmode]
- root(true)
-
-[data-id="d0b63759-a822-4556-a5ce-373ab966e08a"]:not([data-darkmode])
- root(false)
-
-</style>
diff --git a/src/client/app/desktop/views/pages/user-list.vue b/src/client/app/desktop/views/pages/user-list.vue
deleted file mode 100644
index 2241b84e5e..0000000000
--- a/src/client/app/desktop/views/pages/user-list.vue
+++ /dev/null
@@ -1,71 +0,0 @@
-<template>
-<mk-ui>
- <div v-if="!fetching" data-id="02010e15-cc48-4245-8636-16078a9b623c">
- <div>
- <div><h1>{{ list.title }}</h1></div>
- <x-users :list="list"/>
- </div>
- <main>
- <mk-user-list-timeline :list="list"/>
- </main>
- </div>
-</mk-ui>
-</template>
-
-<script lang="ts">
-import Vue from 'vue';
-import XUsers from './user-list.users.vue';
-
-export default Vue.extend({
- components: {
- XUsers
- },
- data() {
- return {
- fetching: true,
- list: null
- };
- },
- watch: {
- $route: 'fetch'
- },
- mounted() {
- this.fetch();
- },
- methods: {
- fetch() {
- this.fetching = true;
-
- (this as any).api('users/lists/show', {
- listId: this.$route.params.list
- }).then(list => {
- this.list = list;
- this.fetching = false;
- });
- }
- }
-});
-</script>
-
-<style lang="stylus" scoped>
-[data-id="02010e15-cc48-4245-8636-16078a9b623c"]
- display flex
- justify-content center
- margin 0 auto
- max-width 1200px
-
- > main
- > div > div
- > *:not(:last-child)
- margin-bottom 16px
-
- > main
- padding 16px
- width calc(100% - 275px * 2)
-
- > div
- width 275px
- margin 0
- padding 16px 0 16px 16px
-
-</style>
diff --git a/src/client/app/desktop/views/pages/user/user.followers-you-know.vue b/src/client/app/desktop/views/pages/user/user.followers-you-know.vue
index 0965d801c9..cf05006c00 100644
--- a/src/client/app/desktop/views/pages/user/user.followers-you-know.vue
+++ b/src/client/app/desktop/views/pages/user/user.followers-you-know.vue
@@ -36,8 +36,8 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
- background isDark ? #282C37 : #fff
+.vahgrswmbzfdlmomxnqftuueyvwaafth
+ background var(--face)
box-shadow var(--shadow)
border-radius var(--round)
@@ -48,7 +48,7 @@ root(isDark)
line-height 42px
font-size 0.9em
font-weight bold
- color isDark ? #e3e5e8 : #888
+ color var(--faceHeaderText)
box-shadow 0 1px rgba(#000, 0.07)
> i
@@ -77,10 +77,4 @@ root(isDark)
> i
margin-right 4px
-.vahgrswmbzfdlmomxnqftuueyvwaafth[data-darkmode]
- root(true)
-
-.vahgrswmbzfdlmomxnqftuueyvwaafth:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/pages/user/user.friends.vue b/src/client/app/desktop/views/pages/user/user.friends.vue
index de37dc95c9..36ae360248 100644
--- a/src/client/app/desktop/views/pages/user/user.friends.vue
+++ b/src/client/app/desktop/views/pages/user/user.friends.vue
@@ -40,8 +40,8 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
- background isDark ? #282C37 : #fff
+.hozptpaliadatkehcmcayizwzwwctpbc
+ background var(--face)
box-shadow var(--shadow)
border-radius var(--round)
overflow hidden
@@ -53,8 +53,8 @@ root(isDark)
line-height 42px
font-size 0.9em
font-weight bold
- background isDark ? #313543 : inherit
- color isDark ? #e3e5e8 : #888
+ background var(--faceHeader)
+ color var(--faceHeaderText)
box-shadow 0 1px rgba(#000, 0.07)
> i
@@ -72,7 +72,7 @@ root(isDark)
> .user
padding 16px
- border-bottom solid 1px isDark ? #21242f : #eee
+ border-bottom solid 1px var(--faceDivider)
&:last-child
border-bottom none
@@ -98,24 +98,19 @@ root(isDark)
margin 0
font-size 16px
line-height 24px
- color isDark ? #ccc : #555
+ color var(--text)
> .username
display block
margin 0
font-size 15px
line-height 16px
- color isDark ? #555 : #ccc
+ color var(--text)
+ opacity 0.7
> .mk-follow-button
position absolute
top 16px
right 16px
-.hozptpaliadatkehcmcayizwzwwctpbc[data-darkmode]
- root(true)
-
-.hozptpaliadatkehcmcayizwzwwctpbc:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/pages/user/user.header.vue b/src/client/app/desktop/views/pages/user/user.header.vue
index f727910e77..76eb8f9e1c 100644
--- a/src/client/app/desktop/views/pages/user/user.header.vue
+++ b/src/client/app/desktop/views/pages/user/user.header.vue
@@ -100,10 +100,8 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
- background isDark ? #282C37 : #fff
+.header
+ background var(--face)
box-shadow var(--shadow)
border-radius var(--round)
overflow hidden
@@ -182,12 +180,12 @@ root(isDark)
> .body
padding 16px 16px 16px 154px
- color isDark ? #c5ced6 : #555
+ color var(--text)
> .status
margin-top 16px
padding-top 16px
- border-top solid 1px rgba(#000, isDark ? 0.2 : 0.1)
+ border-top solid 1px var(--faceDivider)
font-size 80%
> *
@@ -196,24 +194,18 @@ root(isDark)
margin-right 16px
&:not(:last-child)
- border-right solid 1px rgba(#000, isDark ? 0.2 : 0.1)
+ border-right solid 1px var(--faceDivider)
&.clickable
cursor pointer
&:hover
- color isDark ? #fff : #000
+ color var(--faceTextButtonHover)
> b
margin-right 4px
font-size 1rem
font-weight bold
- color $theme-color
-
-.header[data-darkmode]
- root(true)
-
-.header:not([data-darkmode])
- root(false)
+ color var(--primary)
</style>
diff --git a/src/client/app/desktop/views/pages/user/user.photos.vue b/src/client/app/desktop/views/pages/user/user.photos.vue
index 591edfd829..628d5b6d95 100644
--- a/src/client/app/desktop/views/pages/user/user.photos.vue
+++ b/src/client/app/desktop/views/pages/user/user.photos.vue
@@ -39,8 +39,8 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
- background isDark ? #282C37 : #fff
+.dzsuvbsrrrwobdxifudxuefculdfiaxd
+ background var(--face)
box-shadow var(--shadow)
border-radius var(--round)
overflow hidden
@@ -52,8 +52,8 @@ root(isDark)
line-height 42px
font-size 0.9em
font-weight bold
- background: isDark ? #313543 : inherit
- color isDark ? #e3e5e8 : #888
+ background var(--faceHeader)
+ color var(--faceHeaderText)
box-shadow 0 1px rgba(#000, 0.07)
> i
@@ -87,10 +87,4 @@ root(isDark)
> i
margin-right 4px
-.dzsuvbsrrrwobdxifudxuefculdfiaxd[data-darkmode]
- root(true)
-
-.dzsuvbsrrrwobdxifudxuefculdfiaxd:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/pages/user/user.profile.vue b/src/client/app/desktop/views/pages/user/user.profile.vue
index 1ea242270a..fe10b54378 100644
--- a/src/client/app/desktop/views/pages/user/user.profile.vue
+++ b/src/client/app/desktop/views/pages/user/user.profile.vue
@@ -85,8 +85,8 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
- background isDark ? #282C37 : #fff
+.profile
+ background var(--face)
box-shadow var(--shadow)
border-radius var(--round)
@@ -96,7 +96,7 @@ root(isDark)
> .friend-form
padding 16px
text-align center
- border-bottom solid 1px isDark ? #21242f : #eee
+ border-bottom solid 1px var(--faceDivider)
> .followed
margin 12px 0 0 0
@@ -114,7 +114,7 @@ root(isDark)
> .action-form
padding 16px
text-align center
- border-bottom solid 1px isDark ? #21242f : #eee
+ border-bottom solid 1px var(--faceDivider)
> *
width 100%
@@ -122,10 +122,4 @@ root(isDark)
&:not(:last-child)
margin-bottom 12px
-.profile[data-darkmode]
- root(true)
-
-.profile:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/pages/user/user.timeline.vue b/src/client/app/desktop/views/pages/user/user.timeline.vue
index be6adaac93..608c12b7e2 100644
--- a/src/client/app/desktop/views/pages/user/user.timeline.vue
+++ b/src/client/app/desktop/views/pages/user/user.timeline.vue
@@ -112,18 +112,16 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
- background isDark ? #282C37 : #fff
+.oh5y2r7l5lx8j6jj791ykeiwgihheguk
+ background var(--face)
border-radius var(--round)
overflow hidden
> header
padding 0 8px
z-index 10
- background isDark ? #313543 : #fff
- box-shadow 0 1px isDark ? rgba(#000, 0.15) : rgba(#000, 0.08)
+ background var(--faceHeader)
+ box-shadow 0 1px var(--desktopTimelineHeaderShadow)
> span
display inline-block
@@ -133,7 +131,7 @@ root(isDark)
user-select none
&[data-active]
- color $theme-color
+ color var(--primary)
cursor default
font-weight bold
@@ -145,14 +143,14 @@ root(isDark)
left -8px
width calc(100% + 16px)
height 2px
- background $theme-color
+ background var(--primary)
&:not([data-active])
- color isDark ? #9aa2a7 : #6f7477
+ color var(--desktopTimelineSrc)
cursor pointer
&:hover
- color isDark ? #d9dcde : #525a5f
+ color var(--desktopTimelineSrcHover)
> .loading
padding 64px 0
@@ -171,10 +169,4 @@ root(isDark)
font-size 3em
color #ccc
-.oh5y2r7l5lx8j6jj791ykeiwgihheguk[data-darkmode]
- root(true)
-
-.oh5y2r7l5lx8j6jj791ykeiwgihheguk:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/pages/user/user.vue b/src/client/app/desktop/views/pages/user/user.vue
index a7065af5e7..a8da890936 100644
--- a/src/client/app/desktop/views/pages/user/user.vue
+++ b/src/client/app/desktop/views/pages/user/user.vue
@@ -1,6 +1,6 @@
<template>
<mk-ui>
- <div class="xygkxeaeontfaokvqmiblezmhvhostak" v-if="!fetching" :data-darkmode="$store.state.device.darkmode">
+ <div class="xygkxeaeontfaokvqmiblezmhvhostak" v-if="!fetching">
<div class="is-suspended" v-if="user.isSuspended">%fa:exclamation-triangle% %i18n:@is-suspended%</div>
<div class="is-remote" v-if="user.host != null">%fa:exclamation-triangle% %i18n:@is-remote%<a :href="user.url || user.uri" target="_blank">%i18n:@view-remote%</a></div>
<main>
@@ -79,7 +79,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.xygkxeaeontfaokvqmiblezmhvhostak
width 980px
padding 16px
margin 0 auto
@@ -93,12 +93,12 @@ root(isDark)
border-radius var(--round)
&.is-suspended
- color isDark ? #ffb4b4 : #570808
- background isDark ? #611d1d : #ffdbdb
+ color var(--suspendedInfoFg)
+ background var(--suspendedInfoBg)
&.is-remote
- color isDark ? #ffbd3e : #573c08
- background isDark ? #42321c : #fff0db
+ color var(--remoteInfoFg)
+ background var(--remoteInfoBg)
> a
font-weight bold
@@ -139,21 +139,15 @@ root(isDark)
> .nav
padding 16px
font-size 12px
- color #aaa
- background isDark ? #21242f : #fff
+ color var(--text)
+ background var(--face)
box-shadow var(--shadow)
border-radius var(--round)
a
- color #999
+ color var(--text)99
i
- color #ccc
-
-.xygkxeaeontfaokvqmiblezmhvhostak[data-darkmode]
- root(true)
-
-.xygkxeaeontfaokvqmiblezmhvhostak:not([data-darkmode])
- root(false)
+ color var(--text)
</style>
diff --git a/src/client/app/desktop/views/pages/welcome.vue b/src/client/app/desktop/views/pages/welcome.vue
index 7f5f4b9c37..65651f7ffc 100644
--- a/src/client/app/desktop/views/pages/welcome.vue
+++ b/src/client/app/desktop/views/pages/welcome.vue
@@ -14,7 +14,7 @@
<div class="main block">
<div>
<h1 v-if="name != 'Misskey'">{{ name }}</h1>
- <h1 v-else><img :src="$store.state.device.darkmode ? 'assets/title.dark.svg' : 'assets/title.light.svg'" :alt="name"></h1>
+ <h1 v-else><img svg-inline src="../../../../assets/title.svg" :alt="name"></h1>
<div class="info">
<span><b>{{ host }}</b> - <span v-html="'%i18n:@powered-by-misskey%'"></span></span>
@@ -95,7 +95,7 @@
</div>
</main>
- <modal name="about" :class="$store.state.device.darkmode ? ['about', 'modal-dark'] : ['about', 'modal-light']" width="800px" height="auto" scrollable>
+ <modal name="about" class="about modal" width="800px" height="auto" scrollable>
<article class="fpdezooorhntlzyeszemrsqdlgbysvxq">
<h1>%i18n:common.intro.title%</h1>
<p v-html="'%i18n:common.intro.about%'"></p>
@@ -134,12 +134,12 @@
</article>
</modal>
- <modal name="signup" :class="$store.state.device.darkmode ? 'modal-dark' : 'modal-light'" width="450px" height="auto" scrollable>
+ <modal name="signup" class="modal" width="450px" height="auto" scrollable>
<header class="formHeader">%i18n:@signup%</header>
<mk-signup class="form"/>
</modal>
- <modal name="signin" :class="$store.state.device.darkmode ? 'modal-dark' : 'modal-light'" width="450px" height="auto" scrollable>
+ <modal name="signin" class="modal" width="450px" height="auto" scrollable>
<header class="formHeader">%i18n:@signin%</header>
<mk-signin class="form"/>
</modal>
@@ -226,23 +226,7 @@ export default Vue.extend({
.v--modal-overlay
background rgba(0, 0, 0, 0.6)
-.modal-light
- .v--modal-box
- color #777
-
- .formHeader
- border-bottom solid 1px #eee
-
-.modal-dark
- .v--modal-box
- background #313543
- color #fff
-
- .formHeader
- border-bottom solid 1px rgba(#000, 0.2)
-
-.modal-light
-.modal-dark
+.modal
.form
padding 24px 48px 48px 48px
@@ -252,6 +236,13 @@ export default Vue.extend({
margin 0 48px
font-size 1.5em
+ .v--modal-box
+ background var(--face)
+ color var(--text)
+
+ .formHeader
+ border-bottom solid 1px rgba(#000, 0.2)
+
.v--modal-overlay.about
.v--modal-box.v--modal
margin 32px 0
@@ -267,7 +258,7 @@ export default Vue.extend({
> section
> h2
- border-bottom 1px solid isDark ? rgba(#000, 0.2) : rgba(#000, 0.05)
+ border-bottom 1px solid var(--faceDivider)
> section
display grid
@@ -276,7 +267,7 @@ export default Vue.extend({
gap 32px
margin-bottom 32px
padding-bottom 32px
- border-bottom 1px solid isDark ? rgba(#000, 0.2) : rgba(#000, 0.05)
+ border-bottom 1px solid var(--faceDivider)
&:nth-child(odd)
grid-template-columns 1fr 180px
@@ -303,15 +294,9 @@ export default Vue.extend({
</style>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-welcome
display flex
min-height 100vh
- //background-color #00070F
- //background-image url('/assets/bg.jpg')
- //background-position center
- //background-size cover
> .banner
position absolute
@@ -331,7 +316,7 @@ root(isDark)
left 0
width 100%
height 100px
- background linear-gradient(transparent, isDark ? #191b22 : #f7f7f7)
+ background linear-gradient(transparent, var(--bg))
> .forkit
position absolute
@@ -345,7 +330,7 @@ root(isDark)
left 16px
padding 16px
font-size 18px
- color isDark ? #fff : #444
+ color var(--text)
> main
margin 0 auto
@@ -354,8 +339,8 @@ root(isDark)
max-width 1200px
.block
- color isDark ? #fff : #444
- background isDark ? #282C37 : #fff
+ color var(--text)
+ background var(--face)
box-shadow var(--shadow)
//border-radius 8px
overflow auto
@@ -364,10 +349,8 @@ root(isDark)
z-index 1
padding 0 16px
line-height 48px
- background isDark ? #313543 : #fff
-
- if !isDark
- box-shadow 0 1px 0px rgba(0, 0, 0, 0.1)
+ background var(--faceHeader)
+ box-shadow 0 1px 0px rgba(0, 0, 0, 0.1)
& + div
max-height calc(100% - 48px)
@@ -385,7 +368,7 @@ root(isDark)
> .main
grid-row 1
grid-column 1 / 3
- border-top solid 5px $theme-color
+ border-top solid 5px var(--primary)
> div
padding 32px
@@ -394,9 +377,11 @@ root(isDark)
> h1
margin 0
- > img
+ > svg
margin -8px 0 0 -16px
- max-width 280px
+ width 280px
+ height 100px
+ fill currentColor
> .info
margin 0 auto 16px auto
@@ -406,7 +391,7 @@ root(isDark)
> .stats
margin-left 16px
padding-left 16px
- border-left solid 1px isDark ? #fff : #444
+ border-left solid 1px var(--faceDivider)
> *
margin-right 16px
@@ -426,7 +411,7 @@ root(isDark)
cursor pointer
&:hover
- color $theme-color
+ color var(--primary)
> .char
display block
@@ -449,7 +434,7 @@ root(isDark)
> div
padding 0 0 16px 0
margin 0 0 16px 0
- border-bottom 1px solid isDark ? rgba(#000, 0.2) : rgba(#000, 0.05)
+ border-bottom 1px solid var(--faceDivider)
> h1
margin 0
@@ -518,10 +503,4 @@ root(isDark)
display block
margin 0
-.mk-welcome[data-darkmode]
- root(true)
-
-.mk-welcome:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/widgets/polls.vue b/src/client/app/desktop/views/widgets/polls.vue
index 8ff0bb5d0d..c10ac1ca17 100644
--- a/src/client/app/desktop/views/widgets/polls.vue
+++ b/src/client/app/desktop/views/widgets/polls.vue
@@ -4,7 +4,7 @@
<template slot="header">%fa:chart-pie%%i18n:@title%</template>
<button slot="func" title="%i18n:@refresh%" @click="fetch">%fa:sync%</button>
- <div class="mkw-polls--body" :data-darkmode="$store.state.device.darkmode">
+ <div class="mkw-polls--body">
<div class="poll" v-if="!fetching && poll != null">
<p v-if="poll.text"><router-link :to="poll | notePage">{{ poll.text }}</router-link></p>
<p v-if="!poll.text"><router-link :to="poll | notePage">%fa:link%</router-link></p>
@@ -64,11 +64,11 @@ export default define({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.mkw-polls--body
> .poll
padding 16px
font-size 12px
- color isDark ? #9ea4ad : #555
+ color var(--text)
> p
margin 0 0 8px 0
@@ -91,10 +91,4 @@ root(isDark)
> [data-fa]
margin-right 4px
-.mkw-polls--body[data-darkmode]
- root(true)
-
-.mkw-polls--body:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/widgets/post-form.vue b/src/client/app/desktop/views/widgets/post-form.vue
index 19a2790d95..a763f4d17c 100644
--- a/src/client/app/desktop/views/widgets/post-form.vue
+++ b/src/client/app/desktop/views/widgets/post-form.vue
@@ -68,7 +68,7 @@ export default define({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.mkw-post-form
background #fff
@@ -107,8 +107,8 @@ export default define({
margin 0
padding 0 10px
height 28px
- color $theme-color-foreground
- background $theme-color !important
+ color var(--primaryForeground)
+ background var(--primary) !important
outline none
border none
border-radius 4px
@@ -116,10 +116,10 @@ export default define({
cursor pointer
&:hover
- background lighten($theme-color, 10%) !important
+ background var(--primaryLighten10) !important
&:active
- background darken($theme-color, 10%) !important
+ background var(--primaryDarken10) !important
transition background 0s ease
</style>
diff --git a/src/client/app/desktop/views/widgets/profile.vue b/src/client/app/desktop/views/widgets/profile.vue
index 04ef18c8e3..91354324ce 100644
--- a/src/client/app/desktop/views/widgets/profile.vue
+++ b/src/client/app/desktop/views/widgets/profile.vue
@@ -4,7 +4,6 @@
<div class="egwyvoaaryotefqhqtmiyawwefemjfsd-body"
:data-compact="props.design == 1 || props.design == 2"
:data-melt="props.design == 2"
- :data-darkmode="$store.state.device.darkmode"
>
<div class="banner"
:style="$store.state.i.bannerUrl ? `background-image: url(${$store.state.i.bannerUrl})` : ''"
@@ -46,8 +45,7 @@ export default define({
</script>
<style lang="stylus" scoped>
-root(isDark)
-
+.egwyvoaaryotefqhqtmiyawwefemjfsd-body
&[data-compact]
> .banner:before
content ""
@@ -88,7 +86,7 @@ root(isDark)
> .banner
height 100px
- background-color isDark ? #303e4a : #f5f5f5
+ background-color var(--primaryDarken10)
background-size cover
background-position center
cursor pointer
@@ -100,7 +98,7 @@ root(isDark)
left 16px
width 58px
height 58px
- border solid 3px isDark ? #282c37 : #fff
+ border solid 3px var(--face)
border-radius 8px
cursor pointer
@@ -109,19 +107,14 @@ root(isDark)
margin 10px 0 0 84px
line-height 16px
font-weight bold
- color isDark ? #fff : #555
+ color var(--text)
> .username
display block
margin 4px 0 8px 84px
line-height 16px
font-size 0.9em
- color isDark ? #606984 : #999
-
-.egwyvoaaryotefqhqtmiyawwefemjfsd-body[data-darkmode]
- root(true)
-
-.egwyvoaaryotefqhqtmiyawwefemjfsd-body:not([data-darkmode])
- root(false)
+ color var(--text)
+ opacity 0.7
</style>
diff --git a/src/client/app/desktop/views/widgets/trends.vue b/src/client/app/desktop/views/widgets/trends.vue
index aeaab63ac4..a886796132 100644
--- a/src/client/app/desktop/views/widgets/trends.vue
+++ b/src/client/app/desktop/views/widgets/trends.vue
@@ -67,7 +67,7 @@ export default define({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.mkw-trends
.mkw-trends--body
> .note
padding 16px
@@ -98,10 +98,4 @@ root(isDark)
> [data-fa]
margin-right 4px
-.mkw-trends[data-darkmode]
- root(true)
-
-.mkw-trends:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/desktop/views/widgets/users.vue b/src/client/app/desktop/views/widgets/users.vue
index 328fa56697..28c6372b6f 100644
--- a/src/client/app/desktop/views/widgets/users.vue
+++ b/src/client/app/desktop/views/widgets/users.vue
@@ -73,11 +73,11 @@ export default define({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.mkw-users
.mkw-users--body
> .user
padding 16px
- border-bottom solid 1px isDark ? #1c2023 : #eee
+ border-bottom solid 1px var(--faceDivider)
&:last-child
border-bottom none
@@ -103,14 +103,15 @@ root(isDark)
margin 0
font-size 16px
line-height 24px
- color isDark ? #fff : #555
+ color var(--text)
> .username
display block
margin 0
font-size 15px
line-height 16px
- color isDark ? #606984 : #ccc
+ color var(--text)
+ opacity 0.7
> .mk-follow-button
position absolute
@@ -132,10 +133,4 @@ root(isDark)
> [data-fa]
margin-right 4px
-.mkw-users[data-darkmode]
- root(true)
-
-.mkw-users:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/init.css b/src/client/app/init.css
index 6ee25d64e2..92bb1d8cf4 100644
--- a/src/client/app/init.css
+++ b/src/client/app/init.css
@@ -32,7 +32,7 @@ body > noscript {
left: 0;
width: 100%;
height: 100%;
- background: #fff;
+ background: var(--bg);
cursor: wait;
}
#ini > svg {
@@ -47,10 +47,6 @@ body > noscript {
animation: ini 0.6s infinite linear;
}
-html[data-darkmode] #ini {
- background: #191b22;
-}
-
@keyframes ini {
from {
transform: rotate(0deg);
diff --git a/src/client/app/init.ts b/src/client/app/init.ts
index 4e1d1b70c7..802f7b42eb 100644
--- a/src/client/app/init.ts
+++ b/src/client/app/init.ts
@@ -8,12 +8,18 @@ import VueRouter from 'vue-router';
import * as TreeView from 'vue-json-tree-view';
import VAnimateCss from 'v-animate-css';
import VModal from 'vue-js-modal';
-import VueHotkey from './common/hotkey';
+import VueHotkey from './common/hotkey';
import App from './app.vue';
import checkForUpdate from './common/scripts/check-for-update';
import MiOS, { API } from './mios';
import { version, codename, lang } from './config';
+import { builtinThemes, applyTheme } from './theme';
+const lightTheme = require('../theme/light.json');
+
+if (localStorage.getItem('theme') == null) {
+ applyTheme(lightTheme);
+}
Vue.use(Vuex);
Vue.use(VueRouter);
@@ -86,41 +92,31 @@ export default (callback: (launch: (router: VueRouter, api?: (os: MiOS) => API)
const launch = (router: VueRouter, api?: (os: MiOS) => API) => {
os.apis = api ? api(os) : null;
- //#region Dark/Light
- Vue.mixin({
- data() {
- return {
- _unwatchDarkmode_: null
- };
- },
- mounted() {
- const apply = v => {
- if (this.$el.setAttribute == null) return;
- if (v) {
- this.$el.setAttribute('data-darkmode', 'true');
- } else {
- this.$el.removeAttribute('data-darkmode');
- }
- };
-
- apply(os.store.state.device.darkmode);
-
- this._unwatchDarkmode_ = os.store.watch(s => {
- return s.device.darkmode;
- }, apply);
- },
- beforeDestroy() {
- this._unwatchDarkmode_();
+ //#region theme
+ os.store.watch(s => {
+ return s.device.darkmode;
+ }, v => {
+ const themes = os.store.state.device.themes.concat(builtinThemes);
+ const dark = themes.find(t => t.meta.id == os.store.state.device.darkTheme);
+ const light = themes.find(t => t.meta.id == os.store.state.device.lightTheme);
+ applyTheme(v ? dark : light);
+ });
+ os.store.watch(s => {
+ return s.device.lightTheme;
+ }, v => {
+ const themes = os.store.state.device.themes.concat(builtinThemes);
+ const theme = themes.find(t => t.meta.id == v);
+ if (!os.store.state.device.darkmode) {
+ applyTheme(theme);
}
});
-
os.store.watch(s => {
- return s.device.darkmode;
+ return s.device.darkTheme;
}, v => {
- if (v) {
- document.documentElement.setAttribute('data-darkmode', 'true');
- } else {
- document.documentElement.removeAttribute('data-darkmode');
+ const themes = os.store.state.device.themes.concat(builtinThemes);
+ const theme = themes.find(t => t.meta.id == v);
+ if (os.store.state.device.darkmode) {
+ applyTheme(theme);
}
});
//#endregion
diff --git a/src/client/app/mobile/style.styl b/src/client/app/mobile/style.styl
index df8f4a8fae..095e5266fd 100644
--- a/src/client/app/mobile/style.styl
+++ b/src/client/app/mobile/style.styl
@@ -8,12 +8,4 @@
html
height 100%
- background #ececed !important
-
- &[data-darkmode]
- background #191B22 !important
-
-body
- display flex
- flex-direction column
- min-height 100%
+ background var(--bg)
diff --git a/src/client/app/mobile/views/components/dialog.vue b/src/client/app/mobile/views/components/dialog.vue
index 6a0d74c752..fff44a28c3 100644
--- a/src/client/app/mobile/views/components/dialog.vue
+++ b/src/client/app/mobile/views/components/dialog.vue
@@ -91,7 +91,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.mk-dialog
> .bg
@@ -145,20 +145,20 @@ export default Vue.extend({
margin 0 0.375em
&:hover
- color $theme-color
+ color var(--primary)
&:active
- color darken($theme-color, 10%)
+ color var(--primaryDarken10)
transition color 0s ease
</style>
<style lang="stylus" module>
-@import '~const.styl'
+
.header
margin 0 0 1em 0
- color $theme-color
+ color var(--primary)
// color #43A4EC
font-weight bold
diff --git a/src/client/app/mobile/views/components/drive-file-chooser.vue b/src/client/app/mobile/views/components/drive-file-chooser.vue
index 92ac211af2..5fca19939e 100644
--- a/src/client/app/mobile/views/components/drive-file-chooser.vue
+++ b/src/client/app/mobile/views/components/drive-file-chooser.vue
@@ -46,7 +46,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.cdxzvcfawjxdyxsekbxbfgtplebnoneb
position fixed
z-index 20000
top 0
@@ -59,11 +59,11 @@ root(isDark)
> .body
width 100%
height 100%
- background isDark ? #282c37 : #fff
+ background var(--faceHeader)
> header
- border-bottom solid 1px isDark ? #1b1f29 : #eee
- color isDark ? #fff : #111
+ border-bottom solid 1px var(--faceDivider)
+ color var(--text)
> h1
margin 0
@@ -96,10 +96,4 @@ root(isDark)
overflow scroll
-webkit-overflow-scrolling touch
-.cdxzvcfawjxdyxsekbxbfgtplebnoneb[data-darkmode]
- root(true)
-
-.cdxzvcfawjxdyxsekbxbfgtplebnoneb:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/components/drive.file-detail.vue b/src/client/app/mobile/views/components/drive.file-detail.vue
index 8108892597..de46297fcb 100644
--- a/src/client/app/mobile/views/components/drive.file-detail.vue
+++ b/src/client/app/mobile/views/components/drive.file-detail.vue
@@ -134,10 +134,10 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.pyvicwrksnfyhpfgkjwqknuururpaztw
> .preview
padding 8px
- background isDark ? #191b22 : #f0f0f0
+ background var(--bg)
> img
display block
@@ -148,9 +148,10 @@ root(isDark)
> footer
padding 8px 8px 0 8px
- font-size 0.8em
- color isDark ? #606984 : #888
text-align center
+ font-size 0.8em
+ color var(--text)
+ opacity 0.7
> .separator
display inline
@@ -178,12 +179,12 @@ root(isDark)
> .info
padding 14px
font-size 0.8em
- border-top solid 1px isDark ? #1c2023 : #dfdfdf
+ border-top solid 1px var(--faceDivider)
> div
max-width 500px
margin 0 auto
- color isDark ? #9397a2 : #9d9d9d
+ color var(--text)
> .separator
padding 0 4px
@@ -198,7 +199,7 @@ root(isDark)
> .menu
padding 14px
- border-top solid 1px isDark ? #1c2023 : #dfdfdf
+ border-top solid 1px var(--faceDivider)
> div
max-width 500px
@@ -209,31 +210,26 @@ root(isDark)
width 100%
padding 10px 16px
margin 0 0 12px 0
- color isDark ? #dfe3e8 : #333
+ color var(--primaryForeground)
font-size 0.9em
text-align center
text-decoration none
- text-shadow 0 1px 0 isDark ? rgba(0, 0, 0, 0.9) : rgba(255, 255, 255, 0.9)
- background-image isDark ? linear-gradient(#292f3c, #1b2025) : linear-gradient(#fafafa, #eaeaea)
- border 1px solid isDark ? #121417 : #ddd
- border-bottom-color isDark ? #060606 : #cecece
+ background var(--primary)
+ border none
border-radius 3px
&:last-child
margin-bottom 0
&:active
- background-color #767676
- background-image none
- border-color #444
- box-shadow 0 1px 3px rgba(#000, 0.075), inset 0 0 5px rgba(#000, 0.2)
+ background var(--primaryDarken10)
> [data-fa]
margin-right 4px
> .hash
padding 14px
- border-top solid 1px isDark ? #1c2023 : #dfdfdf
+ border-top solid 1px var(--faceDivider)
> div
max-width 500px
@@ -243,7 +239,7 @@ root(isDark)
display block
margin 0
padding 0
- color isDark ? #a8b7d0 : #555
+ color var(--text)
font-size 0.9em
> [data-fa]
@@ -264,7 +260,7 @@ root(isDark)
> .exif
padding 14px
- border-top solid 1px isDark ? #1c2023 : #dfdfdf
+ border-top solid 1px var(--faceDivider)
> div
max-width 500px
@@ -274,7 +270,7 @@ root(isDark)
display block
margin 0
padding 0
- color isDark ? #a8b7d0 : #555
+ color var(--text)
font-size 0.9em
> [data-fa]
@@ -292,10 +288,4 @@ root(isDark)
border-radius 2px
background #f5f5f5
-.pyvicwrksnfyhpfgkjwqknuururpaztw[data-darkmode]
- root(true)
-
-.pyvicwrksnfyhpfgkjwqknuururpaztw:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/components/drive.file.vue b/src/client/app/mobile/views/components/drive.file.vue
index 4375cfdd7b..68978bb944 100644
--- a/src/client/app/mobile/views/components/drive.file.vue
+++ b/src/client/app/mobile/views/components/drive.file.vue
@@ -63,9 +63,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.vupkuhvjnjyqaqhsiogfbywvjxynrgsm
display block
text-decoration none !important
@@ -103,7 +101,7 @@ root(isDark)
padding 0
font-size 0.9em
font-weight bold
- color isDark ? #fff : #555
+ color var(--text)
text-overflow ellipsis
overflow-wrap break-word
@@ -127,21 +125,22 @@ root(isDark)
display block
margin 4px 0 0 0
font-size 0.7em
+ color var(--text)
> .separator
padding 0 4px
> .type
- color #9D9D9D
+ opacity 0.7
> .mk-file-type-icon
margin-right 4px
> .data-size
- color #9D9D9D
+ opacity 0.7
> .created-at
- color #BDBDBD
+ opacity 0.7
> [data-fa]
margin-right 2px
@@ -150,15 +149,9 @@ root(isDark)
color #bf4633
&[data-is-selected]
- background $theme-color
+ background var(--primary)
&, *
color #fff !important
-.vupkuhvjnjyqaqhsiogfbywvjxynrgsm[data-darkmode]
- root(true)
-
-.vupkuhvjnjyqaqhsiogfbywvjxynrgsm:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/components/drive.folder.vue b/src/client/app/mobile/views/components/drive.folder.vue
index f76ecba6ad..05dcbd083e 100644
--- a/src/client/app/mobile/views/components/drive.folder.vue
+++ b/src/client/app/mobile/views/components/drive.folder.vue
@@ -24,9 +24,9 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.jvwxssxsytqlqvrpiymarjlzlsxskqsr
display block
- color isDark ? #fff : #777
+ color var(--text)
text-decoration none !important
*
@@ -55,10 +55,4 @@ root(isDark)
> *
height 100%
-.jvwxssxsytqlqvrpiymarjlzlsxskqsr[data-darkmode]
- root(true)
-
-.jvwxssxsytqlqvrpiymarjlzlsxskqsr:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/components/drive.vue b/src/client/app/mobile/views/components/drive.vue
index 36a6ea2f40..8919462511 100644
--- a/src/client/app/mobile/views/components/drive.vue
+++ b/src/client/app/mobile/views/components/drive.vue
@@ -473,8 +473,8 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
- background isDark ? #282c37 : #fff
+.kmmwchoexgckptowjmjgfsygeltxfeqs
+ background var(--face)
> nav
display block
@@ -487,10 +487,10 @@ root(isDark)
overflow auto
white-space nowrap
font-size 0.9em
- color rgba(isDark ? #fff : #000, 0.67)
+ color var(--text)
-webkit-backdrop-filter blur(12px)
backdrop-filter blur(12px)
- background-color rgba(isDark ? #313543 : #fff, 0.75)
+ background-color var(--mobileDriveNavBg)
border-bottom solid 1px rgba(#000, 0.13)
> p
@@ -516,7 +516,7 @@ root(isDark)
opacity 0.5
> .info
- border-bottom solid 1px isDark ? #1c2023 : #eee
+ border-bottom solid 1px var(--faceDivider)
&:empty
display none
@@ -527,15 +527,15 @@ root(isDark)
margin 0 auto
padding 4px 16px
font-size 10px
- color isDark ? #606984 : #777
+ color var(--text)
> .folders
> .folder
- border-bottom solid 1px isDark ? #1c2023 : #eee
+ border-bottom solid 1px var(--faceDivider)
> .files
> .file
- border-bottom solid 1px isDark ? #1c2023 : #eee
+ border-bottom solid 1px var(--faceDivider)
> .more
display block
@@ -591,10 +591,4 @@ root(isDark)
> .file
display none
-.kmmwchoexgckptowjmjgfsygeltxfeqs[data-darkmode]
- root(true)
-
-.kmmwchoexgckptowjmjgfsygeltxfeqs:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/components/follow-button.vue b/src/client/app/mobile/views/components/follow-button.vue
index ff7260edb5..cff830d998 100644
--- a/src/client/app/mobile/views/components/follow-button.vue
+++ b/src/client/app/mobile/views/components/follow-button.vue
@@ -93,7 +93,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.mk-follow-button
display block
@@ -105,29 +105,29 @@ export default Vue.extend({
line-height 36px
font-size 14px
font-weight bold
- color $theme-color
+ color var(--primary)
background transparent
outline none
- border solid 1px $theme-color
+ border solid 1px var(--primary)
border-radius 36px
&:hover
- background rgba($theme-color, 0.1)
+ background var(--primaryAlpha01)
&:active
- background rgba($theme-color, 0.2)
+ background var(--primaryAlpha02)
&.active
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
&:hover
- background lighten($theme-color, 10%)
- border-color lighten($theme-color, 10%)
+ background var(--primaryLighten10)
+ border-color var(--primaryLighten10)
&:active
- background darken($theme-color, 10%)
- border-color darken($theme-color, 10%)
+ background var(--primaryDarken10)
+ border-color var(--primaryDarken10)
&.wait
cursor wait !important
diff --git a/src/client/app/mobile/views/components/mute-button.vue b/src/client/app/mobile/views/components/mute-button.vue
index 3cb568615d..316fbda8f1 100644
--- a/src/client/app/mobile/views/components/mute-button.vue
+++ b/src/client/app/mobile/views/components/mute-button.vue
@@ -41,11 +41,11 @@ export default Vue.extend({
<style lang="stylus" scoped>
-@import '~const.styl'
+
.mk-mute-button
display block
- user-select none
+ user-select none
cursor pointer
padding 0 16px
margin 0
@@ -53,27 +53,27 @@ export default Vue.extend({
line-height 36px
font-size 14px
font-weight bold
- color $theme-color
+ color var(--primary)
background transparent
outline none
- border solid 1px $theme-color
+ border solid 1px var(--primary)
border-radius 36px
&:hover
- background rgba($theme-color, 0.1)
+ background var(--primaryAlpha01)
&:active
- background rgba($theme-color, 0.2)
+ background var(--primaryAlpha02)
&.active
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
&:hover
- background lighten($theme-color, 10%)
- border-color lighten($theme-color, 10%)
+ background var(--primaryLighten10)
+ border-color var(--primaryLighten10)
&:active
- background darken($theme-color, 10%)
- border-color darken($theme-color, 10%)
+ background var(--primaryDarken10)
+ border-color var(--primaryDarken10)
</style>
diff --git a/src/client/app/mobile/views/components/note-card.vue b/src/client/app/mobile/views/components/note-card.vue
index e8427798cd..de9c9c1450 100644
--- a/src/client/app/mobile/views/components/note-card.vue
+++ b/src/client/app/mobile/views/components/note-card.vue
@@ -27,17 +27,18 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.mk-note-card
display inline-block
width 150px
//height 120px
font-size 12px
- background isDark ? #282c37 : #fff
+ background var(--face)
border-radius 4px
+ box-shadow 0 2px 8px rgba(0, 0, 0, 0.2)
> a
display block
- color isDark ? #fff : #2c3940
+ color var(--noteText)
&:hover
text-decoration none
@@ -75,17 +76,11 @@ root(isDark)
left 0
width 100%
height 20px
- background isDark ? linear-gradient(to bottom, rgba(#282c37, 0) 0%, #282c37 100%) : linear-gradient(to bottom, rgba(#fff, 0) 0%, #fff 100%)
+ background linear-gradient(to bottom, transparent 0%, var(--face) 100%)
> .mk-time
display inline-block
padding 8px
color #aaa
-.mk-note-card[data-darkmode]
- root(true)
-
-.mk-note-card:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/components/note-detail.vue b/src/client/app/mobile/views/components/note-detail.vue
index 68be9f8ac4..48d6d32868 100644
--- a/src/client/app/mobile/views/components/note-detail.vue
+++ b/src/client/app/mobile/views/components/note-detail.vue
@@ -223,13 +223,11 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-note-detail
overflow hidden
width 100%
text-align left
- background isDark ? #282C37 : #fff
+ background var(--face)
border-radius 8px
box-shadow 0 0 2px rgba(#000, 0.1)
@@ -248,26 +246,26 @@ root(isDark)
text-align center
color #999
cursor pointer
- background isDark ? #21242d : #fafafa
+ background var(--subNoteBg)
outline none
border none
- border-bottom solid 1px isDark ? #1c2023 : #eef0f2
+ border-bottom solid 1px var(--faceDivider)
border-radius 6px 6px 0 0
box-shadow none
&:hover
- background isDark ? #16181d : #f6f6f6
+ box-shadow 0 0 0 100px inset rgba(0, 0, 0, 0.05)
- &:disabled
- color #ccc
+ &:active
+ box-shadow 0 0 0 100px inset rgba(0, 0, 0, 0.1)
> .conversation
> *
- border-bottom 1px solid isDark ? #1c2023 : #eef0f2
+ border-bottom 1px solid var(--faceDivider)
> .renote
- color #9dbb00
- background isDark ? linear-gradient(to bottom, #314027 0%, #282c37 100%) : linear-gradient(to bottom, #edfde2 0%, #fff 100%)
+ color var(--renoteText)
+ background linear-gradient(to bottom, var(--renoteGradient) 0%, var(--face) 100%)
> p
margin 0
@@ -290,7 +288,7 @@ root(isDark)
padding-top 8px
> .reply-to
- border-bottom 1px solid isDark ? #1c2023 : #eef0f2
+ border-bottom 1px solid var(--faceDivider)
> article
padding 14px 16px 9px 16px
@@ -323,7 +321,7 @@ root(isDark)
> .name
display inline-block
margin .4em 0
- color isDark ? #fff : #627079
+ color var(--noteHeaderName)
font-size 16px
font-weight bold
text-align left
@@ -336,7 +334,7 @@ root(isDark)
display block
text-align left
margin 0
- color isDark ? #606984 : #ccc
+ color var(--noteHeaderAcct)
> .body
padding 8px 0
@@ -347,7 +345,7 @@ root(isDark)
margin 0
padding 0
overflow-wrap break-word
- color isDark ? #fff : #717171
+ color var(--noteText)
> .text
margin-right 8px
@@ -360,7 +358,7 @@ root(isDark)
padding 0
overflow-wrap break-word
font-size 16px
- color isDark ? #fff : #717171
+ color var(--noteText)
@media (min-width 500px)
font-size 24px
@@ -370,7 +368,7 @@ root(isDark)
> *
padding 16px
- border dashed 1px #c0dac6
+ border dashed 1px var(--quoteBorder)
border-radius 8px
> .location
@@ -395,7 +393,7 @@ root(isDark)
> .time
font-size 16px
- color isDark ? #606984 : #c0c0c0
+ color var(--noteHeaderInfo)
> footer
font-size 1.2em
@@ -407,14 +405,14 @@ root(isDark)
border none
box-shadow none
font-size 1em
- color isDark ? #606984 : #ddd
+ color var(--noteActions)
cursor pointer
&:not(:last-child)
margin-right 28px
&:hover
- color isDark ? #9198af : #666
+ color var(--noteActionsHover)
> .count
display inline
@@ -422,16 +420,10 @@ root(isDark)
color #999
&.reacted
- color $theme-color
+ color var(--primary)
> .replies
> *
- border-top 1px solid isDark ? #1c2023 : #eef0f2
-
-.mk-note-detail[data-darkmode]
- root(true)
-
-.mk-note-detail:not([data-darkmode])
- root(false)
+ border-top 1px solid var(--faceDivider)
</style>
diff --git a/src/client/app/mobile/views/components/note-preview.vue b/src/client/app/mobile/views/components/note-preview.vue
index 4c03593a9e..525f54998e 100644
--- a/src/client/app/mobile/views/components/note-preview.vue
+++ b/src/client/app/mobile/views/components/note-preview.vue
@@ -36,7 +36,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.yohlumlkhizgfkvvscwfcrcggkotpvry
display flex
margin 0
padding 0
@@ -88,7 +88,7 @@ root(isDark)
margin 0
padding 0
overflow-wrap break-word
- color isDark ? #fff : #717171
+ color var(--noteText)
> .text
margin-right 8px
@@ -98,12 +98,6 @@ root(isDark)
cursor default
margin 0
padding 0
- color isDark ? #959ba7 : #717171
-
-.yohlumlkhizgfkvvscwfcrcggkotpvry[data-darkmode]
- root(true)
-
-.yohlumlkhizgfkvvscwfcrcggkotpvry:not([data-darkmode])
- root(false)
+ color var(--subNoteText)
</style>
diff --git a/src/client/app/mobile/views/components/note.sub.vue b/src/client/app/mobile/views/components/note.sub.vue
index c25f827dad..24f5be160c 100644
--- a/src/client/app/mobile/views/components/note.sub.vue
+++ b/src/client/app/mobile/views/components/note.sub.vue
@@ -41,11 +41,11 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.zlrxdaqttccpwhpaagdmkawtzklsccam
display flex
padding 16px
font-size 10px
- background isDark ? #21242d : #fcfcfc
+ background var(--subNoteBg)
@media (min-width 350px)
font-size 12px
@@ -95,7 +95,7 @@ root(isDark)
margin 0
padding 0
overflow-wrap break-word
- color isDark ? #fff : #717171
+ color var(--noteText)
> .text
margin-right 8px
@@ -104,16 +104,10 @@ root(isDark)
> .text
margin 0
padding 0
- color isDark ? #959ba7 : #717171
+ color var(--subNoteText)
pre
max-height 120px
font-size 80%
-.zlrxdaqttccpwhpaagdmkawtzklsccam[data-darkmode]
- root(true)
-
-.zlrxdaqttccpwhpaagdmkawtzklsccam:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/components/note.vue b/src/client/app/mobile/views/components/note.vue
index 0ce72cab11..4af19ade29 100644
--- a/src/client/app/mobile/views/components/note.vue
+++ b/src/client/app/mobile/views/components/note.vue
@@ -228,11 +228,9 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.note
font-size 12px
- border-bottom solid 1px isDark ? #1c2023 : #eaeaea
+ border-bottom solid 1px var(--faceDivider)
&:last-of-type
border-bottom none
@@ -256,8 +254,8 @@ root(isDark)
padding 8px 16px
line-height 28px
white-space pre
- color #9dbb00
- background isDark ? linear-gradient(to bottom, #314027 0%, #282c37 100%) : linear-gradient(to bottom, #edfde2 0%, #fff 100%)
+ color var(--renoteText)
+ background linear-gradient(to bottom, var(--renoteGradient) 0%, var(--face) 100%)
@media (min-width 500px)
padding 16px
@@ -349,7 +347,7 @@ root(isDark)
margin 0
padding 0
overflow-wrap break-word
- color isDark ? #fff : #717171
+ color var(--noteText)
> .text
margin-right 8px
@@ -361,7 +359,7 @@ root(isDark)
margin 0
padding 0
overflow-wrap break-word
- color isDark ? #fff : #717171
+ color var(--noteText)
>>> .title
display block
@@ -369,7 +367,7 @@ root(isDark)
padding 4px
font-size 90%
text-align center
- background isDark ? #2f3944 : #eef1f3
+ background var(--mfmTitleBg)
border-radius 4px
>>> .code
@@ -378,25 +376,25 @@ root(isDark)
>>> .quote
margin 8px
padding 6px 12px
- color isDark ? #6f808e : #aaa
- border-left solid 3px isDark ? #637182 : #eee
+ color var(--mfmQuote)
+ border-left solid 3px var(--mfmQuoteLine)
> .reply
margin-right 8px
- color isDark ? #99abbf : #717171
+ color var(--noteText)
> .rp
margin-left 4px
font-style oblique
- color #a0bf46
+ color var(--renoteText)
[data-is-me]:after
content "you"
padding 0 4px
margin-left 4px
font-size 80%
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
border-radius 4px
.mk-url-preview
@@ -427,7 +425,7 @@ root(isDark)
> *
padding 16px
- border dashed 1px isDark ? #4e945e : #c0dac6
+ border dashed 1px var(--quoteBorder)
border-radius 8px
> .app
@@ -442,14 +440,14 @@ root(isDark)
border none
box-shadow none
font-size 1em
- color isDark ? #606984 : #ddd
+ color var(--noteActions)
cursor pointer
&:not(:last-child)
margin-right 28px
&:hover
- color isDark ? #9198af : #666
+ color var(--noteActionsHover)
> .count
display inline
@@ -457,13 +455,7 @@ root(isDark)
color #999
&.reacted
- color $theme-color
-
-.note[data-darkmode]
- root(true)
-
-.note:not([data-darkmode])
- root(false)
+ color var(--primary)
</style>
diff --git a/src/client/app/mobile/views/components/notes.vue b/src/client/app/mobile/views/components/notes.vue
index 401df3ae5b..8f0a1ef196 100644
--- a/src/client/app/mobile/views/components/notes.vue
+++ b/src/client/app/mobile/views/components/notes.vue
@@ -217,11 +217,9 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-notes
overflow hidden
- background isDark ? #282C37 : #fff
+ background var(--face)
border-radius 8px
box-shadow 0 0 2px rgba(#000, 0.1)
@@ -243,9 +241,9 @@ root(isDark)
line-height 32px
text-align center
font-size 0.9em
- color isDark ? #666b79 : #aaa
- background isDark ? #242731 : #fdfdfd
- border-bottom solid 1px isDark ? #1c2023 : #eaeaea
+ color var(--dateDividerFg)
+ background var(--dateDividerBg)
+ border-bottom solid 1px var(--faceDivider)
span
margin 0 16px
@@ -276,7 +274,7 @@ root(isDark)
> footer
text-align center
- border-top solid 1px isDark ? #1c2023 : #eaeaea
+ border-top solid 1px var(--faceDivider)
&:empty
display none
@@ -293,10 +291,4 @@ root(isDark)
&:disabled
opacity 0.7
-.mk-notes[data-darkmode]
- root(true)
-
-.mk-notes:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/components/notification.vue b/src/client/app/mobile/views/components/notification.vue
index ee90c6b46b..4a09104341 100644
--- a/src/client/app/mobile/views/components/notification.vue
+++ b/src/client/app/mobile/views/components/notification.vue
@@ -105,7 +105,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.mk-notification
> .notification
padding 16px
font-size 12px
@@ -154,14 +154,14 @@ root(isDark)
> .mk-time
margin-left auto
- color isDark ? #606984 : #c0c0c0
+ color var(--noteHeaderInfo)
font-size 0.9em
> .note-preview
- color isDark ? #fff : #717171
+ color var(--noteText)
> .note-ref
- color isDark ? #fff : #717171
+ color var(--noteText)
[data-fa]
font-size 1em
@@ -182,10 +182,4 @@ root(isDark)
> div > header i
color #888
-.mk-notification[data-darkmode]
- root(true)
-
-.mk-notification:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/components/notifications.vue b/src/client/app/mobile/views/components/notifications.vue
index 11ac23f4b1..bfb6c1e62a 100644
--- a/src/client/app/mobile/views/components/notifications.vue
+++ b/src/client/app/mobile/views/components/notifications.vue
@@ -104,9 +104,9 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.mk-notifications
margin 0 auto
- background isDark ? #282C37 :#fff
+ background var(--face)
border-radius 8px
box-shadow 0 0 2px rgba(#000, 0.1)
overflow hidden
@@ -126,7 +126,7 @@ root(isDark)
> .notifications
> .mk-notification:not(:last-child)
- border-bottom solid 1px isDark ? #1c2023 : #eaeaea
+ border-bottom solid 1px var(--faceDivider)
> .date
display block
@@ -134,9 +134,9 @@ root(isDark)
line-height 32px
text-align center
font-size 0.8em
- color isDark ? #666b79 : #aaa
- background isDark ? #242731 : #fdfdfd
- border-bottom solid 1px isDark ? #1c2023 : #eaeaea
+ color var(--dateDividerFg)
+ background var(--dateDividerBg)
+ border-bottom solid 1px var(--faceDivider)
span
margin 0 16px
@@ -169,10 +169,4 @@ root(isDark)
> [data-fa]
margin-right 4px
-.mk-notifications[data-darkmode]
- root(true)
-
-.mk-notifications:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue
index 72ec142572..e4ec1aa576 100644
--- a/src/client/app/mobile/views/components/post-form.vue
+++ b/src/client/app/mobile/views/components/post-form.vue
@@ -336,9 +336,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.mk-post-form
max-width 500px
width calc(100% - 16px)
margin 8px auto
@@ -354,27 +352,27 @@ root(isDark)
margin 32px auto
> .form
- background isDark ? #282C37 : #fff
+ background var(--face)
border-radius 8px
box-shadow 0 0 2px rgba(#000, 0.1)
> header
z-index 1000
height 50px
- box-shadow 0 1px 0 0 isDark ? rgba(#000, 0.2) : rgba(#000, 0.1)
+ box-shadow 0 1px 0 0 var(--mobilePostFormDivider)
> .cancel
padding 0
width 50px
line-height 50px
font-size 24px
- color isDark ? #9baec8 : #555
+ color var(--text)
> div
position absolute
top 0
right 0
- color #657786
+ color var(--text)
> .text-count
line-height 50px
@@ -388,8 +386,8 @@ root(isDark)
padding 0 16px
line-height 34px
vertical-align bottom
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
border-radius 4px
&:disabled
@@ -408,7 +406,7 @@ root(isDark)
> span
margin-right 16px
- color isDark ? #fff : #666
+ color var(--text)
> input
z-index 1
@@ -420,11 +418,11 @@ root(isDark)
margin 0
width 100%
font-size 16px
- color isDark ? #fff : #333
- background isDark ? #191d23 : #fff
+ color var(--inputText)
+ background var(--mobilePostFormTextareaBg)
border none
border-radius 0
- box-shadow 0 1px 0 0 isDark ? rgba(#000, 0.2) : rgba(#000, 0.1)
+ box-shadow 0 1px 0 0 var(--mobilePostFormDivider)
&:disabled
opacity 0.5
@@ -493,10 +491,4 @@ root(isDark)
> *
margin-right 8px
-.mk-post-form[data-darkmode]
- root(true)
-
-.mk-post-form:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/components/sub-note-content.vue b/src/client/app/mobile/views/components/sub-note-content.vue
index 4d0aa25f34..2238edf278 100644
--- a/src/client/app/mobile/views/components/sub-note-content.vue
+++ b/src/client/app/mobile/views/components/sub-note-content.vue
@@ -37,7 +37,7 @@ export default Vue.extend({
> .rp
margin-left 4px
font-style oblique
- color #a0bf46
+ color var(--renoteText)
mk-poll
font-size 80%
diff --git a/src/client/app/mobile/views/components/ui.header.vue b/src/client/app/mobile/views/components/ui.header.vue
index 15c8299c2e..7fd68002e7 100644
--- a/src/client/app/mobile/views/components/ui.header.vue
+++ b/src/client/app/mobile/views/components/ui.header.vue
@@ -4,7 +4,6 @@
<mk-special-message/>
<div class="main" ref="main">
<div class="backdrop"></div>
- <p ref="welcomeback" v-if="$store.getters.isSignedIn">%i18n:@welcome-back%<b>{{ $store.state.i | userName }}</b>%i18n:@adjective%</p>
<div class="content" ref="mainContainer">
<button class="nav" @click="$parent.isDrawerOpening = true">%fa:bars%</button>
<template v-if="hasUnreadNotification || hasUnreadMessagingMessage || hasGameInvitation">%fa:circle%</template>
@@ -50,53 +49,6 @@ export default Vue.extend({
this.connection.on('reversi_invited', this.onReversiInvited);
this.connection.on('reversi_no_invites', this.onReversiNoInvites);
-
- const ago = (new Date().getTime() - new Date(this.$store.state.i.lastUsedAt).getTime()) / 1000;
- const isHisasiburi = ago >= 3600;
- this.$store.state.i.lastUsedAt = new Date();
-
- if (isHisasiburi) {
- (this.$refs.welcomeback as any).style.display = 'block';
- (this.$refs.main as any).style.overflow = 'hidden';
-
- anime({
- targets: this.$refs.welcomeback,
- top: '0',
- opacity: 1,
- delay: 1000,
- duration: 500,
- easing: 'easeOutQuad'
- });
-
- anime({
- targets: this.$refs.mainContainer,
- opacity: 0,
- delay: 1000,
- duration: 500,
- easing: 'easeOutQuad'
- });
-
- setTimeout(() => {
- anime({
- targets: this.$refs.welcomeback,
- top: '-48px',
- opacity: 0,
- duration: 500,
- complete: () => {
- (this.$refs.welcomeback as any).style.display = 'none';
- (this.$refs.main as any).style.overflow = 'initial';
- },
- easing: 'easeInQuad'
- });
-
- anime({
- targets: this.$refs.mainContainer,
- opacity: 1,
- duration: 500,
- easing: 'easeInQuad'
- });
- }, 2500);
- }
}
},
beforeDestroy() {
@@ -118,9 +70,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+.header
$height = 48px
position fixed
@@ -134,7 +84,7 @@ root(isDark)
> .indicator
height 3px
- background $theme-color
+ background var(--primary)
> .warn
display block
@@ -146,7 +96,7 @@ root(isDark)
color #fff
> .main
- color rgba(#fff, 0.9)
+ color var(--mobileHeaderFg)
> .backdrop
position absolute
@@ -156,20 +106,7 @@ root(isDark)
height $height
-webkit-backdrop-filter blur(12px)
backdrop-filter blur(12px)
- //background-color rgba(#1b2023, 0.75)
- background-color isDark ? #313543 : #595f6f
-
- > p
- display none
- position absolute
- z-index 1002
- top $height
- width 100%
- line-height $height
- margin 0
- text-align center
- color #fff
- opacity 0
+ background-color var(--mobileHeaderBg)
> .content
z-index 1001
@@ -216,7 +153,7 @@ root(isDark)
left 8px
pointer-events none
font-size 10px
- color $theme-color
+ color var(--primary)
> button:last-child
display block
@@ -231,10 +168,4 @@ root(isDark)
line-height $height
border-left solid 1px rgba(#000, 0.1)
-.header[data-darkmode]
- root(true)
-
-.header:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/components/ui.nav.vue b/src/client/app/mobile/views/components/ui.nav.vue
index c3ae05fef6..ba122cc3e2 100644
--- a/src/client/app/mobile/views/components/ui.nav.vue
+++ b/src/client/app/mobile/views/components/ui.nav.vue
@@ -121,10 +121,8 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
- $color = isDark ? #c9d2e0 : #777
+.nav
+ $color = var(--text)
.backdrop
position fixed
@@ -133,7 +131,7 @@ root(isDark)
z-index 1025
width 100%
height 100%
- background isDark ? rgba(#000, 0.7) : rgba(#000, 0.2)
+ background var(--mobileNavBackdrop)
.body
position fixed
@@ -144,7 +142,7 @@ root(isDark)
height 100%
overflow auto
-webkit-overflow-scrolling touch
- background isDark ? #16191f : #fff
+ background var(--secondary)
.me
display block
@@ -198,11 +196,11 @@ root(isDark)
text-decoration none
&[data-active]
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
> [data-fa]:last-child
- color $theme-color-foreground
+ color var(--primaryForeground)
> [data-fa]:first-child
margin-right 0.5em
@@ -212,7 +210,7 @@ root(isDark)
> [data-fa].circle
margin-left 6px
font-size 10px
- color $theme-color
+ color var(--primary)
> [data-fa]:last-child
position absolute
@@ -226,8 +224,8 @@ root(isDark)
.announcements
> article
- background isDark ? rgba(30, 129, 216, 0.2) : rgba(155, 196, 232, 0.2)
- color isDark ? #fff : #3f4967
+ background var(--mobileAnnouncement)
+ color var(--mobileAnnouncementFg)
padding 16px
margin 8px 0
font-size 12px
@@ -265,10 +263,4 @@ root(isDark)
opacity: 0;
}
-.nav[data-darkmode]
- root(true)
-
-.nav:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/components/users-list.vue b/src/client/app/mobile/views/components/users-list.vue
index a57b821293..f06f5245b8 100644
--- a/src/client/app/mobile/views/components/users-list.vue
+++ b/src/client/app/mobile/views/components/users-list.vue
@@ -65,7 +65,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
.mk-users-list
@@ -87,8 +87,8 @@ export default Vue.extend({
&[data-active]
font-weight bold
- color $theme-color
- border-color $theme-color
+ color var(--primary)
+ border-color var(--primary)
> span
display inline-block
diff --git a/src/client/app/mobile/views/components/widget-container.vue b/src/client/app/mobile/views/components/widget-container.vue
index a713a10621..2a4025002b 100644
--- a/src/client/app/mobile/views/components/widget-container.vue
+++ b/src/client/app/mobile/views/components/widget-container.vue
@@ -25,8 +25,8 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
- background isDark ? #21242f : #eee
+.mk-widget-container
+ background var(--face)
border-radius 8px
box-shadow 0 4px 16px rgba(#000, 0.1)
overflow hidden
@@ -35,17 +35,14 @@ root(isDark)
background transparent !important
box-shadow none !important
- &.hideHeader
- background isDark ? #21242f : #fff
-
> header
> .title
margin 0
padding 8px 10px
font-size 15px
font-weight normal
- color isDark ? #b8c5cc : #465258
- background isDark ? #282c37 : #fff
+ color var(--faceHeaderText)
+ background var(--faceHeader)
border-radius 8px 8px 0 0
> [data-fa]
@@ -65,10 +62,4 @@ root(isDark)
font-size 15px
color #465258
-.mk-widget-container[data-darkmode]
- root(true)
-
-.mk-widget-container:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/pages/favorites.vue b/src/client/app/mobile/views/pages/favorites.vue
index 53512e804c..a25f70147b 100644
--- a/src/client/app/mobile/views/pages/favorites.vue
+++ b/src/client/app/mobile/views/pages/favorites.vue
@@ -71,7 +71,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
main
width 100%
diff --git a/src/client/app/mobile/views/pages/home.vue b/src/client/app/mobile/views/pages/home.vue
index ca62d4e2f8..edba8585bd 100644
--- a/src/client/app/mobile/views/pages/home.vue
+++ b/src/client/app/mobile/views/pages/home.vue
@@ -22,7 +22,7 @@
<button @click="fn">%fa:pencil-alt%</button>
</template>
- <main :data-darkmode="$store.state.device.darkmode">
+ <main>
<div class="nav" v-if="showNav">
<div class="bg" @click="showNav = false"></div>
<div class="pointer"></div>
@@ -154,9 +154,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
+main
> .nav
> .pointer
position fixed
@@ -176,7 +174,7 @@ root(isDark)
border-top solid $size transparent
border-left solid $size transparent
border-right solid $size transparent
- border-bottom solid $size isDark ? #272f3a : #fff
+ border-bottom solid $size var(--popupBg)
> .bg
position fixed
@@ -198,7 +196,7 @@ root(isDark)
margin 0 auto
overflow auto
-webkit-overflow-scrolling touch
- background isDark ? #272f3a : #fff
+ background var(--popupBg)
border-radius 8px
box-shadow 0 0 16px rgba(#000, 0.1)
@@ -207,24 +205,24 @@ root(isDark)
> .hr
margin 8px 0
- border-top solid 1px isDark ? rgba(#000, 0.3) : rgba(#000, 0.1)
+ border-top solid 1px var(--faceDivider)
> *:not(.hr)
display block
padding 8px 16px
- color isDark ? #cdd0d8 : #666
+ color var(--text)
&[data-active]
- color $theme-color-foreground
- background $theme-color
+ color var(--primaryForeground)
+ background var(--primary)
&:not([data-active]):hover
- background isDark ? #353e4a : #eee
+ background var(--mobileHomeTlItemHover)
> .badge
margin-left 6px
font-size 10px
- color $theme-color
+ color var(--primary)
> .tl
max-width 680px
@@ -237,17 +235,9 @@ root(isDark)
@media (min-width 600px)
padding 32px
-main[data-darkmode]
- root(true)
-
-main:not([data-darkmode])
- root(false)
-
</style>
<style lang="stylus" module>
-@import '~const.styl'
-
.title
i
margin-right 4px
@@ -255,7 +245,7 @@ main:not([data-darkmode])
.badge
margin-left 6px
font-size 10px
- color $theme-color
+ color var(--primary)
vertical-align middle
</style>
diff --git a/src/client/app/mobile/views/pages/notifications.vue b/src/client/app/mobile/views/pages/notifications.vue
index bddcd457bb..ce33332faf 100644
--- a/src/client/app/mobile/views/pages/notifications.vue
+++ b/src/client/app/mobile/views/pages/notifications.vue
@@ -34,7 +34,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
main
width 100%
diff --git a/src/client/app/mobile/views/pages/received-follow-requests.vue b/src/client/app/mobile/views/pages/received-follow-requests.vue
index 77938c3d60..beaf6bba57 100644
--- a/src/client/app/mobile/views/pages/received-follow-requests.vue
+++ b/src/client/app/mobile/views/pages/received-follow-requests.vue
@@ -52,8 +52,6 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
main
width 100%
max-width 680px
@@ -69,7 +67,7 @@ main
> div
display flex
padding 16px
- border solid 1px isDark ? #1c2023 : #eee
+ border solid 1px var(--faceDivider)
border-radius 4px
> span
diff --git a/src/client/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue
index 9e90416370..94fa38cec9 100644
--- a/src/client/app/mobile/views/pages/settings.vue
+++ b/src/client/app/mobile/views/pages/settings.vue
@@ -1,7 +1,7 @@
<template>
<mk-ui>
<span slot="header"><span style="margin-right:4px;">%fa:cog%</span>%i18n:@settings%</span>
- <main :data-darkmode="$store.state.device.darkmode">
+ <main>
<div class="signin-as" v-html="'%i18n:@signed-in-as%'.replace('{}', `<b>${name}</b>`)"></div>
<div>
@@ -24,6 +24,13 @@
</section>
<section>
+ <header>%i18n:@theme%</header>
+ <div>
+ <mk-theme/>
+ </div>
+ </section>
+
+ <section>
<header>%i18n:@timeline%</header>
<div>
<ui-switch v-model="showReplyTarget">%i18n:@show-reply-target%</ui-switch>
@@ -322,7 +329,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+main
margin 0 auto
max-width 600px
width 100%
@@ -331,27 +338,22 @@ root(isDark)
margin 16px
padding 16px
text-align center
- color isDark ? #49ab63 : #2c662d
- background isDark ? #273c34 : #fcfff5
+ color var(--mobileSignedInAsFg)
+ background var(--mobileSignedInAsBg)
box-shadow 0 3px 1px -2px rgba(#000, 0.2), 0 2px 2px 0 rgba(#000, 0.14), 0 1px 5px 0 rgba(#000, 0.12)
> .signout
margin 16px
padding 16px
text-align center
- color isDark ? #ff5f56 : #cc2727
- background isDark ? #652222 : #fff6f5
+ color var(--mobileSignedInAsFg)
+ background var(--mobileSignedInAsBg)
box-shadow 0 3px 1px -2px rgba(#000, 0.2), 0 2px 2px 0 rgba(#000, 0.14), 0 1px 5px 0 rgba(#000, 0.12)
> footer
margin 16px
text-align center
- color isDark ? #c9d2e0 : #888
-
-main[data-darkmode]
- root(true)
-
-main:not([data-darkmode])
- root(false)
+ color var(--text)
+ opacity 0.7
</style>
diff --git a/src/client/app/mobile/views/pages/user-list.vue b/src/client/app/mobile/views/pages/user-list.vue
index 1c6a829cd5..f8c8aafa61 100644
--- a/src/client/app/mobile/views/pages/user-list.vue
+++ b/src/client/app/mobile/views/pages/user-list.vue
@@ -53,7 +53,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
main
width 100%
diff --git a/src/client/app/mobile/views/pages/user-lists.vue b/src/client/app/mobile/views/pages/user-lists.vue
index 5ee0636dea..fc80f5d1c6 100644
--- a/src/client/app/mobile/views/pages/user-lists.vue
+++ b/src/client/app/mobile/views/pages/user-lists.vue
@@ -51,7 +51,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
+
main
width 100%
diff --git a/src/client/app/mobile/views/pages/user.vue b/src/client/app/mobile/views/pages/user.vue
index c1082f31a9..a2a6bd7a83 100644
--- a/src/client/app/mobile/views/pages/user.vue
+++ b/src/client/app/mobile/views/pages/user.vue
@@ -1,7 +1,7 @@
<template>
<mk-ui>
<template slot="header" v-if="!fetching"><img :src="user.avatarUrl" alt="">{{ user | userName }}</template>
- <main v-if="!fetching" :data-darkmode="$store.state.device.darkmode">
+ <main v-if="!fetching">
<div class="is-suspended" v-if="user.isSuspended"><p>%fa:exclamation-triangle% %i18n:@is-suspended%</p></div>
<div class="is-remote" v-if="user.host != null"><p>%fa:exclamation-triangle% %i18n:@is-remote%<a :href="user.url || user.uri" target="_blank">%i18n:@view-remote%</a></p></div>
<header>
@@ -115,10 +115,8 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-@import '~const.styl'
-
-root(isDark)
- $bg = isDark ? #22252f : #f7f7f7
+main
+ $bg = var(--face)
> .is-suspended
> .is-remote
@@ -148,7 +146,7 @@ root(isDark)
> .banner
padding-bottom 33.3%
- background-color isDark ? #5f7273 : #cacaca
+ background-color rgba(0, 0, 0, 0.1)
background-size cover
background-position center
@@ -198,26 +196,26 @@ root(isDark)
margin 0
line-height 22px
font-size 20px
- color isDark ? #fff : #757c82
+ color var(--mobileUserPageName)
> .username
display inline-block
line-height 20px
font-size 16px
font-weight bold
- color isDark ? #657786 : #969ea5
+ color var(--mobileUserPageAcct)
> .followed
margin-left 8px
padding 2px 4px
font-size 12px
- color isDark ? #657786 : #fff
- background isDark ? #f8f8f8 : #a7bec7
+ color var(--mobileUserPageFollowedFg)
+ background var(--mobileUserPageFollowedBg)
border-radius 4px
> .description
margin 8px 0
- color isDark ? #fff : #757c82
+ color var(--mobileUserPageDescription)
> .info
margin 8px 0
@@ -225,14 +223,14 @@ root(isDark)
> p
display inline
margin 0 16px 0 0
- color isDark ? #a9b9c1 : #90989c
+ color var(--text)
> i
margin-right 4px
> .status
> a
- color isDark ? #657786 : #818a92
+ color var(--text)
&:not(:last-child)
margin-right 16px
@@ -240,7 +238,7 @@ root(isDark)
> b
margin-right 4px
font-size 16px
- color isDark ? #fff : #787e86
+ color var(--mobileUserPageStatusHighlight)
> i
font-size 14px
@@ -249,7 +247,7 @@ root(isDark)
position -webkit-sticky
position sticky
top 47px
- box-shadow 0 4px 4px isDark ? rgba(#000, 0.3) : rgba(#000, 0.07)
+ box-shadow 0 4px 4px var(--mobileUserPageHeaderShadow)
background-color $bg
z-index 2
@@ -266,7 +264,7 @@ root(isDark)
line-height 48px
font-size 12px
text-decoration none
- color isDark ? #657786 : #9ca1a5
+ color var(--text)
border-bottom solid 2px transparent
@media (min-width 400px)
@@ -275,8 +273,8 @@ root(isDark)
&[data-active]
font-weight bold
- color $theme-color
- border-color $theme-color
+ color var(--primary)
+ border-color var(--primary)
> .body
max-width 680px
@@ -289,10 +287,4 @@ root(isDark)
@media (min-width 600px)
padding 32px
-main[data-darkmode]
- root(true)
-
-main:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/mobile/views/pages/user/home.vue b/src/client/app/mobile/views/pages/user/home.vue
index 4118afef19..2c7134ed43 100644
--- a/src/client/app/mobile/views/pages/user/home.vue
+++ b/src/client/app/mobile/views/pages/user/home.vue
@@ -54,7 +54,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.root.home
max-width 600px
margin 0 auto
@@ -65,7 +65,7 @@ root(isDark)
margin 0 0 16px 0
> section
- background isDark ? #21242f : #eee
+ background var(--face)
border-radius 8px
box-shadow 0 4px 16px rgba(#000, 0.1)
@@ -80,8 +80,8 @@ root(isDark)
padding 8px 10px
font-size 15px
font-weight normal
- color isDark ? #b8c5cc : #465258
- background isDark ? #282c37 : #fff
+ color var(--text)
+ background var(--faceHeader)
border-radius 8px 8px 0 0
@media (min-width 500px)
@@ -98,12 +98,6 @@ root(isDark)
display block
margin 16px
text-align center
- color isDark ? #cad2da : #929aa0
-
-.root.home[data-darkmode]
- root(true)
-
-.root.home:not([data-darkmode])
- root(false)
+ color var(--text)
</style>
diff --git a/src/client/app/mobile/views/pages/welcome.vue b/src/client/app/mobile/views/pages/welcome.vue
index 82ccfeaff5..32f74bfe3a 100644
--- a/src/client/app/mobile/views/pages/welcome.vue
+++ b/src/client/app/mobile/views/pages/welcome.vue
@@ -3,7 +3,7 @@
<div class="banner" :style="{ backgroundImage: banner ? `url(${banner})` : null }"></div>
<div>
- <img :src="$store.state.device.darkmode ? 'assets/title.dark.svg' : 'assets/title.light.svg'" :alt="name">
+ <img svg-inline src="../../../../assets/title.svg" :alt="name">
<p class="host">{{ host }}</p>
<div class="about">
<h2>{{ name }}</h2>
@@ -122,9 +122,8 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-root(isDark)
+.wgwfgvvimdjvhjfwxropcwksnzftjqes
text-align center
- //background #fff
> .banner
position absolute
@@ -144,16 +143,17 @@ root(isDark)
left 0
width 100%
height 100px
- background linear-gradient(transparent, isDark ? #191b22 : #f7f7f7)
+ background linear-gradient(transparent, var(--bg))
> div:not(.banner)
padding 32px
margin 0 auto
max-width 500px
- > img
+ > svg
display block
- max-width 200px
+ width 200px
+ height 50px
margin 0 auto
> .host
@@ -169,8 +169,8 @@ root(isDark)
> .about
margin-top 16px
padding 16px
- color #555
- background #fff
+ color var(--text)
+ background var(--face)
border-radius 6px
> h2
@@ -238,7 +238,7 @@ root(isDark)
margin 16px 0
padding 8px
font-size 14px
- color #444
+ color var(--text)
background rgba(#000, 0.1)
border-radius 6px
@@ -249,9 +249,9 @@ root(isDark)
margin 16px 0
> article
- background isDark ? rgba(30, 129, 216, 0.2) : rgba(155, 196, 232, 0.2)
+ background var(--mobileAnnouncement)
border-radius 6px
- color isDark ? #fff : #3f4967
+ color var(--mobileAnnouncementFg)
padding 16px
margin 8px 0
font-size 12px
@@ -263,10 +263,10 @@ root(isDark)
margin 16px 0
padding 32px
font-size 14px
- background #fff
+ background var(--face)
border-radius 6px
overflow hidden
- color #3a3e46
+ color var(--text)
> h1
margin 0
@@ -279,12 +279,12 @@ root(isDark)
> section
> h2
- border-bottom 1px solid isDark ? rgba(#000, 0.2) : rgba(#000, 0.05)
+ border-bottom 1px solid var(--faceDivider)
> section
margin-bottom 16px
padding-bottom 16px
- border-bottom 1px solid isDark ? rgba(#000, 0.2) : rgba(#000, 0.05)
+ border-bottom 1px solid var(--faceDivider)
> h3
margin-bottom 8px
@@ -301,7 +301,7 @@ root(isDark)
> .info
padding 16px 0
- border solid 2px #ddd
+ border solid 2px rgba(0, 0, 0, 0.1)
border-radius 8px
> *
@@ -309,17 +309,11 @@ root(isDark)
> footer
text-align center
- color #444
+ color var(--text)
> small
display block
margin 16px 0 0 0
opacity 0.7
-.wgwfgvvimdjvhjfwxropcwksnzftjqes[data-darkmode]
- root(true)
-
-.wgwfgvvimdjvhjfwxropcwksnzftjqes:not([data-darkmode])
- root(false)
-
</style>
diff --git a/src/client/app/store.ts b/src/client/app/store.ts
index 00c08409a6..545261225a 100644
--- a/src/client/app/store.ts
+++ b/src/client/app/store.ts
@@ -21,7 +21,6 @@ const defaultSettings = {
circleIcons: true,
contrastedAcct: true,
showFullAcct: false,
- gradientWindowHeader: false,
showReplyTarget: true,
showMyRenotes: true,
showRenotedMyNotes: true,
@@ -45,6 +44,9 @@ const defaultDeviceSettings = {
apiViaStream: true,
autoPopout: false,
darkmode: false,
+ darkTheme: 'dark',
+ lightTheme: 'light',
+ themes: [],
enableSounds: true,
soundVolume: 0.5,
lang: null,
diff --git a/src/client/app/theme.ts b/src/client/app/theme.ts
new file mode 100644
index 0000000000..555f8411f2
--- /dev/null
+++ b/src/client/app/theme.ts
@@ -0,0 +1,102 @@
+import * as tinycolor from 'tinycolor2';
+
+type Theme = {
+ meta: {
+ id: string;
+ name: string;
+ author: string;
+ base?: string;
+ vars: any;
+ };
+} & {
+ [key: string]: string;
+};
+
+export function applyTheme(theme: Theme, persisted = true) {
+ if (theme.meta.base) {
+ const base = [lightTheme, darkTheme].find(x => x.meta.id == theme.meta.base);
+ theme = Object.assign({}, base, theme);
+ }
+
+ const props = compile(theme);
+
+ Object.entries(props).forEach(([k, v]) => {
+ if (k == 'meta') return;
+ document.documentElement.style.setProperty(`--${k}`, v.toString());
+ });
+
+ if (persisted) {
+ localStorage.setItem('theme', JSON.stringify(props));
+ }
+}
+
+function compile(theme: Theme): { [key: string]: string } {
+ function getColor(code: string): tinycolor.Instance {
+ // ref
+ if (code[0] == '@') {
+ return getColor(theme[code.substr(1)]);
+ }
+ if (code[0] == '$') {
+ return getColor(theme.meta.vars[code.substr(1)]);
+ }
+
+ // func
+ if (code[0] == ':') {
+ const parts = code.split('<');
+ const func = parts.shift().substr(1);
+ const arg = parseFloat(parts.shift());
+ const color = getColor(parts.join('<'));
+
+ switch (func) {
+ case 'darken': return color.darken(arg);
+ case 'lighten': return color.lighten(arg);
+ case 'alpha': return color.setAlpha(arg);
+ }
+ }
+
+ return tinycolor(code);
+ }
+
+ const props = {};
+
+ Object.entries(theme).forEach(([k, v]) => {
+ if (k == 'meta') return;
+ const c = getColor(v);
+ props[k] = genValue(c);
+ });
+
+ const primary = getColor(props['primary']);
+
+ for (let i = 1; i < 10; i++) {
+ const color = primary.clone().setAlpha(i / 10);
+ props['primaryAlpha0' + i] = genValue(color);
+ }
+
+ for (let i = 1; i < 100; i++) {
+ const color = primary.clone().lighten(i);
+ props['primaryLighten' + i] = genValue(color);
+ }
+
+ for (let i = 1; i < 100; i++) {
+ const color = primary.clone().darken(i);
+ props['primaryDarken' + i] = genValue(color);
+ }
+
+ return props;
+}
+
+function genValue(c: tinycolor.Instance): string {
+ return c.toRgbString();
+}
+
+export const lightTheme = require('../theme/light.json');
+export const darkTheme = require('../theme/dark.json');
+export const pinkTheme = require('../theme/pink.json');
+export const halloweenTheme = require('../theme/halloween.json');
+
+export const builtinThemes = [
+ lightTheme,
+ darkTheme,
+ pinkTheme,
+ halloweenTheme
+];
diff --git a/src/client/assets/title.light.svg b/src/client/assets/title.light.svg
deleted file mode 100644
index 95ad11c399..0000000000
--- a/src/client/assets/title.light.svg
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="614.71039"
- height="205.08009"
- viewBox="0 0 162.64213 54.260776"
- version="1.1"
- id="svg8"
- inkscape:version="0.92.1 r15371"
- sodipodi:docname="misskey.svg"
- inkscape:export-filename="C:\Users\Takumiya_Cho\Desktop\misskey.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <defs
- id="defs2">
- <inkscape:path-effect
- effect="simplify"
- id="path-effect5115"
- is_visible="true"
- steps="1"
- threshold="0.000408163"
- smooth_angles="360"
- helper_size="0"
- simplify_individual_paths="false"
- simplify_just_coalesce="false"
- simplifyindividualpaths="false"
- simplifyJustCoalesce="false" />
- <inkscape:path-effect
- effect="simplify"
- id="path-effect5104"
- is_visible="true"
- steps="1"
- threshold="0.000408163"
- smooth_angles="360"
- helper_size="0"
- simplify_individual_paths="false"
- simplify_just_coalesce="false"
- simplifyindividualpaths="false"
- simplifyJustCoalesce="false" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="0.9899495"
- inkscape:cx="370.82839"
- inkscape:cy="79.043895"
- inkscape:document-units="mm"
- inkscape:current-layer="layer1"
- showgrid="false"
- units="px"
- inkscape:snap-bbox="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="false"
- inkscape:snap-smooth-nodes="true"
- inkscape:snap-center="true"
- inkscape:snap-page="true"
- inkscape:window-width="1920"
- inkscape:window-height="1017"
- inkscape:window-x="-8"
- inkscape:window-y="1072"
- inkscape:window-maximized="1"
- inkscape:object-paths="true"
- inkscape:bbox-paths="true"
- fit-margin-top="50"
- fit-margin-left="50"
- fit-margin-bottom="20"
- fit-margin-right="50" />
- <metadata
- id="metadata5">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="レイヤー 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(-11.097531,-173.29664)">
- <g
- transform="matrix(0.28612302,0,0,0.28612302,17.176981,141.74334)"
- id="text4489-6"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:141.03404236px;line-height:476.69509888px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill:#212d3a;fill-opacity:1;stroke:none;stroke-width:0.92471898px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- aria-label="Mi">
- <path
- sodipodi:nodetypes="zccssscssccscczzzccsccsscscsccz"
- inkscape:connector-curvature="0"
- id="path5210"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';fill:#212d3a;fill-opacity:1;stroke-width:0.92471898px"
- d="m 75.196381,231.17126 c -5.855419,0.0202 -10.885068,-3.50766 -13.2572,-7.61584 -1.266603,-1.79454 -3.772419,-2.43291 -3.807919,0 v 11.2332 c 0,4.51309 -1.645397,8.41504 -4.936191,11.70583 -3.196772,3.19677 -7.098714,4.79516 -11.705826,4.79516 -4.513089,0 -8.415031,-1.59839 -11.705825,-4.79516 -3.196772,-3.29079 -4.795158,-7.19274 -4.795158,-11.70583 v -61.7729 c 0,-3.47884 0.987238,-6.6286 2.961715,-9.44928 2.068499,-2.91471 4.701135,-4.9362 7.897906,-6.06447 1.786431,-0.65816 3.666885,-0.98724 5.641362,-0.98724 5.077225,0 9.308247,1.97448 12.693064,5.92343 1.786431,1.97448 2.820681,3.00873 3.102749,3.10275 0,0 13.408119,16.21319 13.78421,16.49526 0.376091,0.28206 1.480789,2.43848 4.127113,2.43848 2.646324,0 3.89218,-2.15642 4.26827,-2.43848 0.376091,-0.28207 13.784088,-16.49526 13.784088,-16.49526 0.09402,0.094 1.081261,-0.94022 2.961715,-3.10275 3.478837,-3.94895 7.756866,-5.92343 12.834096,-5.92343 1.88045,0 3.76091,0.32908 5.64136,0.98724 3.19677,1.12827 5.7824,3.14976 7.75688,6.06447 2.06849,2.82068 3.10274,5.97044 3.10274,9.44928 v 61.7729 c 0,4.51309 -1.6454,8.41504 -4.93619,11.70583 -3.19677,3.19677 -7.09871,4.79516 -11.70582,4.79516 -4.51309,0 -8.41504,-1.59839 -11.705828,-4.79516 -3.196772,-3.29079 -4.795158,-7.19274 -4.795158,-11.70583 v -11.2332 c -0.277898,-3.06563 -2.987588,-1.13379 -3.948953,0 -2.538613,4.70114 -7.401781,7.59567 -13.2572,7.61584 z" />
- <path
- inkscape:connector-curvature="0"
- id="path5212"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';fill:#212d3a;fill-opacity:1;stroke-width:0.92471898px"
- d="m 145.83461,185.00361 q -5.92343,0 -10.15445,-4.08999 -4.08999,-4.23102 -4.08999,-10.15445 0,-5.92343 4.08999,-10.01342 4.23102,-4.23102 10.15445,-4.23102 5.92343,0 10.15445,4.23102 4.23102,4.08999 4.23102,10.01342 0,5.92343 -4.23102,10.15445 -4.23102,4.08999 -10.15445,4.08999 z m 0.14103,2.82068 q 5.92343,0 10.01342,4.23102 4.23102,4.23102 4.23102,10.15445 v 34.83541 q 0,5.92343 -4.23102,10.15445 -4.08999,4.08999 -10.01342,4.08999 -5.92343,0 -10.15445,-4.08999 -4.23102,-4.23102 -4.23102,-10.15445 v -34.83541 q 0,-5.92343 4.23102,-10.15445 4.23102,-4.23102 10.15445,-4.23102 z" />
- </g>
- <path
- inkscape:connector-curvature="0"
- id="path5199"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill:#212d3a;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 72.022691,200.53715 q 0.968125,0.24203 2.420312,0.5244 2.420313,0.40339 3.791824,1.29083 2.581666,1.69422 2.581666,5.08266 0,2.74302 -1.815234,4.47758 -2.097604,2.01693 -5.849089,2.01693 -2.743021,0 -6.131458,-0.76644 -1.089141,-0.24203 -1.774896,-1.08914 -0.645417,-0.84711 -0.645417,-1.89591 0,-1.29083 0.887448,-2.17828 0.927786,-0.92779 2.178281,-0.92779 0.363047,0 0.685756,0.0807 1.169817,0.24203 4.477578,0.60508 0.443724,0 0.968125,-0.0403 0.201693,0 0.201693,-0.24203 0.04034,-0.20169 -0.242032,-0.28237 -1.37151,-0.24203 -2.541328,-0.5244 -1.331172,-0.28237 -1.895911,-0.48406 -1.12948,-0.32271 -1.895912,-0.84711 -2.581667,-1.69422 -2.622005,-5.08266 0,-2.70268 1.855573,-4.47758 2.258958,-2.17828 6.413828,-1.97659 2.783359,0.12102 5.566719,0.7261 1.048802,0.24203 1.734557,1.08914 0.685756,0.84711 0.685756,1.93625 0,1.25049 -0.927787,2.17828 -0.887448,0.88745 -2.178281,0.88745 -0.322709,0 -0.645417,-0.0807 -1.169818,-0.24203 -4.517917,-0.56474 -0.403385,-0.0403 -0.766432,0 -0.322708,0.0403 -0.322708,0.24203 0.04034,0.24203 0.322708,0.32271 z" />
- <path
- inkscape:connector-curvature="0"
- id="path5201"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill:#212d3a;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 89.577027,200.53715 q 0.968125,0.24203 2.420312,0.5244 2.420313,0.40339 3.791823,1.29083 2.581667,1.69422 2.581667,5.08266 0,2.74302 -1.815234,4.47758 -2.097604,2.01693 -5.849089,2.01693 -2.743021,0 -6.131458,-0.76644 -1.089141,-0.24203 -1.774896,-1.08914 -0.645417,-0.84711 -0.645417,-1.89591 0,-1.29083 0.887448,-2.17828 0.927786,-0.92779 2.178281,-0.92779 0.363047,0 0.685755,0.0807 1.169818,0.24203 4.477579,0.60508 0.443724,0 0.968125,-0.0403 0.201692,0 0.201692,-0.24203 0.04034,-0.20169 -0.242031,-0.28237 -1.37151,-0.24203 -2.541328,-0.5244 -1.331172,-0.28237 -1.895912,-0.48406 -1.129479,-0.32271 -1.895911,-0.84711 -2.581667,-1.69422 -2.622005,-5.08266 0,-2.70268 1.855573,-4.47758 2.258958,-2.17828 6.413828,-1.97659 2.783359,0.12102 5.566719,0.7261 1.048802,0.24203 1.734557,1.08914 0.685755,0.84711 0.685755,1.93625 0,1.25049 -0.927786,2.17828 -0.887448,0.88745 -2.178281,0.88745 -0.322709,0 -0.645417,-0.0807 -1.169818,-0.24203 -4.517917,-0.56474 -0.403385,-0.0403 -0.766432,0 -0.322708,0.0403 -0.322708,0.24203 0.04034,0.24203 0.322708,0.32271 z" />
- <path
- inkscape:connector-curvature="0"
- id="path5203"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill:#212d3a;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 115.65209,203.87137 q 0.12101,0.0807 2.86404,2.78336 1.25049,1.21016 1.25049,2.94471 0,1.61354 -1.16982,2.86404 -1.16982,1.21016 -2.90437,1.21016 -1.65388,0 -2.86404,-1.16982 l -4.03385,-3.91284 q -0.16136,-0.12102 -0.32271,-0.12102 -0.32271,0 -0.32271,1.21016 0,1.69422 -1.21016,2.90438 -1.21015,1.16981 -2.90437,1.16981 -1.69422,0 -2.90438,-1.16981 -1.169807,-1.21016 -1.169807,-2.90438 v -18.79776 q 0,-1.69422 1.169807,-2.86404 1.21016,-1.21015 2.90438,-1.21015 1.69422,0 2.90437,1.21015 1.21016,1.16982 1.21016,2.86404 v 6.29281 q 0,0.40339 0.28237,0.5244 0.24203,0.12102 0.5244,-0.0807 0.16135,-0.0807 4.84063,-3.18675 1.0488,-0.64542 2.25895,-0.64542 2.21862,0 3.42878,1.81524 0.64542,1.0488 0.64542,2.25896 0,2.21862 -1.81524,3.42877 l -2.54133,1.61354 v 0.0403 l -0.0807,0.0403 q -0.56474,0.36305 -0.0403,0.88745 z" />
- <path
- inkscape:connector-curvature="0"
- id="path5205"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill:#212d3a;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 131.25181,213.92955 q -4.19521,0 -7.18026,-2.94472 -2.94472,-2.98505 -2.94472,-7.18026 0,-4.15487 2.94472,-7.09958 2.98505,-2.98505 7.18026,-2.98505 4.15487,0 6.97857,2.78335 0.92778,0.92779 0.92778,2.25896 0,1.33118 -0.92778,2.25896 l -4.67928,4.63893 q -1.00846,1.00847 -2.01692,1.00847 -1.45219,0 -2.25896,-0.80677 -0.80677,-0.80677 -0.80677,-2.13795 0,-1.29083 0.92778,-2.21862 l 0.80678,-0.84711 q 0.16135,-0.12101 0.0807,-0.24203 -0.12101,-0.0807 -0.32271,-0.0403 -0.80677,0.20169 -1.37151,0.80677 -1.12948,1.08914 -1.12948,2.622 0,1.5732 1.08915,2.70268 1.12947,1.08914 2.70268,1.08914 1.53286,0 2.622,-1.12947 0.92779,-0.92779 2.25896,-0.92779 1.33117,0 2.25896,0.92779 0.92779,0.92778 0.92779,2.25895 0,1.33118 -0.92779,2.25896 -2.98505,2.94472 -7.13992,2.94472 z" />
- <path
- inkscape:connector-curvature="0"
- id="path5207"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill:#212d3a;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 160.51049,198.1433 v 5.60705 q 0,0.56474 -0.0807,1.21016 v 7.38195 q 0,4.51792 -2.74302,7.2206 -2.70268,2.70269 -7.30128,2.70269 -2.66234,0 -4.80028,-1.00847 -2.13795,-0.96812 -2.13795,-3.3481 0,-0.80677 0.36305,-1.53286 0.96812,-2.17828 3.3481,-2.17828 0.56474,0 1.5732,0.32271 1.00847,0.3227 1.65388,0.3227 1.69422,0 2.21862,-0.72609 0.20169,-0.28237 0.0807,-0.44372 -0.16136,-0.24204 -0.56474,-0.16136 -0.68576,0.12102 -1.49253,0.12102 -4.07419,0 -6.97856,-2.90438 -2.90438,-2.90437 -2.90438,-6.97857 v -5.60705 q 0,-1.69422 1.16982,-2.86404 1.21015,-1.21016 2.90437,-1.21016 1.69422,0 2.90438,1.21016 1.21015,1.16982 1.21015,2.86404 v 5.60705 q 0,0.68576 0.48407,1.21016 0.5244,0.48406 1.21015,0.48406 0.7261,0 1.21016,-0.48406 0.48406,-0.5244 0.48406,-1.21016 v -5.60705 q 0,-1.69422 1.21016,-2.86404 1.21015,-1.21016 2.90437,-1.21016 1.69422,0 2.86404,1.21016 1.21016,1.16982 1.21016,2.86404 z" />
- </g>
-</svg>
diff --git a/src/client/assets/title.dark.svg b/src/client/assets/title.svg
index 10139024ad..0e4e0b8b3b 100644
--- a/src/client/assets/title.dark.svg
+++ b/src/client/assets/title.svg
@@ -97,44 +97,44 @@
<g
transform="matrix(0.28612302,0,0,0.28612302,17.176981,141.74334)"
id="text4489-6"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:141.03404236px;line-height:476.69509888px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill:#fff;fill-opacity:1;stroke:none;stroke-width:0.92471898px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:141.03404236px;line-height:476.69509888px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill-opacity:1;stroke:none;stroke-width:0.92471898px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
aria-label="Mi">
<path
sodipodi:nodetypes="zccssscssccscczzzccsccsscscsccz"
inkscape:connector-curvature="0"
id="path5210"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';fill:#fff;fill-opacity:1;stroke-width:0.92471898px"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';fill-opacity:1;stroke-width:0.92471898px"
d="m 75.196381,231.17126 c -5.855419,0.0202 -10.885068,-3.50766 -13.2572,-7.61584 -1.266603,-1.79454 -3.772419,-2.43291 -3.807919,0 v 11.2332 c 0,4.51309 -1.645397,8.41504 -4.936191,11.70583 -3.196772,3.19677 -7.098714,4.79516 -11.705826,4.79516 -4.513089,0 -8.415031,-1.59839 -11.705825,-4.79516 -3.196772,-3.29079 -4.795158,-7.19274 -4.795158,-11.70583 v -61.7729 c 0,-3.47884 0.987238,-6.6286 2.961715,-9.44928 2.068499,-2.91471 4.701135,-4.9362 7.897906,-6.06447 1.786431,-0.65816 3.666885,-0.98724 5.641362,-0.98724 5.077225,0 9.308247,1.97448 12.693064,5.92343 1.786431,1.97448 2.820681,3.00873 3.102749,3.10275 0,0 13.408119,16.21319 13.78421,16.49526 0.376091,0.28206 1.480789,2.43848 4.127113,2.43848 2.646324,0 3.89218,-2.15642 4.26827,-2.43848 0.376091,-0.28207 13.784088,-16.49526 13.784088,-16.49526 0.09402,0.094 1.081261,-0.94022 2.961715,-3.10275 3.478837,-3.94895 7.756866,-5.92343 12.834096,-5.92343 1.88045,0 3.76091,0.32908 5.64136,0.98724 3.19677,1.12827 5.7824,3.14976 7.75688,6.06447 2.06849,2.82068 3.10274,5.97044 3.10274,9.44928 v 61.7729 c 0,4.51309 -1.6454,8.41504 -4.93619,11.70583 -3.19677,3.19677 -7.09871,4.79516 -11.70582,4.79516 -4.51309,0 -8.41504,-1.59839 -11.705828,-4.79516 -3.196772,-3.29079 -4.795158,-7.19274 -4.795158,-11.70583 v -11.2332 c -0.277898,-3.06563 -2.987588,-1.13379 -3.948953,0 -2.538613,4.70114 -7.401781,7.59567 -13.2572,7.61584 z" />
<path
inkscape:connector-curvature="0"
id="path5212"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';fill:#fff;fill-opacity:1;stroke-width:0.92471898px"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';fill-opacity:1;stroke-width:0.92471898px"
d="m 145.83461,185.00361 q -5.92343,0 -10.15445,-4.08999 -4.08999,-4.23102 -4.08999,-10.15445 0,-5.92343 4.08999,-10.01342 4.23102,-4.23102 10.15445,-4.23102 5.92343,0 10.15445,4.23102 4.23102,4.08999 4.23102,10.01342 0,5.92343 -4.23102,10.15445 -4.23102,4.08999 -10.15445,4.08999 z m 0.14103,2.82068 q 5.92343,0 10.01342,4.23102 4.23102,4.23102 4.23102,10.15445 v 34.83541 q 0,5.92343 -4.23102,10.15445 -4.08999,4.08999 -10.01342,4.08999 -5.92343,0 -10.15445,-4.08999 -4.23102,-4.23102 -4.23102,-10.15445 v -34.83541 q 0,-5.92343 4.23102,-10.15445 4.23102,-4.23102 10.15445,-4.23102 z" />
</g>
<path
inkscape:connector-curvature="0"
id="path5199"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill:#fff;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 72.022691,200.53715 q 0.968125,0.24203 2.420312,0.5244 2.420313,0.40339 3.791824,1.29083 2.581666,1.69422 2.581666,5.08266 0,2.74302 -1.815234,4.47758 -2.097604,2.01693 -5.849089,2.01693 -2.743021,0 -6.131458,-0.76644 -1.089141,-0.24203 -1.774896,-1.08914 -0.645417,-0.84711 -0.645417,-1.89591 0,-1.29083 0.887448,-2.17828 0.927786,-0.92779 2.178281,-0.92779 0.363047,0 0.685756,0.0807 1.169817,0.24203 4.477578,0.60508 0.443724,0 0.968125,-0.0403 0.201693,0 0.201693,-0.24203 0.04034,-0.20169 -0.242032,-0.28237 -1.37151,-0.24203 -2.541328,-0.5244 -1.331172,-0.28237 -1.895911,-0.48406 -1.12948,-0.32271 -1.895912,-0.84711 -2.581667,-1.69422 -2.622005,-5.08266 0,-2.70268 1.855573,-4.47758 2.258958,-2.17828 6.413828,-1.97659 2.783359,0.12102 5.566719,0.7261 1.048802,0.24203 1.734557,1.08914 0.685756,0.84711 0.685756,1.93625 0,1.25049 -0.927787,2.17828 -0.887448,0.88745 -2.178281,0.88745 -0.322709,0 -0.645417,-0.0807 -1.169818,-0.24203 -4.517917,-0.56474 -0.403385,-0.0403 -0.766432,0 -0.322708,0.0403 -0.322708,0.24203 0.04034,0.24203 0.322708,0.32271 z" />
<path
inkscape:connector-curvature="0"
id="path5201"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill:#fff;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 89.577027,200.53715 q 0.968125,0.24203 2.420312,0.5244 2.420313,0.40339 3.791823,1.29083 2.581667,1.69422 2.581667,5.08266 0,2.74302 -1.815234,4.47758 -2.097604,2.01693 -5.849089,2.01693 -2.743021,0 -6.131458,-0.76644 -1.089141,-0.24203 -1.774896,-1.08914 -0.645417,-0.84711 -0.645417,-1.89591 0,-1.29083 0.887448,-2.17828 0.927786,-0.92779 2.178281,-0.92779 0.363047,0 0.685755,0.0807 1.169818,0.24203 4.477579,0.60508 0.443724,0 0.968125,-0.0403 0.201692,0 0.201692,-0.24203 0.04034,-0.20169 -0.242031,-0.28237 -1.37151,-0.24203 -2.541328,-0.5244 -1.331172,-0.28237 -1.895912,-0.48406 -1.129479,-0.32271 -1.895911,-0.84711 -2.581667,-1.69422 -2.622005,-5.08266 0,-2.70268 1.855573,-4.47758 2.258958,-2.17828 6.413828,-1.97659 2.783359,0.12102 5.566719,0.7261 1.048802,0.24203 1.734557,1.08914 0.685755,0.84711 0.685755,1.93625 0,1.25049 -0.927786,2.17828 -0.887448,0.88745 -2.178281,0.88745 -0.322709,0 -0.645417,-0.0807 -1.169818,-0.24203 -4.517917,-0.56474 -0.403385,-0.0403 -0.766432,0 -0.322708,0.0403 -0.322708,0.24203 0.04034,0.24203 0.322708,0.32271 z" />
<path
inkscape:connector-curvature="0"
id="path5203"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill:#fff;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 115.65209,203.87137 q 0.12101,0.0807 2.86404,2.78336 1.25049,1.21016 1.25049,2.94471 0,1.61354 -1.16982,2.86404 -1.16982,1.21016 -2.90437,1.21016 -1.65388,0 -2.86404,-1.16982 l -4.03385,-3.91284 q -0.16136,-0.12102 -0.32271,-0.12102 -0.32271,0 -0.32271,1.21016 0,1.69422 -1.21016,2.90438 -1.21015,1.16981 -2.90437,1.16981 -1.69422,0 -2.90438,-1.16981 -1.169807,-1.21016 -1.169807,-2.90438 v -18.79776 q 0,-1.69422 1.169807,-2.86404 1.21016,-1.21015 2.90438,-1.21015 1.69422,0 2.90437,1.21015 1.21016,1.16982 1.21016,2.86404 v 6.29281 q 0,0.40339 0.28237,0.5244 0.24203,0.12102 0.5244,-0.0807 0.16135,-0.0807 4.84063,-3.18675 1.0488,-0.64542 2.25895,-0.64542 2.21862,0 3.42878,1.81524 0.64542,1.0488 0.64542,2.25896 0,2.21862 -1.81524,3.42877 l -2.54133,1.61354 v 0.0403 l -0.0807,0.0403 q -0.56474,0.36305 -0.0403,0.88745 z" />
<path
inkscape:connector-curvature="0"
id="path5205"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill:#fff;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 131.25181,213.92955 q -4.19521,0 -7.18026,-2.94472 -2.94472,-2.98505 -2.94472,-7.18026 0,-4.15487 2.94472,-7.09958 2.98505,-2.98505 7.18026,-2.98505 4.15487,0 6.97857,2.78335 0.92778,0.92779 0.92778,2.25896 0,1.33118 -0.92778,2.25896 l -4.67928,4.63893 q -1.00846,1.00847 -2.01692,1.00847 -1.45219,0 -2.25896,-0.80677 -0.80677,-0.80677 -0.80677,-2.13795 0,-1.29083 0.92778,-2.21862 l 0.80678,-0.84711 q 0.16135,-0.12101 0.0807,-0.24203 -0.12101,-0.0807 -0.32271,-0.0403 -0.80677,0.20169 -1.37151,0.80677 -1.12948,1.08914 -1.12948,2.622 0,1.5732 1.08915,2.70268 1.12947,1.08914 2.70268,1.08914 1.53286,0 2.622,-1.12947 0.92779,-0.92779 2.25896,-0.92779 1.33117,0 2.25896,0.92779 0.92779,0.92778 0.92779,2.25895 0,1.33118 -0.92779,2.25896 -2.98505,2.94472 -7.13992,2.94472 z" />
<path
inkscape:connector-curvature="0"
id="path5207"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill:#fff;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:136.34428406px;font-family:'OTADESIGN Rounded';-inkscape-font-specification:'OTADESIGN Rounded';letter-spacing:0px;word-spacing:0px;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 160.51049,198.1433 v 5.60705 q 0,0.56474 -0.0807,1.21016 v 7.38195 q 0,4.51792 -2.74302,7.2206 -2.70268,2.70269 -7.30128,2.70269 -2.66234,0 -4.80028,-1.00847 -2.13795,-0.96812 -2.13795,-3.3481 0,-0.80677 0.36305,-1.53286 0.96812,-2.17828 3.3481,-2.17828 0.56474,0 1.5732,0.32271 1.00847,0.3227 1.65388,0.3227 1.69422,0 2.21862,-0.72609 0.20169,-0.28237 0.0807,-0.44372 -0.16136,-0.24204 -0.56474,-0.16136 -0.68576,0.12102 -1.49253,0.12102 -4.07419,0 -6.97856,-2.90438 -2.90438,-2.90437 -2.90438,-6.97857 v -5.60705 q 0,-1.69422 1.16982,-2.86404 1.21015,-1.21016 2.90437,-1.21016 1.69422,0 2.90438,1.21016 1.21015,1.16982 1.21015,2.86404 v 5.60705 q 0,0.68576 0.48407,1.21016 0.5244,0.48406 1.21015,0.48406 0.7261,0 1.21016,-0.48406 0.48406,-0.5244 0.48406,-1.21016 v -5.60705 q 0,-1.69422 1.21016,-2.86404 1.21015,-1.21016 2.90437,-1.21016 1.69422,0 2.86404,1.21016 1.21016,1.16982 1.21016,2.86404 z" />
</g>
</svg>
diff --git a/src/client/const.styl b/src/client/const.styl
deleted file mode 100644
index b6560701d9..0000000000
--- a/src/client/const.styl
+++ /dev/null
@@ -1,4 +0,0 @@
-json('../const.json')
-
-$theme-color = themeColor
-$theme-color-foreground = themeColorForeground
diff --git a/src/client/style.styl b/src/client/style.styl
index 6d1e53e5a6..8ebba2f15e 100644
--- a/src/client/style.styl
+++ b/src/client/style.styl
@@ -1,10 +1,8 @@
@charset 'utf-8'
-@import "./const"
-
/*
::selection
- background $theme-color
+ background var(--primary)
color #fff
*/
@@ -24,10 +22,8 @@ html, body
a
text-decoration none
- color $theme-color
+ color var(--primary)
cursor pointer
- tap-highlight-color rgba($theme-color, 0.7) !important
- -webkit-tap-highlight-color rgba($theme-color, 0.7) !important
&:hover
text-decoration underline
@@ -35,3 +31,9 @@ a
*
cursor pointer
+@css {
+ a {
+ tap-highlight-color: var(--primaryAlpha07) !important;
+ -webkit-tap-highlight-color: var(--primaryAlpha07) !important;
+ }
+}
diff --git a/src/client/theme/dark.json b/src/client/theme/dark.json
new file mode 100644
index 0000000000..74447b8f2f
--- /dev/null
+++ b/src/client/theme/dark.json
@@ -0,0 +1,204 @@
+{
+ "meta": {
+ "id": "dark",
+ "name": "Dark",
+ "author": "syuilo",
+ "vars": {
+ "primary": "#fb4e4e",
+ "secondary": "#282C37",
+ "text": "#d6dae0"
+ }
+ },
+
+ "primary": "$primary",
+ "primaryForeground": "#fff",
+ "secondary": "$secondary",
+ "bg": ":darken<8<$secondary",
+ "text": "$text",
+
+ "scrollbarTrack": ":darken<5<$secondary",
+ "scrollbarHandle": ":lighten<5<$secondary",
+ "scrollbarHandleHover": ":lighten<10<$secondary",
+
+ "face": "$secondary",
+ "faceText": "#fff",
+ "faceHeader": ":lighten<5<$secondary",
+ "faceHeaderText": "#e3e5e8",
+ "faceDivider": "rgba(0, 0, 0, 0.3)",
+ "faceTextButton": "#9baec8",
+ "faceTextButtonHover": "#b2c1d5",
+ "faceTextButtonActive": "#b2c1d5",
+ "faceClearButtonHover": "rgba(0, 0, 0, 0.1)",
+ "faceClearButtonActive": "rgba(0, 0, 0, 0.2)",
+ "popupBg": ":lighten<5<$secondary",
+ "popupFg": "#d6dce2",
+
+ "subNoteBg": "rgba(0, 0, 0, 0.18)",
+ "subNoteText": ":alpha<0.7<$text",
+ "renoteGradient": "#314027",
+ "renoteText": "#9dbb00",
+ "quoteBorder": "#4e945e",
+ "noteText": "#fff",
+ "noteHeaderName": "#fff",
+ "noteHeaderBadgeFg": "#758188",
+ "noteHeaderBadgeBg": "rgba(0, 0, 0, 0.25)",
+ "noteHeaderAdminFg": "#f15f71",
+ "noteHeaderAdminBg": "#5d282e",
+ "noteHeaderAcct": "#606984",
+ "noteHeaderInfo": "#606984",
+
+ "noteActions": "#606984",
+ "noteActionsHover": "#a1a8bf",
+ "noteActionsReplyHover": "#0af",
+ "noteActionsRenoteHover": "#8d0",
+ "noteActionsReactionHover": "#fa0",
+ "noteActionsHighlighted": "#707b97",
+
+ "noteAttachedFile": "rgba(255, 255, 255, 0.1)",
+
+ "modalBackdrop": "rgba(0, 0, 0, 0.5)",
+
+ "dateDividerBg": ":darken<2<$secondary",
+ "dateDividerFg": ":alpha<0.7<$text",
+
+ "switchTrack": "rgba(255, 255, 255, 0.15)",
+ "radioBorder": "rgba(255, 255, 255, 0.6)",
+ "inputBorder": "rgba(255, 255, 255, 0.7)",
+ "inputLabel": "rgba(255, 255, 255, 0.7)",
+ "inputText": "#fff",
+
+ "buttonBg": "rgba(255, 255, 255, 0.05)",
+ "buttonHoverBg": "rgba(255, 255, 255, 0.1)",
+ "buttonActiveBg": "rgba(255, 255, 255, 0.15)",
+
+ "autocompleteItemHoverBg": "rgba(255, 255, 255, 0.1)",
+ "autocompleteItemText": "rgba(255, 255, 255, 0.8)",
+ "autocompleteItemTextSub": "rgba(255, 255, 255, 0.3)",
+
+ "cwButtonBg": "#687390",
+ "cwButtonFg": "#393f4f",
+ "cwButtonHoverBg": "#707b97",
+
+ "reactionPickerButtonHoverBg": "rgba(255, 255, 255, 0.18)",
+
+ "reactionViewerBorder": "rgba(255, 255, 255, 0.1)",
+
+ "pollEditorInputBg": "rgba(0, 0, 0, 0.25)",
+
+ "pollChoiceText": "#fff",
+ "pollChoiceBorder": "rgba(255, 255, 255, 0.1)",
+
+ "urlPreviewBorder": "rgba(0, 0, 0, 0.4)",
+ "urlPreviewBorderHover": "rgba(255, 255, 255, 0.2)",
+ "urlPreviewTitle": "$text",
+ "urlPreviewText": ":alpha<0.7<$text",
+ "urlPreviewInfo": ":alpha<0.8<$text",
+
+ "calendarWeek": "#43d5dc",
+ "calendarSaturdayOrSunday": "#ff6679",
+ "calendarDay": "#c5ced6",
+
+ "materBg": "rgba(0, 0, 0, 0.3)",
+
+ "chartCaption": ":alpha<0.6<$text",
+
+ "announcementsBg": "#253a50",
+ "announcementsTitle": "#539eff",
+ "announcementsText": "#fff",
+
+ "donationBg": "#5d5242",
+ "donationFg": "#e4dbce",
+
+ "googleSearchBg": "rgba(0, 0, 0, 0.2)",
+ "googleSearchFg": "#dee4e8",
+ "googleSearchBorder": "rgba(255, 255, 255, 0.2)",
+ "googleSearchHoverBorder": "rgba(255, 255, 255, 0.3)",
+ "googleSearchHoverButton": "rgba(255, 255, 255, 0.1)",
+
+ "mfmTitleBg": "rgba(0, 0, 0, 0.2)",
+ "mfmQuote": ":alpha<0.7<$text",
+ "mfmQuoteLine": ":alpha<0.6<$text",
+
+ "suspendedInfoBg": "#611d1d",
+ "suspendedInfoFg": "#ffb4b4",
+ "remoteInfoBg": "#42321c",
+ "remoteInfoFg": "#ffbd3e",
+
+ "messagingRoomBg": "@bg",
+ "messagingRoomInfo": "#fff",
+ "messagingRoomDateDividerLine": "rgba(255, 255, 255, 0.1)",
+ "messagingRoomDateDividerText": "rgba(255, 255, 255, 0.3)",
+ "messagingRoomMessageInfo": "rgba(255, 255, 255, 0.4)",
+ "messagingRoomMessageBg": "$secondary",
+ "messagingRoomMessageFg": "#fff",
+
+ "formButtonBorder": "rgba(255, 255, 255, 0.1)",
+ "formButtonHoverBg": ":alpha<0.2<$primary",
+ "formButtonHoverBorder": ":alpha<0.5<$primary",
+ "formButtonActiveBg": ":alpha<0.12<$primary",
+
+ "desktopHeaderBg": ":lighten<5<$secondary",
+ "desktopHeaderFg": "$text",
+ "desktopHeaderHoverFg": "#fff",
+ "desktopHeaderSearchBg": "rgba(0, 0, 0, 0.1)",
+ "desktopHeaderSearchHoverBg": "rgba(255, 255, 255, 0.04)",
+ "desktopHeaderSearchFg": "#fff",
+ "desktopNotificationBg": ":alpha<0.9<$secondary",
+ "desktopNotificationFg": ":alpha<0.7<$text",
+ "desktopNotificationShadow": "rgba(0, 0, 0, 0.4)",
+ "desktopPostFormBg": "@face",
+ "desktopPostFormTextareaBg": "rgba(0, 0, 0, 0.25)",
+ "desktopPostFormTextareaFg": "#fff",
+ "desktopPostFormTransparentButtonFg": "$primary",
+ "desktopPostFormTransparentButtonActiveGradientStart": ":darken<8<$secondary",
+ "desktopPostFormTransparentButtonActiveGradientEnd": ":darken<3<$secondary",
+ "desktopRenoteFormFooter": ":lighten<5<$secondary",
+ "desktopTimelineHeaderShadow": "rgba(0, 0, 0, 0.15)",
+ "desktopTimelineSrc": "@faceTextButton",
+ "desktopTimelineSrcHover": "@faceTextButtonHover",
+ "desktopWindowTitle": "@faceHeaderText",
+ "desktopWindowShadow": "rgba(0, 0, 0, 0.5)",
+ "desktopDriveBg": "@bg",
+ "desktopDriveFolderBg": ":alpha<0.2<$primary",
+ "desktopDriveFolderHoverBg": ":alpha<0.3<$primary",
+ "desktopDriveFolderActiveBg": ":alpha<0.3<:darken<10<$primary",
+ "desktopDriveFolderFg": "#fff",
+ "desktopSettingsNavItem": ":alpha<0.8<$text",
+ "desktopSettingsNavItemHover": ":lighten<10<$text",
+
+ "deckAcrylicColumnBg": "rgba(0, 0, 0, 0.25)",
+
+ "mobileHeaderBg": ":lighten<5<$secondary",
+ "mobileHeaderFg": "$text",
+ "mobileNavBackdrop": "rgba(0, 0, 0, 0.7)",
+ "mobilePostFormDivider": "rgba(0, 0, 0, 0.2)",
+ "mobilePostFormTextareaBg": "rgba(0, 0, 0, 0.3)",
+ "mobileDriveNavBg": ":alpha<0.75<$secondary",
+ "mobileHomeTlItemHover": "rgba(255, 255, 255, 0.1)",
+ "mobileUserPageName": "#fff",
+ "mobileUserPageAcct": "$text",
+ "mobileUserPageDescription": "$text",
+ "mobileUserPageFollowedBg": "rgba(0, 0, 0, 0.3)",
+ "mobileUserPageFollowedFg": "$text",
+ "mobileUserPageStatusHighlight": "#fff",
+ "mobileUserPageHeaderShadow": "rgba(0, 0, 0, 0.3)",
+ "mobileAnnouncement": "rgba(30, 129, 216, 0.2)",
+ "mobileAnnouncementFg": "#fff",
+ "mobileSignedInAsBg": "#273c34",
+ "mobileSignedInAsFg": "#49ab63",
+ "mobileSignoutBg": "#652222",
+ "mobileSignoutFg": "#ff5f56",
+
+ "reversiBannerGradientStart": "#45730e",
+ "reversiBannerGradientEnd": "#464300",
+ "reversiDescBg": "rgba(255, 255, 255, 0.1)",
+ "reversiListItemShadow": "rgba(0, 0, 0, 0.7)",
+ "reversiMapSelectBorder": "rgba(255, 255, 255, 0.1)",
+ "reversiMapSelectHoverBorder": "rgba(255, 255, 255, 0.2)",
+ "reversiRoomFormShadow": "rgba(0, 0, 0, 0.7)",
+ "reversiRoomFooterBg": ":alpha<0.9<$secondary",
+ "reversiGameHeaderLine": ":alpha<0.5<$secondary",
+ "reversiGameEmptyCell": ":lighten<2<$secondary",
+ "reversiGameEmptyCellMyTurn": ":lighten<5<$secondary",
+ "reversiGameEmptyCellCanPut": ":lighten<4<$secondary"
+}
diff --git a/src/client/theme/halloween.json b/src/client/theme/halloween.json
new file mode 100644
index 0000000000..fb34db57a8
--- /dev/null
+++ b/src/client/theme/halloween.json
@@ -0,0 +1,17 @@
+{
+ "meta": {
+ "id": "42e4f09b-67d5-498c-af7d-29faa54745b0",
+ "name": "Halloween",
+ "author": "syuilo",
+ "base": "dark",
+ "vars": {
+ "primary": "#d67036",
+ "secondary": "#1f1d30",
+ "text": "#b1bee3"
+ }
+ },
+
+ "renoteGradient": "#5d2d1a",
+ "renoteText": "#ff6c00",
+ "quoteBorder": "#c3631c"
+}
diff --git a/src/client/theme/light.json b/src/client/theme/light.json
new file mode 100644
index 0000000000..0d50dc5caa
--- /dev/null
+++ b/src/client/theme/light.json
@@ -0,0 +1,204 @@
+{
+ "meta": {
+ "id": "light",
+ "name": "Light",
+ "author": "syuilo",
+ "vars": {
+ "primary": "#fb4e4e",
+ "secondary": "#fff",
+ "text": "#666"
+ }
+ },
+
+ "primary": "$primary",
+ "primaryForeground": "#fff",
+ "secondary": "$secondary",
+ "bg": ":darken<8<$secondary",
+ "text": "$text",
+
+ "scrollbarTrack": "#fff",
+ "scrollbarHandle": "#00000033",
+ "scrollbarHandleHover": "#00000066",
+
+ "face": "$secondary",
+ "faceText": "#444",
+ "faceHeader": ":lighten<5<$secondary",
+ "faceHeaderText": "#888",
+ "faceDivider": "rgba(0, 0, 0, 0.082)",
+ "faceTextButton": "#ccc",
+ "faceTextButtonHover": "#aaa",
+ "faceTextButtonActive": "#999",
+ "faceClearButtonHover": "rgba(0, 0, 0, 0.025)",
+ "faceClearButtonActive": "rgba(0, 0, 0, 0.05)",
+ "popupBg": ":lighten<5<$secondary",
+ "popupFg": "#586069",
+
+ "subNoteBg": "rgba(0, 0, 0, 0.01)",
+ "subNoteText": ":alpha<0.7<$text",
+ "renoteGradient": "#edfde2",
+ "renoteText": "#9dbb00",
+ "quoteBorder": "#c0dac6",
+ "noteText": "#717171",
+ "noteHeaderName": ":darken<2<$text",
+ "noteHeaderBadgeFg": "#aaa",
+ "noteHeaderBadgeBg": "rgba(0, 0, 0, 0.05)",
+ "noteHeaderAdminFg": "#f15f71",
+ "noteHeaderAdminBg": "#ffdfdf",
+ "noteHeaderAcct": ":alpha<0.7<@noteHeaderName",
+ "noteHeaderInfo": ":alpha<0.7<@noteHeaderName",
+
+ "noteActions": ":alpha<0.3<$text",
+ "noteActionsHover": ":alpha<0.9<$text",
+ "noteActionsReplyHover": "#0af",
+ "noteActionsRenoteHover": "#8d0",
+ "noteActionsReactionHover": "#fa0",
+ "noteActionsHighlighted": "#888",
+
+ "noteAttachedFile": "rgba(0, 0, 0, 0.05)",
+
+ "modalBackdrop": "rgba(0, 0, 0, 0.1)",
+
+ "dateDividerBg": ":darken<2<$secondary",
+ "dateDividerFg": ":alpha<0.7<$text",
+
+ "switchTrack": "rgba(0, 0, 0, 0.25)",
+ "radioBorder": "rgba(0, 0, 0, 0.4)",
+ "inputBorder": "rgba(0, 0, 0, 0.42)",
+ "inputLabel": "rgba(0, 0, 0, 0.54)",
+ "inputText": "#000",
+
+ "buttonBg": "rgba(0, 0, 0, 0.05)",
+ "buttonHoverBg": "rgba(0, 0, 0, 0.1)",
+ "buttonActiveBg": "rgba(0, 0, 0, 0.15)",
+
+ "autocompleteItemHoverBg": "rgba(0, 0, 0, 0.1)",
+ "autocompleteItemText": "rgba(0, 0, 0, 0.8)",
+ "autocompleteItemTextSub": "rgba(0, 0, 0, 0.3)",
+
+ "cwButtonBg": "#b1b9c1",
+ "cwButtonFg": "#fff",
+ "cwButtonHoverBg": "#bbc4ce",
+
+ "reactionPickerButtonHoverBg": "#eee",
+
+ "reactionViewerBorder": "rgba(0, 0, 0, 0.1)",
+
+ "pollEditorInputBg": "#fff",
+
+ "pollChoiceText": "#000",
+ "pollChoiceBorder": "rgba(0, 0, 0, 0.1)",
+
+ "urlPreviewBorder": "rgba(0, 0, 0, 0.1)",
+ "urlPreviewBorderHover": "rgba(0, 0, 0, 0.2)",
+ "urlPreviewTitle": "$text",
+ "urlPreviewText": ":alpha<0.7<$text",
+ "urlPreviewInfo": ":alpha<0.8<$text",
+
+ "calendarWeek": "#19a2a9",
+ "calendarSaturdayOrSunday": "#ef95a0",
+ "calendarDay": "#777",
+
+ "materBg": "rgba(0, 0, 0, 0.1)",
+
+ "chartCaption": ":alpha<0.6<$text",
+
+ "announcementsBg": "#f3f9ff",
+ "announcementsTitle": "#4078c0",
+ "announcementsText": "#57616f",
+
+ "donationBg": "#fbead4",
+ "donationFg": "#777d71",
+
+ "googleSearchBg": "#fff",
+ "googleSearchFg": "#55595c",
+ "googleSearchBorder": "rgba(0, 0, 0, 0.2)",
+ "googleSearchHoverBorder": "rgba(0, 0, 0, 0.3)",
+ "googleSearchHoverButton": "rgba(0, 0, 0, 0.05)",
+
+ "mfmTitleBg": "rgba(0, 0, 0, 0.07)",
+ "mfmQuote": ":alpha<0.6<$text",
+ "mfmQuoteLine": ":alpha<0.5<$text",
+
+ "suspendedInfoBg": "#ffdbdb",
+ "suspendedInfoFg": "#570808",
+ "remoteInfoBg": "#fff0db",
+ "remoteInfoFg": "#573c08",
+
+ "messagingRoomBg": "#fff",
+ "messagingRoomInfo": "#000",
+ "messagingRoomDateDividerLine": "rgba(0, 0, 0, 0.1)",
+ "messagingRoomDateDividerText": "rgba(0, 0, 0, 0.3)",
+ "messagingRoomMessageInfo": "rgba(0, 0, 0, 0.4)",
+ "messagingRoomMessageBg": "#eee",
+ "messagingRoomMessageFg": "#333",
+
+ "formButtonBorder": "rgba(0, 0, 0, 0.1)",
+ "formButtonHoverBg": ":alpha<0.12<$primary",
+ "formButtonHoverBorder": ":alpha<0.3<$primary",
+ "formButtonActiveBg": ":alpha<0.12<$primary",
+
+ "desktopHeaderBg": ":lighten<5<$secondary",
+ "desktopHeaderFg": "$text",
+ "desktopHeaderHoverFg": "#7b8c88",
+ "desktopHeaderSearchBg": "rgba(0, 0, 0, 0.05)",
+ "desktopHeaderSearchHoverBg": "rgba(0, 0, 0, 0.08)",
+ "desktopHeaderSearchFg": "#000",
+ "desktopNotificationBg": ":alpha<0.9<$secondary",
+ "desktopNotificationFg": ":alpha<0.7<$text",
+ "desktopNotificationShadow": "rgba(0, 0, 0, 0.2)",
+ "desktopPostFormBg": ":lighten<33<$primary",
+ "desktopPostFormTextareaBg": "#fff",
+ "desktopPostFormTextareaFg": "#333",
+ "desktopPostFormTransparentButtonFg": ":alpha<0.5<$primary",
+ "desktopPostFormTransparentButtonActiveGradientStart": ":lighten<30<$primary",
+ "desktopPostFormTransparentButtonActiveGradientEnd": ":lighten<33<$primary",
+ "desktopRenoteFormFooter": ":lighten<33<$primary",
+ "desktopTimelineHeaderShadow": "rgba(0, 0, 0, 0.08)",
+ "desktopTimelineSrc": "#6f7477",
+ "desktopTimelineSrcHover": "#525a5f",
+ "desktopWindowTitle": "#666",
+ "desktopWindowShadow": "rgba(0, 0, 0, 0.2)",
+ "desktopDriveBg": "#fff",
+ "desktopDriveFolderBg": ":lighten<31<$primary",
+ "desktopDriveFolderHoverBg": ":lighten<27<$primary",
+ "desktopDriveFolderActiveBg": ":lighten<25<$primary",
+ "desktopDriveFolderFg": ":darken<10<$primary",
+ "desktopSettingsNavItem": ":alpha<0.8<$text",
+ "desktopSettingsNavItemHover": ":darken<10<$text",
+
+ "deckAcrylicColumnBg": "rgba(0, 0, 0, 0.1)",
+
+ "mobileHeaderBg": ":lighten<5<$secondary",
+ "mobileHeaderFg": "$text",
+ "mobileNavBackdrop": "rgba(0, 0, 0, 0.2)",
+ "mobilePostFormDivider": "rgba(0, 0, 0, 0.1)",
+ "mobilePostFormTextareaBg": "#fff",
+ "mobileDriveNavBg": ":alpha<0.75<$secondary",
+ "mobileHomeTlItemHover": "rgba(0, 0, 0, 0.05)",
+ "mobileUserPageName": "#757c82",
+ "mobileUserPageAcct": "#969ea5",
+ "mobileUserPageDescription": "#757c82",
+ "mobileUserPageFollowedBg": "#a7bec7",
+ "mobileUserPageFollowedFg": "#fff",
+ "mobileUserPageStatusHighlight": "#787e86",
+ "mobileUserPageHeaderShadow": "rgba(0, 0, 0, 0.07)",
+ "mobileAnnouncement": "rgba(155, 196, 232, 0.2)",
+ "mobileAnnouncementFg": "#3f4967",
+ "mobileSignedInAsBg": "#fcfff5",
+ "mobileSignedInAsFg": "#2c662d",
+ "mobileSignoutBg": "#fff6f5",
+ "mobileSignoutFg": "#cc2727",
+
+ "reversiBannerGradientStart": "#8bca3e",
+ "reversiBannerGradientEnd": "#d6cf31",
+ "reversiDescBg": "rgba(0, 0, 0, 0.1)",
+ "reversiListItemShadow": "rgba(0, 0, 0, 0.15)",
+ "reversiMapSelectBorder": "rgba(0, 0, 0, 0.1)",
+ "reversiMapSelectHoverBorder": "rgba(0, 0, 0, 0.2)",
+ "reversiRoomFormShadow": "rgba(0, 0, 0, 0.1)",
+ "reversiRoomFooterBg": ":alpha<0.9<$secondary",
+ "reversiGameHeaderLine": "#c4cdd4",
+ "reversiGameEmptyCell": "rgba(0, 0, 0, 0.06)",
+ "reversiGameEmptyCellMyTurn": "rgba(0, 0, 0, 0.12)",
+ "reversiGameEmptyCellCanPut": "rgba(0, 0, 0, 0.9)"
+}
diff --git a/src/client/theme/pink.json b/src/client/theme/pink.json
new file mode 100644
index 0000000000..ddb56b46e1
--- /dev/null
+++ b/src/client/theme/pink.json
@@ -0,0 +1,17 @@
+{
+ "meta": {
+ "id": "e9c8c01d-9c15-48d0-9b5c-3d00843b5b36",
+ "name": "Pink",
+ "author": "syuilo",
+ "base": "light",
+ "vars": {
+ "primary": "rgb(251, 78, 112)",
+ "secondary": "rgb(255, 218, 240)",
+ "text": "rgb(113, 91, 102)"
+ }
+ },
+
+ "renoteGradient": "#ffb1c9",
+ "renoteText": "#ff588d",
+ "quoteBorder": "#ff6c9b"
+}