-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathApp.vue
74 lines (63 loc) · 1.93 KB
/
App.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<template>
<div class="container" v-bind:style="cssVariables">
<global-header></global-header>
<router-view class="page"></router-view>
</div>
</template>
<script lang="ts">
import Vue from 'vue'
import GlobalHeader from './components/GlobalHeader.vue'
export default Vue.extend({
data() {
return {
}
},
computed: {
cssVariables: function() {
if(this.$store.state.temporaryConfig) {
return {
'--color-bg': this.$store.state.temporaryConfig.colors.bg,
'--color-mid': this.$store.state.temporaryConfig.colors.mid,
'--color-fg': this.$store.state.temporaryConfig.colors.fg,
'--font-mono': this.$store.state.temporaryConfig.fonts.mono,
}
} else {
return {
'--color-bg': this.$store.state.config.colors.bg,
'--color-mid': this.$store.state.config.colors.mid,
'--color-fg': this.$store.state.config.colors.fg,
'--font-mono': this.$store.state.config.fonts.mono,
}
}
}
},
components: {
GlobalHeader
},
created: function() {
if(this.$store.state.config.useColoredFavicon) {
window['setFavicon'](this.$store.state.config.colors.bg, this.$store.state.config.colors.fg)
}
}
})
</script>
<style lang="scss" scoped>
.container {
font-family: $font-mono;
display: flex;
flex-direction: column;
width: 100vw;
background: var(--color-bg);
color: var(--color-fg);
transition: background 0.2s ease-in-out;
min-height: 100vh;
@media (min-width: $breakpoint-lg) {
height: 100vh;
flex-direction: row;
}
}
.page {
flex-grow: 1;
overflow-y: auto;
}
</style>