fix: dark mode handling

This commit is contained in:
Nicolas Giard
2018-12-01 23:03:14 -05:00
parent a7fc560573
commit 74aa09f39c
17 changed files with 156 additions and 78 deletions

View File

@@ -9,7 +9,7 @@
v-btn.ml-4(depressed, color='blue darken-1', @click='goLive') Return to Normal View
v-card(tile)
v-card-text
v-card.grey.lighten-4.radius-7(flat)
v-card.grey.radius-7(flat, :class='darkMode ? `darken-4` : `lighten-4`')
v-card-text
pre
code
@@ -19,7 +19,7 @@
</template>
<script>
/* global siteConfig */
import { get } from 'vuex-pathify'
export default {
props: {
@@ -40,7 +40,7 @@ export default {
return {}
},
computed: {
darkMode() { return siteConfig.darkMode }
darkMode: get('site/dark')
},
created () {
this.$store.commit('page/SET_ID', this.id)
@@ -67,6 +67,11 @@ export default {
font-weight: 400;
font-size: 1rem;
@at-root .theme--dark.source pre > code {
background-color: mc('grey', '900');
color: mc('grey', '400');
}
&::before {
display: none;
}